Skip to content

Type Alias: TemplateChatWrapperOptions

ts
type TemplateChatWrapperOptions = {
  template: `${"" | `${string}`}${string}${string}${string}`;
  historyTemplate: {
     system: `${string}${string}`;
     user: `${string}${string}`;
     model: `${string}${string}`;
    };
  functionCallMessageTemplate: ChatHistoryFunctionCallMessageTemplate;
  joinAdjacentMessagesOfTheSameType: boolean;
  segments: TemplateChatWrapperSegmentsOptions;
};

Defined in: chatWrappers/generic/TemplateChatWrapper.ts:10

Type declaration

template

ts
template: `${"" | `${string}`}${string}${string}${string}`;

historyTemplate

ts
historyTemplate: {
  system: `${string}${string}`;
  user: `${string}${string}`;
  model: `${string}${string}`;
};

historyTemplate.system

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

historyTemplate.user

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

historyTemplate.model

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

functionCallMessageTemplate?

ts
optional functionCallMessageTemplate: ChatHistoryFunctionCallMessageTemplate;

joinAdjacentMessagesOfTheSameType?

ts
optional joinAdjacentMessagesOfTheSameType: boolean;

Whether to join adjacent messages of the same type.

Defaults to true.

segments?

ts
optional segments: TemplateChatWrapperSegmentsOptions;

Format of the segments generated by the model (like thought segments)