PeerKind
public enum PeerKind
io/agentscope/harness/agent/gateway/channel/PeerKind.java:29–54定义对端种类相关取值的枚举。位于 io.agentscope.harness.agent.gateway.channel 包。核心成员包括 value、isDirect、isThread、DIRECT、CHANNEL、GROUP。
Classification of the conversation peer, used for session key construction and DM-scope resolution.
-
#DIRECT— one-to-one DM / private conversation -
#CHANNEL— public or private channel / room -
#GROUP— group chat (WhatsApp group, Telegram supergroup, etc.) -
#THREAD— thread nested inside a#CHANNELor#GROUPpeer
枚举常量摘要Enum Constant Summary
| 常量Constant | 说明Description |
|---|---|
DIRECT | 执行 `DIRECT` 方法。 Performs the DIRECT operation. |
CHANNEL | 执行渠道相关操作。 Performs the CHANNEL operation. |
GROUP | 执行组相关操作。 Performs the GROUP operation. |
THREAD | 执行会话线程相关操作。 Performs the THREAD operation. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String value() | 返回值。 Returns the value. |
public boolean isDirect() | 判断是否 `isDirect`。 Whether this peer kind represents a direct (one-to-one) message. |
public boolean isThread() | 判断是否会话线程。 Whether this peer kind represents a thread nested inside another peer. |
枚举常量详情Enum Constant Detail
DIRECT
DIRECT("direct")
执行 DIRECT 方法。
Performs the DIRECT operation.
io/agentscope/harness/agent/gateway/channel/PeerKind.java:30CHANNEL
CHANNEL("channel")
执行渠道相关操作。
Performs the CHANNEL operation.
io/agentscope/harness/agent/gateway/channel/PeerKind.java:31GROUP
GROUP("group")
执行组相关操作。
Performs the GROUP operation.
io/agentscope/harness/agent/gateway/channel/PeerKind.java:32THREAD
THREAD("thread")
执行会话线程相关操作。
Performs the THREAD operation.
io/agentscope/harness/agent/gateway/channel/PeerKind.java:33方法详情Method Detail
value
public String value()
返回值。
Returns the value.
Stringio/agentscope/harness/agent/gateway/channel/PeerKind.java:41–43isDirect
public boolean isDirect()
判断是否 isDirect。
Whether this peer kind represents a direct (one-to-one) message.
booleanio/agentscope/harness/agent/gateway/channel/PeerKind.java:46–48isThread
public boolean isThread()
判断是否会话线程。
Whether this peer kind represents a thread nested inside another peer.
booleanio/agentscope/harness/agent/gateway/channel/PeerKind.java:51–53