Skip to main content

Interface: ToolCallsPromptTemplate<SOURCE_PROMPT, TARGET_PROMPT>

Type parameters

Name
SOURCE_PROMPT
TARGET_PROMPT

Properties

createPrompt

createPrompt: (prompt: SOURCE_PROMPT, tools: ToolDefinition<string, unknown>[]) => TARGET_PROMPT

Type declaration

▸ (prompt, tools): TARGET_PROMPT

Parameters
NameType
promptSOURCE_PROMPT
toolsToolDefinition<string, unknown>[]
Returns

TARGET_PROMPT

Defined in

packages/modelfusion/src/tool/generate-tool-calls/ToolCallsPromptTemplate.ts:4


extractToolCallsAndText

extractToolCallsAndText: (response: string) => { text: null | string ; toolCalls: null | { args: unknown ; id: string ; name: string }[] }

Type declaration

▸ (response): Object

Parameters
NameType
responsestring
Returns

Object

NameType
textnull | string
toolCallsnull | { args: unknown ; id: string ; name: string }[]

Defined in

packages/modelfusion/src/tool/generate-tool-calls/ToolCallsPromptTemplate.ts:8