AI DevKit
Search Results for

    Show / Hide Table of Contents

    Class Chatbot

    Inheritance
    object
    AIComponent
    AIAssistant
    Chatbot
    ChatbotBase<TConversation, TMessage, TDelta>
    Inherited Members
    AIAssistant.functionManager
    AIAssistant.autoStart
    AIAssistant.onInitialized
    AIAssistant.onReceiveToolCalls
    AIAssistant.IsInitialized
    AIAssistant.Start()
    AIComponent.streaming
    AIComponent.onReceiveUsage
    AIComponent.onErrorOccured
    AIComponent.DebugMode
    AIComponent.Logger
    AIComponent.IsProcessing
    AIComponent.IsSubcomponent
    AIComponent.Awake()
    AIComponent.SetParentComponent(AIComponent)
    AIComponent.Enqueue(Func<UniTask>)
    AIComponent.CancelAllRequests()
    AIComponent.CancelLastRequest()
    AIComponent.OnReceiveUsageData(Usage)
    AIComponent.LogInfo(string)
    AIComponent.LogWarning(string)
    AIComponent.LogError(string)
    AIComponent.IsInvalidPrompt(string)
    AIComponent.IsInvalidFile(IFile)
    AIComponent.IsInvalidFiles(IList<IFile>)
    AIComponent.NoRequiredComponent(MonoBehaviour)
    AIComponent.IsInvalidPrompt<T>(T)
    AIComponent.IsInvalidPrompt(TextPrompt, List<ChatMessage>)
    Namespace: Glitch9.AIDevKit.Components
    Assembly: .dll
    Syntax
    public abstract class Chatbot : AIAssistant

    Fields

    contentModerator

    Declaration
    protected ContentModerator contentModerator
    Field Value
    Type Description
    ContentModerator

    imageGenerator

    Declaration
    protected ImageGenerator imageGenerator
    Field Value
    Type Description
    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.

    Declaration
    [FoldableFieldAttribute]
    public UnityEvent_OnSendMessage onSendMessage
    Field Value
    Type Description
    UnityEvent_OnSendMessage

    speechGenerator

    Declaration
    protected SpeechGenerator speechGenerator
    Field Value
    Type Description
    SpeechGenerator

    speechTranscriber

    Declaration
    protected SpeechTranscriber speechTranscriber
    Field Value
    Type Description
    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.

    Declaration
    public override Api Api { get; }
    Property Value
    Type Description
    Api
    Overrides
    AIComponent.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.

    Declaration
    public virtual bool IsStreamEnabled { get; set; }
    Property Value
    Type Description
    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.

    Declaration
    public abstract List<ChatMessage> Messages { get; }
    Property Value
    Type Description
    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.

    Declaration
    public abstract Model Model { get; set; }
    Property Value
    Type Description
    Model

    Name

    The name of the chatbot.

    Declaration
    public abstract string Name { get; set; }
    Property Value
    Type Description
    string

    Profile

    Declaration
    public abstract ChatbotProfile Profile { get; }
    Property Value
    Type Description
    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.

    Declaration
    public abstract Model UtilityModel { get; set; }
    Property Value
    Type Description
    Model

    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
    Type Name Description
    ChatMessage inputMessage

    EnterChatText(string)

    Declaration
    public void EnterChatText(string inputText)
    Parameters
    Type Name Description
    string inputText

    InitializeAsync()

    Declaration
    public override UniTask InitializeAsync()
    Returns
    Type Description
    UniTask
    Overrides
    AIAssistant.InitializeAsync()

    IsInvalidResponse(ChatMessage)

    Declaration
    protected bool IsInvalidResponse(ChatMessage response)
    Parameters
    Type Name Description
    ChatMessage response
    Returns
    Type Description
    bool

    IsNotInitialized()

    Declaration
    protected bool IsNotInitialized()
    Returns
    Type Description
    bool

    OnReceiveMessage(ChatMessage)

    Declaration
    protected virtual void OnReceiveMessage(ChatMessage response)
    Parameters
    Type Name Description
    ChatMessage response

    ProcessChatRequestAsyncINTERNAL(ChatMessage)

    Declaration
    protected abstract UniTask<ChatMessage> ProcessChatRequestAsyncINTERNAL(ChatMessage inputMessage)
    Parameters
    Type Name Description
    ChatMessage inputMessage
    Returns
    Type Description
    UniTask<ChatMessage>

    ProcessPendingMessageAsyncINTERNAL()

    Declaration
    protected UniTask<ChatMessage> ProcessPendingMessageAsyncINTERNAL()
    Returns
    Type Description
    UniTask<ChatMessage>

    StartRecording()

    Declaration
    public void StartRecording()

    StopRecording()

    Declaration
    public void StopRecording()
    In this article
    Back to top Generated by DocFX