Table of Contents

Class Chatbot

public abstract class Chatbot : AIAssistant
Inheritance
object
Chatbot
Derived
Inherited Members

Fields

contentModerator

protected ContentModerator contentModerator

Field Value

ContentModerator

imageGenerator

protected ImageGenerator imageGenerator

Field Value

ImageGenerator

onSendMessage

Event triggered when a message is sent.
This is useful for logging or UI updates when a message is sent to the chatbot.

[FoldableFieldAttribute]
public UnityEvent_OnSendMessage onSendMessage

Field Value

UnityEvent_OnSendMessage

speechGenerator

protected SpeechGenerator speechGenerator

Field Value

SpeechGenerator

speechTranscriber

protected SpeechTranscriber speechTranscriber

Field Value

SpeechTranscriber

Properties

Api

The API associated with this chatbot.
This property provides access to the API used by the chatbot for processing requests and responses.

public override Api Api { get; }

Property Value

Api

IsStreamEnabled

Indicates whether streaming mode is enabled for the chatbot.
When enabled, the chatbot will stream responses in real-time, allowing for immediate updates to the UI or other components.
This property can be set to enable or disable streaming mode.

public virtual bool IsStreamEnabled { get; set; }

Property Value

bool

Messages

The list of messages in the chatbot's conversation history.
This property should be set to the messages that the chatbot has processed, including user messages and responses.
It is used to maintain the context of the conversation and provide a history of interactions.

public abstract List<ChatMessage> Messages { get; }

Property Value

List<ChatMessage>

Model

The model used by the chatbot for processing requests and generating responses.
This property should be set to the model that provides the necessary capabilities for the chatbot.

public abstract Model Model { get; set; }

Property Value

Model

Name

The name of the chatbot.

public abstract string Name { get; set; }

Property Value

string

Profile

public abstract ChatbotProfile Profile { get; }

Property Value

ChatbotProfile

UtilityModel

The utility model used for resolving intents and processing requests.
This property should be set to the model that provides the necessary capabilities for the chatbot.

public abstract Model UtilityModel { get; set; }

Property Value

Model

Methods

AttachFile(IFile)

public void AttachFile(IFile attachedFile)

Parameters

attachedFile IFile

AttachFiles(IList<IFile>)

public void AttachFiles(IList<IFile> attachedFiles)

Parameters

attachedFiles IList<IFile>

EnterChatMessage(ChatMessage)

public void EnterChatMessage(ChatMessage inputMessage)

Parameters

inputMessage ChatMessage

EnterChatText(string)

public void EnterChatText(string inputText)

Parameters

inputText string

InitializeAsync()

public override UniTask InitializeAsync()

Returns

UniTask

IsInvalidResponse(ChatMessage)

protected bool IsInvalidResponse(ChatMessage response)

Parameters

response ChatMessage

Returns

bool

IsNotInitialized()

protected bool IsNotInitialized()

Returns

bool

OnReceiveMessage(ChatMessage)

protected virtual void OnReceiveMessage(ChatMessage response)

Parameters

response ChatMessage

ProcessChatRequestAsyncINTERNAL(ChatMessage)

protected abstract UniTask<ChatMessage> ProcessChatRequestAsyncINTERNAL(ChatMessage inputMessage)

Parameters

inputMessage ChatMessage

Returns

UniTask<ChatMessage>

ProcessPendingMessageAsyncINTERNAL()

protected UniTask<ChatMessage> ProcessPendingMessageAsyncINTERNAL()

Returns

UniTask<ChatMessage>

StartRecording()

public void StartRecording()

StopRecording()

public void StopRecording()