Class: SimpleChatHistory
A ChatHistory is used to keep the state of back and forth chat messages
Implements
Constructors
constructor
• new SimpleChatHistory(init?
)
Parameters
Name | Type |
---|---|
init? | Partial <SimpleChatHistory > |
Defined in
packages/core/src/ChatHistory.ts:39
Properties
messages
• messages: ChatMessage
[]
Implementation of
Defined in
packages/core/src/ChatHistory.ts:36
messagesBefore
• Private
messagesBefore: number
Defined in
packages/core/src/ChatHistory.ts:37
Methods
addMessage
▸ addMessage(message
): void
Adds a message to the chat history.
Parameters
Name | Type |
---|---|
message | ChatMessage |
Returns
void