Skip to main content

Interface: ChatEngine<R, AR>

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

Type parameters

R = Response

AR extends AsyncIterable<unknown> = AsyncIterable<R>

Methods

chat()

chat(params)

chat(params): Promise<AR>

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

Parameters

params: ChatEngineParamsStreaming

Returns

Promise<AR>

Source

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

chat(params)

chat(params): Promise<R>

Parameters

params: ChatEngineParamsNonStreaming

Returns

Promise<R>

Source

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


reset()

reset(): void

Resets the chat history so that it's empty.

Returns

void

Source

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