Zum Hauptinhalt springen

Interface: ChatEngine<R, AR>

A ChatEngine is used to handle back and forth chats between the application and the LLM.

Type parameters

NameType
RResponse
ARextends AsyncIterable<unknown> = AsyncIterable<R>

Implemented by

Methods

chat

chat(params): Promise<AR>

Send message along with the class's current chat history to the LLM.

Parameters

NameType
paramsChatEngineParamsStreaming

Returns

Promise<AR>

Defined in

packages/core/src/engines/chat/types.ts:44

chat(params): Promise<R>

Parameters

NameType
paramsChatEngineParamsNonStreaming

Returns

Promise<R>

Defined in

packages/core/src/engines/chat/types.ts:45


reset

reset(): void

Resets the chat history so that it's empty.

Returns

void

Defined in

packages/core/src/engines/chat/types.ts:50