Class: abstract
ChatHistory<AdditionalMessageOptions>
A ChatHistory is used to keep the state of back and forth chat messages
Extended by
Type parameters
• AdditionalMessageOptions extends object
= object
Constructors
new ChatHistory()
new ChatHistory<
AdditionalMessageOptions
>():ChatHistory
<AdditionalMessageOptions
>
Returns
ChatHistory
<AdditionalMessageOptions
>
Accessors
messages
get
abstract
messages():ChatMessage
<AdditionalMessageOptions
>[]
Returns
ChatMessage
<AdditionalMessageOptions
>[]
Source
packages/llamaindex/src/ChatHistory.ts:14
Methods
addMessage()
abstract
addMessage(message
):void
Adds a message to the chat history.
Parameters
• message: ChatMessage
<AdditionalMessageOptions
>
Returns
void