AS AgentScopeAPI 手册 / API Reference
类class agentscope.app.channel

CredentialBindingBase

class CredentialBindingBase
源码Source agentscope/app/channel/_credential_binding.py:81–114

凭证绑定基类,把智能体接入外部消息渠道与企业平台。位于 agentscope.app.channel 包。核心成员包括 begin、advance。

Subclasses are instantiated once per process and must stay stateless: two consecutive steps of one session routinely land on different replicas.

方法摘要Method Summary

方法Method说明Description
async def begin() -> BindingStepasync
返回 `begin` 结果。
Open a session and return what the operator must visit.
async def advance(provider_state: dict[str, Any]) -> BindingStepasync
设置该参数。
Ask the platform once whether the operator has approved.

方法详情Method Detail

begin

async def begin() -> BindingStep
async

返回 begin 结果。

Open a session and return what the operator must visit.

返回Returns BindingStep
返回BindingStep。`BindingStep`:
源码Source agentscope/app/channel/_credential_binding.py:89–98

advance

async def advance(provider_state: dict[str, Any]) -> BindingStep
async

设置该参数。

Called on the client's status poll rather than from a loop of our own, so nothing outlives the request that triggered it.

参数Parameters
名称Name类型Type说明Description
provider_statedict[str, Any]提供者状态(类型 `dict[str, Any]`)。What the previous step returned.
返回Returns BindingStep
返回BindingStep。`BindingStep`:
源码Source agentscope/app/channel/_credential_binding.py:100–114
基于官方固定版本源码静态生成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.