次の方法で共有


AgentStreamEvent Struct

Definition

Each event in a server-sent events stream has an event and data property:

event: thread.created
data: {"id": "thread_123", "object": "thread", ...}

We emit events whenever a new object is created, transitions to a new state, or is being streamed in parts (deltas). For example, we emit thread.run.created when a new run is created, thread.run.completed when a run completes, and so on. When an Agent chooses to create a message during a run, we emit a thread.message.created event, a thread.message.in_progress event, many thread.message.delta events, and finally a thread.message.completed event.

We may add additional events over time, so we recommend handling unknown events gracefully in your code.

public readonly struct AgentStreamEvent : IEquatable<Azure.AI.Projects.AgentStreamEvent>
type AgentStreamEvent = struct
Public Structure AgentStreamEvent
Implements IEquatable(Of AgentStreamEvent)
Inheritance
AgentStreamEvent
Implements

Constructors

AgentStreamEvent(String)

Initializes a new instance of AgentStreamEvent.

Properties

Done

Event sent when the stream is done.

Error

Event sent when an error occurs, such as an internal server error or a timeout.

ThreadCreated

Event sent when a new thread is created. The data of this event is of type AgentThread.

ThreadMessageCompleted

Event sent when a message is completed. The data of this event is of type ThreadMessage.

ThreadMessageCreated

Event sent when a new message is created. The data of this event is of type ThreadMessage.

ThreadMessageDelta

Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk.

ThreadMessageIncomplete

Event sent before a message is completed. The data of this event is of type ThreadMessage.

ThreadMessageInProgress

Event sent when a message moves to in_progress status. The data of this event is of type ThreadMessage.

ThreadRunCancelled

Event sent when a run is cancelled. The data of this event is of type ThreadRun.

ThreadRunCancelling

Event sent when a run moves to cancelling status. The data of this event is of type ThreadRun.

ThreadRunCompleted

Event sent when a run is completed. The data of this event is of type ThreadRun.

ThreadRunCreated

Event sent when a new run is created. The data of this event is of type ThreadRun.

ThreadRunExpired

Event sent when a run is expired. The data of this event is of type ThreadRun.

ThreadRunFailed

Event sent when a run fails. The data of this event is of type ThreadRun.

ThreadRunInProgress

Event sent when a run moves to in_progress status. The data of this event is of type ThreadRun.

ThreadRunQueued

Event sent when a run moves to queued status. The data of this event is of type ThreadRun.

ThreadRunRequiresAction

Event sent when a run moves to requires_action status. The data of this event is of type ThreadRun.

ThreadRunStepCancelled

Event sent when a run step is cancelled. The data of this event is of type RunStep.

ThreadRunStepCompleted

Event sent when a run step is completed. The data of this event is of type RunStep.

ThreadRunStepCreated

Event sent when a new thread run step is created. The data of this event is of type RunStep.

ThreadRunStepDelta

Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk.

ThreadRunStepExpired

Event sent when a run step is expired. The data of this event is of type RunStep.

ThreadRunStepFailed

Event sent when a run step fails. The data of this event is of type RunStep.

ThreadRunStepInProgress

Event sent when a run step moves to in_progress status. The data of this event is of type RunStep.

Methods

Equals(AgentStreamEvent)

Indicates whether the current object is equal to another object of the same type.

ToString()

Returns the fully qualified type name of this instance.

Operators

Equality(AgentStreamEvent, AgentStreamEvent)

Determines if two AgentStreamEvent values are the same.

Implicit(String to AgentStreamEvent)

Converts a String to a AgentStreamEvent.

Inequality(AgentStreamEvent, AgentStreamEvent)

Determines if two AgentStreamEvent values are not the same.

Applies to