Search Results for

    Show / Hide Table of Contents

    Class AssistantsApiEvent

    Inheritance
    object
    AssistantsApiEvent
    Implements
    IEvent
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.OpenAI.Assistants
    Assembly: Glitch9.AIDevKit.Provider.OpenAI.dll
    Syntax
    public sealed class AssistantsApiEvent : IEvent

    Fields

    | Edit this page View Source

    Done

    Declaration
    public const string Done = "done"
    Field Value
    Type Description
    string
    | Edit this page View Source

    Error

    Occurs when an error occurs. This can happen due to an internal server error or a timeout.

    Data type is a CloudApiError.

    Declaration
    public const string Error = "error"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadCreated

    Occurs when a new thread is created.

    Data type is a Thread.

    Declaration
    public const string ThreadCreated = "thread.created"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadMessageCompleted

    Occurs when a message is completed.

    Data type is a ThreadMessage.

    Declaration
    public const string ThreadMessageCompleted = "thread.message.completed"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadMessageCreated

    Occurs when a message is created.

    Data type is a ThreadMessage.

    Declaration
    public const string ThreadMessageCreated = "thread.message.created"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadMessageDelta

    Occurs when parts of a Message are being streamed.

    Data type is a OpenAIClient.ThreadMessageDelta.

    Declaration
    public const string ThreadMessageDelta = "thread.message.delta"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadMessageInProgress

    Occurs when a message moves to an in_progress state.

    Data type is a ThreadMessage.

    Declaration
    public const string ThreadMessageInProgress = "thread.message.in_progress"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadMessageIncomplete

    Occurs when a message ends before it is completed.

    Data type is a ThreadMessage.

    Declaration
    public const string ThreadMessageIncomplete = "thread.message.incomplete"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunCancelled

    Occurs when a run is cancelled.

    Data type is a Run.

    Declaration
    public const string ThreadRunCancelled = "thread.run.cancelled"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunCancelling

    Occurs when a run moves to a cancelling status.

    Data type is a Run.

    Declaration
    public const string ThreadRunCancelling = "thread.run.cancelling"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunCompleted

    Occurs when a run is completed.

    Data type is a Run.

    Declaration
    public const string ThreadRunCompleted = "thread.run.completed"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunCreated

    Occurs when a new run is created.

    Data type is a Run.

    Declaration
    public const string ThreadRunCreated = "thread.run.created"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunExpired

    Occurs when a run expires.

    Data type is a Run.

    Declaration
    public const string ThreadRunExpired = "thread.run.expired"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunFailed

    Occurs when a run fails.

    Data type is a Run.

    Declaration
    public const string ThreadRunFailed = "thread.run.failed"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunInProgress

    Occurs when a run moves to an in_progress status.

    Data type is a Run.

    Declaration
    public const string ThreadRunInProgress = "thread.run.in_progress"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunIncomplete

    Occurs when a run ends with status incomplete.

    Data type is a Run.

    Declaration
    public const string ThreadRunIncomplete = "thread.run.incomplete"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunQueued

    Occurs when a run moves to a queued status.

    Data type is a Run.

    Declaration
    public const string ThreadRunQueued = "thread.run.queued"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunRequiresAction

    Occurs when a run moves to a requires_action status.

    Data type is a Run.

    Declaration
    public const string ThreadRunRequiresAction = "thread.run.requires_action"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunStepCancelled

    Occurs when a run step is cancelled.

    Data type is a RunStep.

    Declaration
    public const string ThreadRunStepCancelled = "thread.run.step.cancelled"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunStepCompleted

    Occurs when a run step is completed.

    Data type is a RunStep.

    Declaration
    public const string ThreadRunStepCompleted = "thread.run.step.completed"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunStepCreated

    Occurs when a run step is created.

    Data type is a RunStep.

    Declaration
    public const string ThreadRunStepCreated = "thread.run.step.created"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunStepDelta

    Occurs when parts of a run step are being streamed.

    Data type is a RunStepDelta.

    Declaration
    public const string ThreadRunStepDelta = "thread.run.step.delta"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunStepExpired

    Occurs when a run step expires.

    Data type is a RunStep.

    Declaration
    public const string ThreadRunStepExpired = "thread.run.step.expired"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunStepFailed

    Occurs when a run step fails.

    Data type is a RunStep.

    Declaration
    public const string ThreadRunStepFailed = "thread.run.step.failed"
    Field Value
    Type Description
    string
    | Edit this page View Source

    ThreadRunStepInProgress

    Occurs when a run step moves to an in_progress state.

    Data type is a RunStep.

    Declaration
    public const string ThreadRunStepInProgress = "thread.run.step.in_progress"
    Field Value
    Type Description
    string

    Properties

    | Edit this page View Source

    Delta

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

    Message

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

    MessageStatus

    Declaration
    public ResponseStatus? MessageStatus { get; }
    Property Value
    Type Description
    ResponseStatus?
    | Edit this page View Source

    Run

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

    RunStatus

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

    Type

    Declaration
    public AssistantsApiEventType Type { get; }
    Property Value
    Type Description
    AssistantsApiEventType

    Methods

    | Edit this page View Source

    CreateDoneEvent()

    Declaration
    public static AssistantsApiEvent CreateDoneEvent()
    Returns
    Type Description
    AssistantsApiEvent
    | Edit this page View Source

    CreateRunStatusEvent(RunStatus, Run)

    Declaration
    public static AssistantsApiEvent CreateRunStatusEvent(RunStatus runStatus, Run run = null)
    Parameters
    Type Name Description
    RunStatus runStatus
    Run run
    Returns
    Type Description
    AssistantsApiEvent
    | Edit this page View Source

    CreateThreadMessageDeltaEvent(ThreadMessageDelta)

    Declaration
    public static AssistantsApiEvent CreateThreadMessageDeltaEvent(ThreadMessageDelta messageDelta)
    Parameters
    Type Name Description
    ThreadMessageDelta messageDelta
    Returns
    Type Description
    AssistantsApiEvent
    | Edit this page View Source

    CreateThreadMessageEvent(ThreadMessage, ResponseStatus)

    Declaration
    public static AssistantsApiEvent CreateThreadMessageEvent(ThreadMessage message, ResponseStatus messageStatus)
    Parameters
    Type Name Description
    ThreadMessage message
    ResponseStatus messageStatus
    Returns
    Type Description
    AssistantsApiEvent

    Implements

    IEvent

    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.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation