ThreadSession
public static class ThreadSession
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:362–426会话线程会话,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.agui.common 包。核心成员包括 getUserId、getThreadId、getAgentId、getAgent、getCreatedAt、getLastAccess。
Represents a thread session with its agent and metadata.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getUserId() | 获取用户标识。 Returns the user id. |
public String getThreadId() | 获取会话线程标识。 Returns the thread id. |
public String getAgentId() | 获取智能体标识。 Returns the agent id. |
public Agent getAgent() | 获取智能体。 Returns the agent. |
public Instant getCreatedAt() | 获取已创建 At。 Returns the created at. |
public Instant getLastAccess() | 获取最后访问。 Returns the last access. |
public String getName() | 获取名称。 Returns the name. |
public void setName(String name) | 设置名称。 Sets the name. |
public boolean isArchived() | 判断是否 `isArchived`。 Returns whether the archived. |
public void setArchived(boolean archived) | 设置 `setArchived`。 Sets the archived. |
public void updateLastAccess() | 更新最后访问。 Updates the last access. |
方法详情Method Detail
getUserId
public String getUserId()
获取用户标识。
Returns the user id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:383–385getThreadId
public String getThreadId()
获取会话线程标识。
Returns the thread id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:387–389getAgentId
public String getAgentId()
获取智能体标识。
Returns the agent id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:391–393getAgent
public Agent getAgent()
获取智能体。
Returns the agent.
Agent返回智能体。Returns agent.
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:395–397getCreatedAt
public Instant getCreatedAt()
获取已创建 At。
Returns the created at.
Instant返回Instant。Returns instant.
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:399–401getLastAccess
public Instant getLastAccess()
获取最后访问。
Returns the last access.
Instant返回Instant。Returns instant.
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:403–405getName
public String getName()
获取名称。
Returns the name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:407–409setName
public void setName(String name)
设置名称。
Sets the name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:411–413isArchived
public boolean isArchived()
判断是否 isArchived。
Returns whether the archived.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:415–417setArchived
public void setArchived(boolean archived)
设置 setArchived。
Sets the archived.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
archived | boolean | archived(类型 `boolean`)。The archived. |
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:419–421updateLastAccess
public void updateLastAccess()
更新最后访问。
Updates the last access.
源码Source
io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:423–425