Interface: FewShotPromptTemplateInput
prompts.FewShotPromptTemplateInput
Input common to all prompt templates.
Hierarchy
↳
FewShotPromptTemplateInput
Implemented by
Properties
examplePrompt
• examplePrompt: PromptTemplate
An PromptTemplate used to format a single example.
Defined in
langchain/src/prompts/few_shot.ts:33
exampleSelector
• Optional
exampleSelector: BaseExampleSelector
An BaseExampleSelector Examples to format into the prompt. Exactly one of this or examples must be provided.
Defined in
langchain/src/prompts/few_shot.ts:28
exampleSeparator
• Optional
exampleSeparator: string
String separator used to join the prefix, the examples, and suffix.
Defined in
langchain/src/prompts/few_shot.ts:38
examples
• Optional
examples: Example
[]
Examples to format into the prompt. Exactly one of this or exampleSelector must be provided.
Defined in
langchain/src/prompts/few_shot.ts:21
inputVariables
• inputVariables: string
[]
A list of variable names the prompt template expects
Inherited from
BasePromptTemplateInput.inputVariables
Defined in
langchain/src/prompts/base.ts:34
outputParser
• Optional
outputParser: BaseOutputParser
How to parse the output of calling an LLM on this formatted prompt
Inherited from
BasePromptTemplateInput.outputParser
Defined in
langchain/src/prompts/base.ts:39
partialVariables
• Optional
partialVariables: PartialValues
Partial variables
Inherited from
BasePromptTemplateInput.partialVariables
Defined in
langchain/src/prompts/base.ts:42
prefix
• Optional
prefix: string
A prompt template string to put before the examples.
Default Value
""
Defined in
langchain/src/prompts/few_shot.ts:45
suffix
• Optional
suffix: string
A prompt template string to put after the examples.
Defined in
langchain/src/prompts/few_shot.ts:50
templateFormat
• Optional
templateFormat: TemplateFormat
The format of the prompt template. Options are: 'f-string', 'jinja-2'
Defined in
langchain/src/prompts/few_shot.ts:55
validateTemplate
• Optional
validateTemplate: boolean
Whether or not to try validating the template on initialization.
Defined in
langchain/src/prompts/few_shot.ts:60