Class Chatbot
Inheritance
object
Chatbot
Assembly: .dll
Syntax
public abstract class Chatbot : AIAssistant
Fields
contentModerator
Declaration
protected ContentModerator contentModerator
Field Value
imageGenerator
Declaration
protected ImageGenerator imageGenerator
Field Value
onSendMessage
Event triggered when a message is sent.
This is useful for logging or UI updates when a message is sent to the chatbot.
Declaration
[FoldableFieldAttribute]
public UnityEvent_OnSendMessage onSendMessage
Field Value
speechGenerator
Declaration
protected SpeechGenerator speechGenerator
Field Value
speechTranscriber
Declaration
protected SpeechTranscriber speechTranscriber
Field Value
Properties
Api
The API associated with this chatbot.
This property provides access to the API used by the chatbot for processing requests and responses.
Declaration
public override Api Api { get; }
Property Value
Overrides
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.
Declaration
public virtual bool IsStreamEnabled { get; set; }
Property Value
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.
Declaration
public abstract List<ChatMessage> Messages { get; }
Property Value
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.
Declaration
public abstract Model Model { get; set; }
Property Value
Name
Declaration
public abstract string Name { get; set; }
Property Value
Profile
Declaration
public abstract ChatbotProfile Profile { get; }
Property Value
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.
Declaration
public abstract Model UtilityModel { get; set; }
Property Value
Methods
AttachFile(IFile)
Declaration
public void AttachFile(IFile attachedFile)
Parameters
Type |
Name |
Description |
IFile |
attachedFile |
|
AttachFiles(IList<IFile>)
Declaration
public void AttachFiles(IList<IFile> attachedFiles)
Parameters
Type |
Name |
Description |
IList<IFile> |
attachedFiles |
|
EnterChatMessage(ChatMessage)
Declaration
public void EnterChatMessage(ChatMessage inputMessage)
Parameters
EnterChatText(string)
Declaration
public void EnterChatText(string inputText)
Parameters
Type |
Name |
Description |
string |
inputText |
|
InitializeAsync()
Declaration
public override UniTask InitializeAsync()
Returns
Overrides
IsInvalidResponse(ChatMessage)
Declaration
protected bool IsInvalidResponse(ChatMessage response)
Parameters
Returns
IsNotInitialized()
Declaration
protected bool IsNotInitialized()
Returns
OnReceiveMessage(ChatMessage)
Declaration
protected virtual void OnReceiveMessage(ChatMessage response)
Parameters
ProcessChatRequestAsyncINTERNAL(ChatMessage)
Declaration
protected abstract UniTask<ChatMessage> ProcessChatRequestAsyncINTERNAL(ChatMessage inputMessage)
Parameters
Returns
ProcessPendingMessageAsyncINTERNAL()
Declaration
protected UniTask<ChatMessage> ProcessPendingMessageAsyncINTERNAL()
Returns
StartRecording()
Declaration
public void StartRecording()
StopRecording()
Declaration
public void StopRecording()