Files
LlamaIndexTS/apps/docs/docs/api/classes/SimpleChatEngine.md
T
2023-07-21 09:07:38 -07:00

2.0 KiB

id, title, sidebar_label, sidebar_position, custom_edit_url
id title sidebar_label sidebar_position custom_edit_url
SimpleChatEngine Class: SimpleChatEngine SimpleChatEngine 0 null

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

Implements

Constructors

constructor

new SimpleChatEngine(init?)

Parameters

Name Type
init? Partial<SimpleChatEngine>

Defined in

ChatEngine.ts:40

Properties

chatHistory

chatHistory: ChatMessage[]

Defined in

ChatEngine.ts:37


llm

llm: LLM

Defined in

ChatEngine.ts:38

Methods

chat

chat(message, chatHistory?): Promise<Response>

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

Parameters

Name Type Description
message string
chatHistory? ChatMessage[] optional chat history if you want to customize the chat history

Returns

Promise<Response>

Implementation of

ChatEngine.chat

Defined in

ChatEngine.ts:45


reset

reset(): void

Resets the chat history so that it's empty.

Returns

void

Implementation of

ChatEngine.reset

Defined in

ChatEngine.ts:54