AS AgentScopeAPI 手册 / API Reference

PeerKind

public enum PeerKind
源码Source 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 #CHANNEL or #GROUP peer

枚举常量摘要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")
staticfinal

执行 DIRECT 方法。

Performs the DIRECT operation.

源码Source io/agentscope/harness/agent/gateway/channel/PeerKind.java:30

CHANNEL

CHANNEL("channel")
staticfinal

执行渠道相关操作。

Performs the CHANNEL operation.

源码Source io/agentscope/harness/agent/gateway/channel/PeerKind.java:31

GROUP

GROUP("group")
staticfinal

执行组相关操作。

Performs the GROUP operation.

源码Source io/agentscope/harness/agent/gateway/channel/PeerKind.java:32

THREAD

THREAD("thread")
staticfinal

执行会话线程相关操作。

Performs the THREAD operation.

源码Source io/agentscope/harness/agent/gateway/channel/PeerKind.java:33

方法详情Method Detail

value

public String value()

返回值。

Returns the value.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/gateway/channel/PeerKind.java:41–43

isDirect

public boolean isDirect()

判断是否 isDirect。

Whether this peer kind represents a direct (one-to-one) message.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/agent/gateway/channel/PeerKind.java:46–48

isThread

public boolean isThread()

判断是否会话线程。

Whether this peer kind represents a thread nested inside another peer.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/agent/gateway/channel/PeerKind.java:51–53
基于官方固定版本源码静态生成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.