EventSource
@Deprecated(since = "2.0.0") @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public final class EventSource
源码Source
io/agentscope/core/agent/EventSource.java:110–273事件来源,驱动智能体的推理、工具调用与会话执行。位于 io.agentscope.core.agent 包。核心成员包括 builder、withAppendedPath、getAgentKey、getAgentId、getAgentName、getSessionId。
@deprecated since 2.0.0. Declared in io.agentscope.core.agent.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | `EventSource`的构建器。 Builder for `EventSource`. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static Builder builder()static | 返回构建器实例。 Returns the builder. |
public EventSource withAppendedPath(String segment) | 执行 `withAppendedPath` 方法。 Returns a new `EventSource` with `path` extended by `segment`, and
`depth` incremented by one. |
public String getAgentKey() | 获取智能体键。 Returns the agent key. |
public String getAgentId() | 获取智能体标识。 Returns the agent id. |
public String getAgentName() | 获取智能体名称。 Returns the agent name. |
public String getSessionId() | 获取会话标识。 Returns the session id. |
public String getParentSessionId() | 获取父级会话标识。 Returns the parent session id. |
public String getTaskId() | 获取任务标识。 Returns the task id. |
public int getDepth() | 获取 `getDepth`。 Returns the depth. |
public String getPath() | 获取路径。 Returns the path. |
public String toString() | 返回 `toString` 结果。 Returns the to string. |
方法详情Method Detail
builder
public static Builder builder()
static
返回构建器实例。
Returns the builder.
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/agent/EventSource.java:156–158withAppendedPath
public EventSource withAppendedPath(String segment)
执行 withAppendedPath 方法。
Returns a new EventSource with path extended by segment, and depth incremented by one.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
segment | String | segment(类型 `String`)。The segment. |
EventSource返回EventSource。Returns event source.
源码Source
io/agentscope/core/agent/EventSource.java:164–176getAgentKey
public String getAgentKey()
获取智能体键。
Returns the agent key.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agent/EventSource.java:178–180getAgentId
public String getAgentId()
获取智能体标识。
Returns the agent id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agent/EventSource.java:182–184getAgentName
public String getAgentName()
获取智能体名称。
Returns the agent name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agent/EventSource.java:186–188getSessionId
public String getSessionId()
获取会话标识。
Returns the session id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agent/EventSource.java:190–192getParentSessionId
public String getParentSessionId()
获取父级会话标识。
Returns the parent session id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agent/EventSource.java:194–196getTaskId
public String getTaskId()
获取任务标识。
Returns the task id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agent/EventSource.java:198–200getDepth
public int getDepth()
获取 getDepth。
Returns the depth.
int返回数值结果。Returns a numeric result.
源码Source
io/agentscope/core/agent/EventSource.java:202–204getPath
public String getPath()
获取路径。
Returns the path.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agent/EventSource.java:206–208toString
public String toString()
返回 toString 结果。
Returns the to string.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agent/EventSource.java:210–213嵌套类详情Nested Class Detail
Builder
public static final class BuilderEventSource的构建器。位于 io.agentscope.core.agent 包。核心成员包括 agentKey、agentId、agentName、sessionId、parentSessionId、taskId。
Builder for EventSource.