Skip to content

Type Alias: ChatHistoryFunctionCallMessageTemplate

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

Template format for how functions can be called by the model and how their results are fed to the model after the function call. Consists of an array with two elements:

  1. The function call template.
  2. 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.

Type declaration

call

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

result

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

Defined in

chatWrappers/generic/utils/chatHistoryFunctionCallMessageTemplate.ts:80