Class ChatbotBase<TConversation, TMessage, TDelta>
Inheritance
object
ChatbotBase<TConversation, TMessage, TDelta>
Assembly: .dll
Syntax
public abstract class ChatbotBase<TConversation, TMessage, TDelta> : Chatbot where TConversation : class, IChatConversation<TMessage> where TMessage : ChatMessage where TDelta : class
Type Parameters
Name |
Description |
TConversation |
|
TMessage |
|
TDelta |
|
Fields
conversationEvents
Event triggered when a conversation is created, loaded, or deleted.
This is useful for managing conversation state and updating the UI or other components accordingly.
Declaration
public UnityEvent_Conversation<TConversation, TMessage> conversationEvents
Field Value
onReceiveMessage
Event triggered when a complete message is received.
- If streaming is enabled, this event will be called once the entire message has been received.
- If streaming is disabled, this event will be called immediately after the message is processed.
Declaration
public UnityEvent_OnReceiveMessage<TMessage> onReceiveMessage
Field Value
onReceiveStreamingMessage
Event triggered when a new message is received during streaming.
This allows for real-time updates to the UI or other components as the message is being streamed.
Declaration
public UnityEvent_OnReceiveStreamingMessage<TDelta> onReceiveStreamingMessage
Field Value
onStartStreamingMessage
Event triggered when a new message starts streaming.
This is useful for UI updates or other actions that need to occur when a message starts streaming.
Declaration
public UnityEvent onStartStreamingMessage
Field Value
Type |
Description |
UnityEvent |
|
Methods
CreateConversationAsyncINTERNAL()
Declaration
protected abstract UniTask<TConversation> CreateConversationAsyncINTERNAL()
Returns
Type |
Description |
UniTask<TConversation> |
|
DeleteConversationAsync(string)
Declaration
public UniTask<bool> DeleteConversationAsync(string conversationId)
Parameters
Type |
Name |
Description |
string |
conversationId |
|
Returns
Type |
Description |
UniTask<bool> |
|
DeleteConversationAsyncINTERNAL(string)
Declaration
protected abstract UniTask<bool> DeleteConversationAsyncINTERNAL(string conversationId)
Parameters
Type |
Name |
Description |
string |
conversationId |
|
Returns
Type |
Description |
UniTask<bool> |
|
LoadConversationAsync(string)
Declaration
public UniTask<TConversation> LoadConversationAsync(string conversationId)
Parameters
Type |
Name |
Description |
string |
conversationId |
|
Returns
Type |
Description |
UniTask<TConversation> |
|
LoadConversationAsyncINTERNAL(string)
Declaration
protected abstract UniTask<TConversation> LoadConversationAsyncINTERNAL(string conversationId)
Parameters
Type |
Name |
Description |
string |
conversationId |
|
Returns
Type |
Description |
UniTask<TConversation> |
|
StartNewConversationAsync()
Declaration
public UniTask<TConversation> StartNewConversationAsync()
Returns
Type |
Description |
UniTask<TConversation> |
|