mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-20 22:41:23 -04:00
2.0 KiB
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
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