BasePromptTemplate
Defined in: .build/typescript/packages/core/src/prompts/base.ts:30
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”TemplatesVar
Section titled “TemplatesVar”TemplatesVar
extends readonly string
[] = string
[]
Vars
extends readonly string
[] = string
[]
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”
protected
new BasePromptTemplate<TemplatesVar
,Vars
>(options
):BasePromptTemplate
<TemplatesVar
,Vars
>
Defined in: .build/typescript/packages/core/src/prompts/base.ts:49
Parameters
Section titled “Parameters”options
Section titled “options”BasePromptTemplateOptions
<TemplatesVar
, Vars
>
Returns
Section titled “Returns”BasePromptTemplate
<TemplatesVar
, Vars
>
Properties
Section titled “Properties”metadata
Section titled “metadata”metadata:
Metadata
={}
Defined in: .build/typescript/packages/core/src/prompts/base.ts:34
templateVars
Section titled “templateVars”templateVars:
Set
<string
>
Defined in: .build/typescript/packages/core/src/prompts/base.ts:39
Set of template variables used in the prompt template. Used for type hints only.
To get the list of template variables used in the prompt at run-time, use the vars
method.
options
Section titled “options”options:
Partial
<Record
<TemplatesVar
[number
] |string
&object
,string
>> ={}
Defined in: .build/typescript/packages/core/src/prompts/base.ts:40
outputParser
Section titled “outputParser”outputParser:
undefined
|BaseOutputParser
<any
>
Defined in: .build/typescript/packages/core/src/prompts/base.ts:41
templateVarMappings
Section titled “templateVarMappings”templateVarMappings:
Partial
<Record
<Vars
[number
] |string
&object
,TemplatesVar
[number
] |string
&object
>> ={}
Defined in: .build/typescript/packages/core/src/prompts/base.ts:42
functionMappings
Section titled “functionMappings”functionMappings:
Partial
<Record
<TemplatesVar
[number
] |string
&object
,MappingFn
>> ={}
Defined in: .build/typescript/packages/core/src/prompts/base.ts:45
Accessors
Section titled “Accessors”template
Section titled “template”Get Signature
Section titled “Get Signature”get
abstract
template():string
Defined in: .build/typescript/packages/core/src/prompts/base.ts:123
Returns
Section titled “Returns”string
Methods
Section titled “Methods”mapTemplateVars()
Section titled “mapTemplateVars()”
protected
mapTemplateVars(options
):object
Defined in: .build/typescript/packages/core/src/prompts/base.ts:77
Parameters
Section titled “Parameters”options
Section titled “options”Record
<TemplatesVar
[number
] | string
& object
, string
>
Returns
Section titled “Returns”object
mapFunctionVars()
Section titled “mapFunctionVars()”
protected
mapFunctionVars(options
):Record
<TemplatesVar
[number
],string
>
Defined in: .build/typescript/packages/core/src/prompts/base.ts:86
Parameters
Section titled “Parameters”options
Section titled “options”Record
<TemplatesVar
[number
] | string
& object
, string
>
Returns
Section titled “Returns”Record
<TemplatesVar
[number
], string
>
mapAllVars()
Section titled “mapAllVars()”
protected
mapAllVars(options
):Record
<string
,string
>
Defined in: .build/typescript/packages/core/src/prompts/base.ts:104
Parameters
Section titled “Parameters”options
Section titled “options”Record
<TemplatesVar
[number
] | string
& object
, string
>
Returns
Section titled “Returns”Record
<string
, string
>
partialFormat()
Section titled “partialFormat()”
abstract
partialFormat(options
):BasePromptTemplate
<TemplatesVar
,Vars
>
Defined in: .build/typescript/packages/core/src/prompts/base.ts:111
Parameters
Section titled “Parameters”options
Section titled “options”Partial
<Record
<TemplatesVar
[number
] | string
& object
, string
>>
Returns
Section titled “Returns”BasePromptTemplate
<TemplatesVar
, Vars
>
format()
Section titled “format()”
abstract
format(options?
):string
Defined in: .build/typescript/packages/core/src/prompts/base.ts:115
Parameters
Section titled “Parameters”options?
Section titled “options?”Partial
<Record
<TemplatesVar
[number
] | string
& object
, string
>>
Returns
Section titled “Returns”string
formatMessages()
Section titled “formatMessages()”
abstract
formatMessages(options?
):ChatMessage
[]
Defined in: .build/typescript/packages/core/src/prompts/base.ts:119
Parameters
Section titled “Parameters”options?
Section titled “options?”Partial
<Record
<TemplatesVar
[number
] | string
& object
, string
>>