类class
agentscope.eventUserInterruptEvent
class UserInterruptEvent(EventBase)
源码Source
agentscope/event/_event.py:495–517用户中断事件,描述执行过程中的事件。位于 agentscope.event 包,继承自 EventBase。
Delivered to :meth:Agent.reply_stream (or :meth:Agent.reply) to
abort a reply that is currently waiting on external input — either
user confirmation (:class:RequireUserConfirmEvent) or external
execution (:class:RequireExternalExecutionEvent).
On receipt, the agent closes every pending tool call with an
interrupted tool result, emits a fallback assistant message, ends
the reply with :attr:ReplyEndReason.INTERRUPTED, and does not
enter the reasoning-acting loop.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
type | Literal[EventType.USER_INTERRUPT] | 类型字段。 | EventType.USER_INTERRUPT |
reply_id | str | 回复标识字段。 | — |
属性详情Attribute Detail
type
Literal[EventType.USER_INTERRUPT] = EventType.USER_INTERRUPT类型字段。声明为 Literal[EventType.USER_INTERRUPT]。
The type field.
源码Source
agentscope/event/_event.py:514reply_id
str回复标识字段。声明为 str。
The reply id field.
源码Source
agentscope/event/_event.py:516