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 = EngineResponse

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>

Defined in

packages/llamaindex/src/engines/chat/types.ts:42

chat(params)

chat(params): Promise<R>

Parameters

params: ChatEngineParamsNonStreaming

Returns

Promise<R>

Defined in

packages/llamaindex/src/engines/chat/types.ts:43


reset()

reset(): void

Resets the chat history so that it's empty.

Returns

void

Defined in

packages/llamaindex/src/engines/chat/types.ts:48