Class: abstract
BasePromptTemplate<TemplatesVar, Vars>
Extended by
Type Parameters
• TemplatesVar extends readonly string
[] = string
[]
• Vars extends readonly string
[] = string
[]
Constructors
new BasePromptTemplate()
protected
new BasePromptTemplate<TemplatesVar
,Vars
>(options
):BasePromptTemplate
<TemplatesVar
,Vars
>
Parameters
• options: BasePromptTemplateOptions
<TemplatesVar
, Vars
>
Returns
BasePromptTemplate
<TemplatesVar
, Vars
>
Defined in
packages/core/prompts/dist/index.d.ts:25
Properties
functionMappings
functionMappings:
Partial
<Record
<TemplatesVar
[number
] |string
&object
,MappingFn
<string
[]>>>
Defined in
packages/core/prompts/dist/index.d.ts:24
metadata
metadata:
Metadata
Defined in
packages/core/prompts/dist/index.d.ts:19
options
options:
Partial
<Record
<TemplatesVar
[number
] |string
&object
,string
>>
Defined in
packages/core/prompts/dist/index.d.ts:21
outputParser
outputParser:
undefined
|BaseOutputParser
<any
>
Defined in
packages/core/prompts/dist/index.d.ts:22
templateVarMappings
templateVarMappings:
Partial
<Record
<string
&object
|Vars
[number
],TemplatesVar
[number
] |string
&object
>>
Defined in
packages/core/prompts/dist/index.d.ts:23
templateVars
templateVars:
Set
<string
>
Defined in
packages/core/prompts/dist/index.d.ts:20
Accessors
template
Get Signature
get
abstract
template():string
Returns
string
Defined in
packages/core/prompts/dist/index.d.ts:34
Methods
format()
abstract
format(options
?):string
Parameters
• options?: Partial
<Record
<TemplatesVar
[number
] | string
& object
, string
>>
Returns
string
Defined in
packages/core/prompts/dist/index.d.ts:32
formatMessages()
abstract
formatMessages(options
?):ChatMessage
[]
Parameters
• options?: Partial
<Record
<TemplatesVar
[number
] | string
& object
, string
>>
Returns
Defined in
packages/core/prompts/dist/index.d.ts:33
mapAllVars()
protected
mapAllVars(options
):Record
<string
,string
>
Parameters
• options: Record
<TemplatesVar
[number
] | string
& object
, string
>
Returns
Record
<string
, string
>
Defined in
packages/core/prompts/dist/index.d.ts:30
mapFunctionVars()
protected
mapFunctionVars(options
):Record
<TemplatesVar
[number
],string
>
Parameters
• options: Record
<TemplatesVar
[number
] | string
& object
, string
>
Returns
Record
<TemplatesVar
[number
], string
>
Defined in
packages/core/prompts/dist/index.d.ts:29
mapTemplateVars()
protected
mapTemplateVars(options
):object
Parameters
• options: Record
<TemplatesVar
[number
] | string
& object
, string
>
Returns
object
Defined in
packages/core/prompts/dist/index.d.ts:26
partialFormat()
abstract
partialFormat(options
):BasePromptTemplate
<TemplatesVar
,Vars
>
Parameters
• options: Partial
<Record
<TemplatesVar
[number
] | string
& object
, string
>>
Returns
BasePromptTemplate
<TemplatesVar
, Vars
>
Defined in
packages/core/prompts/dist/index.d.ts:31