Class: SimpleChatHistory
A ChatHistory is used to keep the state of back and forth chat messages
Extends
Constructors
new SimpleChatHistory()
new SimpleChatHistory(
init
?):SimpleChatHistory
Parameters
• init?: Partial
<SimpleChatHistory
>
Returns
Overrides
Source
packages/core/src/ChatHistory.ts:43
Properties
messages
messages:
ChatMessage
[]
Overrides
Source
packages/core/src/ChatHistory.ts:40
messagesBefore
private
messagesBefore:number
Source
packages/core/src/ChatHistory.ts:41
Methods
addMessage()
addMessage(
message
):void
Adds a message to the chat history.
Parameters
• message: ChatMessage
Returns
void
Overrides
Source
packages/core/src/ChatHistory.ts:49
newMessages()
newMessages():
ChatMessage
[]
Returns the new messages since the last call to this function (or since calling the constructor)