fromExamples(
examples: string[],
suffix: string,
inputVariables: string[],
exampleSeparator: string = "\n\n",
prefix| Name | Type | Description |
|---|---|---|
examples* | string[] | |
suffix* | string | |
inputVariables* | string[] | |
exampleSeparator | string | Default: "\n\n" |
prefix | string | Default: "" |
Take examples in list format with prefix and suffix to create a prompt.
Intended to be used as a way to dynamically create a prompt from examples.
List of examples to use in the prompt.
String to go after the list of examples. Should generally set up the user's input.
A list of variable names the final prompt template will expect
The separator to use in between examples
String that should go before any examples. Generally includes examples.