Interface IPromptTemplate
Schema to represent a prompt for an LLM.
Namespace: DotnetPrompt.Abstractions.Prompts
Assembly: DotnetPrompt.Abstractions.dll
Syntax
public interface IPromptTemplate
Properties
| Improve this Doc View SourceInputVariables
A list of the names of the variables the prompt template expects.
Declaration
IList<string> InputVariables { get; }
Property Value
Type | Description |
---|---|
IList<string> |
Methods
| Improve this Doc View SourceFormat(IDictionary<string, string>)
Build a prompt from current template and a list of values.
Declaration
string Format(IDictionary<string, string> values = null)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<string, string> | values | Key-Value list of values to use to build prompt. |
Returns
Type | Description |
---|---|
string | String prompt |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Throws when provided list of keys does not match InputVariables. |