Module: prompts
Classes
- AIMessagePromptTemplate
 - BaseChatPromptTemplate
 - BaseExampleSelector
 - BasePromptTemplate
 - BaseStringPromptTemplate
 - ChatMessagePromptTemplate
 - ChatPromptTemplate
 - FewShotPromptTemplate
 - HumanMessagePromptTemplate
 - LengthBasedExampleSelector
 - MessagesPlaceholder
 - PromptTemplate
 - SemanticSimilarityExampleSelector
 - StringPromptValue
 - SystemMessagePromptTemplate
 
Interfaces
Type Aliases
SerializedBasePromptTemplate
Ƭ SerializedBasePromptTemplate: SerializedFewShotTemplate | SerializedPromptTemplate | SerializedChatPromptTemplate
Defined in
langchain/src/prompts/serde.ts:40
SerializedChatPromptTemplate
Ƭ SerializedChatPromptTemplate: Object
Serialized Chat prompt template
Type declaration
| Name | Type | 
|---|---|
_type? | "chat_prompt" | 
input_variables | string[] | 
prompt_messages | SerializedMessagePromptTemplate[] | 
template_format? | TemplateFormat | 
Defined in
langchain/src/prompts/serde.ts:33
SerializedFewShotTemplate
Ƭ SerializedFewShotTemplate: Object
Type declaration
| Name | Type | 
|---|---|
_type | "few_shot" | 
example_prompt? | SerializedPromptTemplate | 
example_prompt_path? | string | 
example_separator | string | 
examples | string | Example[] | 
input_variables | string[] | 
prefix? | string | 
prefix_path? | string | 
suffix? | string | 
suffix_path? | string | 
template_format | TemplateFormat | 
Defined in
langchain/src/prompts/serde.ts:12
SerializedMessagePromptTemplate
Ƭ SerializedMessagePromptTemplate: Object
Index signature
▪ [key: string]: unknown
Type declaration
| Name | Type | 
|---|---|
_type | "message" | 
input_variables | string[] | 
Defined in
langchain/src/prompts/serde.ts:26
SerializedPromptTemplate
Ƭ SerializedPromptTemplate: Object
Type declaration
| Name | Type | 
|---|---|
_type? | "prompt" | 
input_variables | string[] | 
template? | string | 
template_format? | TemplateFormat | 
template_path? | string | 
Defined in
langchain/src/prompts/serde.ts:4
Functions
parseTemplate
▸ parseTemplate(template, templateFormat): ParsedFStringNode[]
Parameters
| Name | Type | 
|---|---|
template | string | 
templateFormat | TemplateFormat | 
Returns
ParsedFStringNode[]
Defined in
langchain/src/prompts/template.ts:91
renderTemplate
▸ renderTemplate(template, templateFormat, inputValues): string
Parameters
| Name | Type | 
|---|---|
template | string | 
templateFormat | TemplateFormat | 
inputValues | InputValues | 
Returns
string
Defined in
langchain/src/prompts/template.ts:85