メインコンテンツまでスキップ

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

Source

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

Properties

chatHistory

chatHistory: ChatHistory<object>

Source

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


llm

llm: LLM<object, object>

Source

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

Methods

chat()

chat(params)

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

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

Parameters

params: ChatEngineParamsStreaming

Returns

Promise<AsyncIterable <EngineResponse>>

Implementation of

ChatEngine . chat

Source

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

chat(params)

chat(params): Promise <EngineResponse>

Parameters

params: ChatEngineParamsNonStreaming

Returns

Promise <EngineResponse>

Implementation of

ChatEngine . chat

Source

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


reset()

reset(): void

Resets the chat history so that it's empty.

Returns

void

Implementation of

ChatEngine . reset

Source

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