AS AgentScopeAPI 手册 / API Reference

Event

public class Event
源码Source io/agentscope/runtime/engine/schemas/Event.java:24–99

事件 in 智能体运行时的基类。位于 io.agentscope.runtime.engine.schemas 包。核心成员包括 getSequenceNumber、setSequenceNumber、getObject、setObject、getStatus、setStatus。

Base class for events in the agent runtime.

字段摘要Field Summary

字段Field类型Type说明Description
status
String
状态字段。
The status field.

方法摘要Method Summary

方法Method说明Description
public Integer getSequenceNumber()
获取 `getSequenceNumber`。
Returns the sequence number.
public void setSequenceNumber(Integer sequenceNumber)
设置 `setSequenceNumber`。
Sets the sequence number.
public String getObject()
获取对象。
Returns the object.
public void setObject(String object)
设置对象。
Sets the object.
public String getStatus()
获取状态。
Returns the status.
public void setStatus(String status)
设置状态。
Sets the status.
public Error getError()
获取错误。
Returns the error.
public void setError(Error error)
设置错误。
Sets the error.
public Event created()
返回已创建。
Returns the created.
public Event inProgress()
将响应状态设置为进行中。
Returns the in progress.
public Event completed()
返回已完成。
Returns the completed.
public Event failed(Error error)
设置失败。
Performs the failed operation.
public Event rejected()
返回已拒绝。
Returns the rejected.
public Event canceled()
返回 `canceled` 结果。
Returns the canceled.

字段详情Field Detail

status

@JsonProperty("status") protected String status

状态字段。声明为 @JsonProperty("status") protected String status。

The status field.

源码Source io/agentscope/runtime/engine/schemas/Event.java:31–32

方法详情Method Detail

getSequenceNumber

public Integer getSequenceNumber()

获取 getSequenceNumber。

Returns the sequence number.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/runtime/engine/schemas/Event.java:37–39

setSequenceNumber

public void setSequenceNumber(Integer sequenceNumber)

设置 setSequenceNumber。

Sets the sequence number.

参数Parameters
名称Name类型Type说明Description
sequenceNumberIntegersequence 数量(类型 `Integer`)。The sequence number.
源码Source io/agentscope/runtime/engine/schemas/Event.java:41–43

getObject

public String getObject()

获取对象。

Returns the object.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/engine/schemas/Event.java:45–47

setObject

public void setObject(String object)

设置对象。

Sets the object.

参数Parameters
名称Name类型Type说明Description
objectString对象(类型 `String`)。The object.
源码Source io/agentscope/runtime/engine/schemas/Event.java:49–51

getStatus

public String getStatus()

获取状态。

Returns the status.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/engine/schemas/Event.java:53–55

setStatus

public void setStatus(String status)

设置状态。

Sets the status.

参数Parameters
名称Name类型Type说明Description
statusString状态(类型 `String`)。The status.
源码Source io/agentscope/runtime/engine/schemas/Event.java:57–59

getError

public Error getError()

获取错误。

Returns the error.

返回Returns Error
返回错误。Returns error.
源码Source io/agentscope/runtime/engine/schemas/Event.java:61–63

setError

public void setError(Error error)

设置错误。

Sets the error.

参数Parameters
名称Name类型Type说明Description
errorError错误(类型 `Error`)。The error.
源码Source io/agentscope/runtime/engine/schemas/Event.java:65–67

created

public Event created()

返回已创建。

Returns the created.

返回Returns Event
返回事件。Returns event.
源码Source io/agentscope/runtime/engine/schemas/Event.java:69–72

inProgress

public Event inProgress()

将响应状态设置为进行中。

Returns the in progress.

返回Returns Event
返回事件。Returns event.
源码Source io/agentscope/runtime/engine/schemas/Event.java:74–77

completed

public Event completed()

返回已完成。

Returns the completed.

返回Returns Event
返回事件。Returns event.
源码Source io/agentscope/runtime/engine/schemas/Event.java:79–82

failed

public Event failed(Error error)

设置失败。

Performs the failed operation.

参数Parameters
名称Name类型Type说明Description
errorError错误(类型 `Error`)。The error.
返回Returns Event
返回事件。Returns event.
源码Source io/agentscope/runtime/engine/schemas/Event.java:84–88

rejected

public Event rejected()

返回已拒绝。

Returns the rejected.

返回Returns Event
返回事件。Returns event.
源码Source io/agentscope/runtime/engine/schemas/Event.java:90–93

canceled

public Event canceled()

返回 canceled 结果。

Returns the canceled.

返回Returns Event
返回事件。Returns event.
源码Source io/agentscope/runtime/engine/schemas/Event.java:95–98
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.