Table of Contents

Class ChatbotBase<TConversation, TMessage, TDelta>

public abstract class ChatbotBase<TConversation, TMessage, TDelta> : Chatbot where TConversation : class, IChatConversation<TMessage> where TMessage : ChatMessage where TDelta : class

Type Parameters

TConversation
TMessage
TDelta
Inheritance
object
ChatbotBase<TConversation, TMessage, TDelta>
Derived
Inherited Members

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.

public UnityEvent_Conversation<TConversation, TMessage> conversationEvents

Field Value

UnityEvent_Conversation<TConversation, TMessage>

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.
public UnityEvent_OnReceiveMessage<TMessage> onReceiveMessage

Field Value

UnityEvent_OnReceiveMessage<TMessage>

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.

public UnityEvent_OnReceiveStreamingMessage<TDelta> onReceiveStreamingMessage

Field Value

UnityEvent_OnReceiveStreamingMessage<TDelta>

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.

public UnityEvent onStartStreamingMessage

Field Value

UnityEvent

Methods

CreateConversationAsyncINTERNAL()

protected abstract UniTask<TConversation> CreateConversationAsyncINTERNAL()

Returns

UniTask<TConversation>

DeleteConversationAsync(string)

public UniTask<bool> DeleteConversationAsync(string conversationId)

Parameters

conversationId string

Returns

UniTask<bool>

DeleteConversationAsyncINTERNAL(string)

protected abstract UniTask<bool> DeleteConversationAsyncINTERNAL(string conversationId)

Parameters

conversationId string

Returns

UniTask<bool>

LoadConversationAsync(string)

public UniTask<TConversation> LoadConversationAsync(string conversationId)

Parameters

conversationId string

Returns

UniTask<TConversation>

LoadConversationAsyncINTERNAL(string)

protected abstract UniTask<TConversation> LoadConversationAsyncINTERNAL(string conversationId)

Parameters

conversationId string

Returns

UniTask<TConversation>

StartNewConversationAsync()

public UniTask<TConversation> StartNewConversationAsync()

Returns

UniTask<TConversation>