你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AgentEventMessage interface

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

Example

  • 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.

Properties

data

The data of the event. The data can be of type AgentThreadOutput, ThreadRunOutput, RunStepOutput, ThreadMessageOutput, MessageDeltaChunk,RunStepDeltaChunk

event

The type of the event.

Property Details

data

The data of the event. The data can be of type AgentThreadOutput, ThreadRunOutput, RunStepOutput, ThreadMessageOutput, MessageDeltaChunk,RunStepDeltaChunk

data: AgentEventStreamData

Property Value

event

The type of the event.

event: string

Property Value

string