类class
agentscope.app.channelCredentialBindingBase
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.
BindingStep
返回BindingStep。`BindingStep`:
源码Source
agentscope/app/channel/_credential_binding.py:89–98advance
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_state | dict[str, Any] | 提供者状态(类型 `dict[str, Any]`)。What the previous step returned. |
BindingStep
返回BindingStep。`BindingStep`:
源码Source
agentscope/app/channel/_credential_binding.py:100–114