Class AssistantsApiEvent
Implements
Inherited Members
Namespace: Glitch9.AIDevKit.OpenAI.Assistants
Assembly: Glitch9.AIDevKit.Provider.OpenAI.dll
Syntax
public sealed class AssistantsApiEvent : IEvent
Fields
| Edit this page View SourceDone
Declaration
public const string Done = "done"
Field Value
| Type | Description |
|---|---|
| string |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
ThreadRunExpired
Occurs when a run expires.
Data type is a Run.
Declaration
public const string ThreadRunExpired = "thread.run.expired"
Field Value
| Type | Description |
|---|---|
| string |
ThreadRunFailed
Occurs when a run fails.
Data type is a Run.
Declaration
public const string ThreadRunFailed = "thread.run.failed"
Field Value
| Type | Description |
|---|---|
| string |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 SourceDelta
Declaration
public ThreadMessageDelta Delta { get; }
Property Value
| Type | Description |
|---|---|
| ThreadMessageDelta |
Message
Declaration
public ThreadMessage Message { get; }
Property Value
| Type | Description |
|---|---|
| ThreadMessage |
MessageStatus
Declaration
public ResponseStatus? MessageStatus { get; }
Property Value
| Type | Description |
|---|---|
| ResponseStatus? |
Run
Declaration
public Run Run { get; }
Property Value
| Type | Description |
|---|---|
| Run |
RunStatus
Declaration
public RunStatus? RunStatus { get; }
Property Value
| Type | Description |
|---|---|
| RunStatus? |
Type
Declaration
public AssistantsApiEventType Type { get; }
Property Value
| Type | Description |
|---|---|
| AssistantsApiEventType |
Methods
| Edit this page View SourceCreateDoneEvent()
Declaration
public static AssistantsApiEvent CreateDoneEvent()
Returns
| Type | Description |
|---|---|
| AssistantsApiEvent |
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 |
CreateThreadMessageDeltaEvent(ThreadMessageDelta)
Declaration
public static AssistantsApiEvent CreateThreadMessageDeltaEvent(ThreadMessageDelta messageDelta)
Parameters
| Type | Name | Description |
|---|---|---|
| ThreadMessageDelta | messageDelta |
Returns
| Type | Description |
|---|---|
| AssistantsApiEvent |
CreateThreadMessageEvent(ThreadMessage, ResponseStatus)
Declaration
public static AssistantsApiEvent CreateThreadMessageEvent(ThreadMessage message, ResponseStatus messageStatus)
Parameters
| Type | Name | Description |
|---|---|---|
| ThreadMessage | message | |
| ResponseStatus | messageStatus |
Returns
| Type | Description |
|---|---|
| AssistantsApiEvent |