Class: SimpleChatEngine
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
Properties
chatHistory
• chatHistory: ChatMessage
[]
Defined in
llm
• llm: LLM
Defined in
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
Defined in
reset
▸ reset(): void
Resets the chat history so that it's empty.
Returns
void