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