类class
agentscope.app.storageChannelBinding
class ChannelBinding(BaseModel)
源码Source
agentscope/app/storage/_model/_channel.py:39–59渠道绑定,在多次调用之间保存和恢复会话与记忆数据。位于 agentscope.app.storage 包。
Rules are evaluated in list order; the first match wins. The final
rule must be a catch-all (match_value == "*") — it carries the
channel's defaults.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
match_key | str | `match_key` 字段。 | 'chat_id' |
match_value | str | `match_value` 字段。 | '*' |
agent_id | str | 智能体标识字段。 | — |
session_scope | SessionScope | 会话范围字段。 | SessionScope.PER_CHAT |
属性详情Attribute Detail
match_key
str = 'chat_id'match_key 字段。声明为 str。
The match key field.
源码Source
agentscope/app/storage/_model/_channel.py:48match_value
str = '*'match_value 字段。声明为 str。
The match value field.
源码Source
agentscope/app/storage/_model/_channel.py:52agent_id
str智能体标识字段。声明为 str。
The agent id field.
源码Source
agentscope/app/storage/_model/_channel.py:55session_scope
SessionScope = SessionScope.PER_CHAT会话范围字段。声明为 SessionScope。
The session scope field.
源码Source
agentscope/app/storage/_model/_channel.py:58