Skip to main content

Interface: ChatEngine

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

Implemented by

Methods

chat

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

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

Parameters

NameTypeDescription
messagestring
chatHistory?ChatMessage[]optional chat history if you want to customize the chat history

Returns

Promise<Response>

Defined in

ChatEngine.ts:25


reset

reset(): void

Resets the chat history so that it's empty.

Returns

void

Defined in

ChatEngine.ts:30