Skip to main content

Class: SimpleChatEngine

SimpleChatEngine is the simplest possible chat engine. Useful for using your own custom prompts.

Implements

Constructors

new SimpleChatEngine()

new SimpleChatEngine(init?): SimpleChatEngine

Parameters

init?: Partial<SimpleChatEngine>

Returns

SimpleChatEngine

Defined in

packages/llamaindex/src/engines/chat/SimpleChatEngine.ts:24

Properties

chatHistory

chatHistory: BaseMemory<object>

Defined in

packages/llamaindex/src/engines/chat/SimpleChatEngine.ts:21


llm

llm: LLM<object, object>

Defined in

packages/llamaindex/src/engines/chat/SimpleChatEngine.ts:22

Methods

chat()

chat(params)

chat(params): Promise<AsyncIterable<EngineResponse, any, any>>

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

Parameters

params: ChatEngineParamsStreaming

Returns

Promise<AsyncIterable<EngineResponse, any, any>>

Implementation of

ChatEngine.chat

Defined in

packages/llamaindex/src/engines/chat/SimpleChatEngine.ts:29

chat(params)

chat(params): Promise<EngineResponse>

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

Parameters

params: ChatEngineParamsNonStreaming

Returns

Promise<EngineResponse>

Implementation of

ChatEngine.chat

Defined in

packages/llamaindex/src/engines/chat/SimpleChatEngine.ts:32


reset()

reset(): void

Resets the chat history so that it's empty.

Returns

void

Implementation of

ChatEngine.reset

Defined in

packages/llamaindex/src/engines/chat/SimpleChatEngine.ts:75