Skip to main content

Interface: ToolCallPromptTemplate<SOURCE_PROMPT, TARGET_PROMPT>

Type parameters

Name
SOURCE_PROMPT
TARGET_PROMPT

Methods

createPrompt

createPrompt(prompt, tool): TARGET_PROMPT

Parameters

NameType
promptSOURCE_PROMPT
toolToolDefinition<string, unknown>

Returns

TARGET_PROMPT

Defined in

packages/modelfusion/src/tool/generate-tool-call/ToolCallPromptTemplate.ts:6


extractToolCall

extractToolCall(response, tool): null | { args: unknown ; id: string }

Parameters

NameType
responsestring
toolToolDefinition<string, unknown>

Returns

null | { args: unknown ; id: string }

Defined in

packages/modelfusion/src/tool/generate-tool-call/ToolCallPromptTemplate.ts:11


withJsonOutput

withJsonOutput(«destructured»): Object

Parameters

NameType
«destructured»Object
› modelObject
› model.withJsonOutput(schema: Schema<unknown> & JsonSchemaProducer) => { withJsonOutput(schema: Schema<unknown> & JsonSchemaProducer): ...; }
› schemaSchema<unknown> & JsonSchemaProducer

Returns

Object

NameType
withJsonOutput(schema: Schema<unknown> & JsonSchemaProducer) => { withJsonOutput(schema: Schema<unknown> & JsonSchemaProducer): ...; }

Defined in

packages/modelfusion/src/tool/generate-tool-call/ToolCallPromptTemplate.ts:16