Skip to content

Overview / ToolPromptTemplate

ToolPromptTemplate<RunInput, PartialVariableName> ​

Extends ​

  • PromptTemplate<RunInput, PartialVariableName>

Type Parameters ​

Type ParameterDefault type
RunInput extends InputValuesany
PartialVariableName extends stringany

Constructors ​

new ToolPromptTemplate() ​

new ToolPromptTemplate<RunInput, PartialVariableName>(procedures, input): ToolPromptTemplate<RunInput, PartialVariableName>

Parameters ​

ParameterType
proceduresRecord<string, Tool | Form<{}>>
inputPromptTemplateInput<RunInput, PartialVariableName>

Returns ​

ToolPromptTemplate<RunInput, PartialVariableName>

Overrides ​

PromptTemplate<RunInput, PartialVariableName>.constructor

Methods ​

format() ​

format(values): Promise<string>

Formats the prompt template with the provided values.

Parameters ​

ParameterTypeDescription
valuesTypedPromptInputValues<InputValues>The values to be used to format the prompt template.

Returns ​

Promise<string>

A promise that resolves to a string which is the formatted prompt.

Overrides ​

PromptTemplate.format

Released under the GPL-3.0 License.