Search Results for

    Show / Hide Table of Contents

    Class AssistantsApiChatService

    Inheritance
    object
    GenerativeServiceBase
    AssistantsApiChatService
    Implements
    IAssistantsChatService
    IStreamingChatService<AssistantsApiEvent, ThreadMessage, IAssistantsOptions>
    IStreamingChatService
    IStreamingGenerativeService<ConversationItem[], AssistantsApiEvent, ThreadMessage, IAssistantsOptions>
    IDisposable
    Inherited Members
    GenerativeServiceBase.BeginOperation(CancellationToken)
    GenerativeServiceBase.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.Agents
    Assembly: Glitch9.AIDevKit.Provider.OpenAI.dll
    Syntax
    public class AssistantsApiChatService : GenerativeServiceBase, IAssistantsChatService, IStreamingChatService<AssistantsApiEvent, ThreadMessage, IAssistantsOptions>, IStreamingChatService, IStreamingGenerativeService<ConversationItem[], AssistantsApiEvent, ThreadMessage, IAssistantsOptions>, IDisposable

    Fields

    | Edit this page View Source

    Logger

    Declaration
    public ILogger Logger
    Field Value
    Type Description
    ILogger

    Properties

    | Edit this page View Source

    CurrentAssistant

    Declaration
    public Assistant CurrentAssistant { get; }
    Property Value
    Type Description
    Assistant
    | Edit this page View Source

    CurrentRun

    Declaration
    public Run CurrentRun { get; set; }
    Property Value
    Type Description
    Run
    | Edit this page View Source

    CurrentThread

    Declaration
    public Thread CurrentThread { get; }
    Property Value
    Type Description
    Thread
    | Edit this page View Source

    Settings

    Declaration
    public IAssistantsOptions Settings { get; }
    Property Value
    Type Description
    IAssistantsOptions

    Methods

    | Edit this page View Source

    CancelAsync()

    Declaration
    public override UniTask CancelAsync()
    Returns
    Type Description
    UniTask
    Overrides
    GenerativeServiceBase.CancelAsync()
    | Edit this page View Source

    ChangeThreadAsync(string, CancellationToken)

    Declaration
    public UniTask ChangeThreadAsync(string newThreadId, CancellationToken ct = default)
    Parameters
    Type Name Description
    string newThreadId
    CancellationToken ct
    Returns
    Type Description
    UniTask
    | Edit this page View Source

    GenerateAsync(ConversationItem[], IAssistantsOptions, CancellationToken)

    Declaration
    public UniTask<Generated<ThreadMessage>> GenerateAsync(ConversationItem[] input, IAssistantsOptions settings, CancellationToken ct = default)
    Parameters
    Type Name Description
    ConversationItem[] input
    IAssistantsOptions settings
    CancellationToken ct
    Returns
    Type Description
    UniTask<Generated<ThreadMessage>>
    | Edit this page View Source

    InitAsync(string, string, IAssistantsOptions, ILogger, CancellationToken)

    Declaration
    public UniTask InitAsync(string threadId, string assistantName, IAssistantsOptions settings, ILogger logger, CancellationToken ct = default)
    Parameters
    Type Name Description
    string threadId
    string assistantName
    IAssistantsOptions settings
    ILogger logger
    CancellationToken ct
    Returns
    Type Description
    UniTask
    | Edit this page View Source

    StreamAsync(ConversationItem[], IAssistantsOptions, CancellationToken)

    Starts a streaming generation request asynchronously.

    Declaration
    public UniTask<IGenerativeStream<AssistantsApiEvent, ThreadMessage>> StreamAsync(ConversationItem[] input, IAssistantsOptions settings, CancellationToken ct = default)
    Parameters
    Type Name Description
    ConversationItem[] input

    The input data.

    IAssistantsOptions settings

    The generation settings.

    CancellationToken ct

    The cancellation token.

    Returns
    Type Description
    UniTask<IGenerativeStream<AssistantsApiEvent, ThreadMessage>>

    A stream handle that emits deltas and eventually provides the final output.

    | Edit this page View Source

    UpdateAssistantAsync(CancellationToken)

    Declaration
    public UniTask UpdateAssistantAsync(CancellationToken ct = default)
    Parameters
    Type Name Description
    CancellationToken ct
    Returns
    Type Description
    UniTask

    Implements

    IAssistantsChatService
    IStreamingChatService<TDelta, TResult, TSettings>
    IStreamingChatService
    IStreamingGenerativeService<TInput, TDelta, TOutput, TSettings>
    IDisposable

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.TryDispose(IDisposable)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation