API
API Reference

API Reference

getAllMessages
required
Get all messages from the current thread.
Type: function() => array


getAllThreads
required
Get all threads.
Type: function() => array


getCurrentThread
required
Get the current thread.
Type: function() => object | undefined


getBranchMessages
required
Get messages from the current branch.
See the Branching section
Type: function() => array


deleteThread
required
Delete a thread by its ID.
Type: function(threadId: string | number) => void


sendUserMessage
required
Send a message to the conversation.
Type: function(content: object) => Promise<boolean<


onChangeThread
required
Triggered when another thread is opened.
Type: function(threadId: string | number) => void


openNewThread
required
Triggered when a new thread is opened.
Type: function(thread: object) => void


setProgressStatus
required
Set a custom waiting status for a chat response.
Type: function(status: string) => void


handleChangeBranch
required
Change the thread branch.
Type: function(message: object) => void