Skip to content

Aggregator

The Aggregator class is responsible for managing the aggregation of chat messages and generating responses using an AI model. It interacts with the AIClient to create completions based on the provided messages and system prompts.

Methods

generateFromMessages()

generateFromMessages(messages, useLegacy): Promise<AsyncIterable<string>>

Generates responses from a series of chat messages using the AI model.

Parameters

ParameterTypeDefault valueDescription
messagesChatCompletionMessage[]undefinedAn array of chat completion messages to be processed.
useLegacybooleantrue-

Returns

  • An async iterable that yields generated message strings.

Source

aggregator/Aggregator.ts:34


Generated using typedoc-plugin-markdown and TypeDoc