Skip to content

Type Alias: ChatHistoryFunctionCallMessageTemplate

ts
type ChatHistoryFunctionCallMessageTemplate = {
  call: `${string}${string}${string}`;
  result: `${string}${string}`;
};

Defined in: chatWrappers/generic/utils/chatHistoryFunctionCallMessageTemplate.ts:81

Template format for how functions can be called by the model and how their results are fed to the model after function calls.

Consists of an object with two properties:

  1. call: The function call template.
  2. result: The function call result template.

For example:

ts
const template: ChatHistoryFunctionCallMessageTemplate = {
    call: "[[call: ()]]",
    result: " [[result: ]]"
};

It's mandatory for the call template to have text before {{functionName}} in order for the chat wrapper know when to activate the function calling grammar.

Properties

call

ts
call: `${string}${string}${string}`;

Defined in: chatWrappers/generic/utils/chatHistoryFunctionCallMessageTemplate.ts:82


result

ts
result: `${string}${string}`;

Defined in: chatWrappers/generic/utils/chatHistoryFunctionCallMessageTemplate.ts:83