Interface: ToolCallPromptTemplate<SOURCE_PROMPT, TARGET_PROMPT>
Type parameters
Name |
---|
SOURCE_PROMPT |
TARGET_PROMPT |
Methods
createPrompt
▸ createPrompt(prompt
, tool
): TARGET_PROMPT
Parameters
Name | Type |
---|---|
prompt | SOURCE_PROMPT |
tool | ToolDefinition <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
Name | Type |
---|---|
response | string |
tool | ToolDefinition <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
Name | Type |
---|---|
«destructured» | Object |
› model | Object |
› model.withJsonOutput | (schema : Schema <unknown > & JsonSchemaProducer ) => { withJsonOutput(schema: Schema<unknown> & JsonSchemaProducer): ...; } |
› schema | Schema <unknown > & JsonSchemaProducer |
Returns
Object
Name | Type |
---|---|
withJsonOutput | (schema : Schema <unknown > & JsonSchemaProducer ) => { withJsonOutput(schema: Schema<unknown> & JsonSchemaProducer): ...; } |
Defined in
packages/modelfusion/src/tool/generate-tool-call/ToolCallPromptTemplate.ts:16