自动生成
此文档由 make doc-gen 命令从 Python 源码注释自动生成。
Model
Credential 模型定义 / Credential Model Definitions
定义凭证相关的数据模型和枚举。 Defines data models and enumerations related to credentials.
类
CredentialAuthType
class CredentialAuthType(str, Enum)
凭证认证类型 / Credential Authentication Type
CredentialSourceType
class CredentialSourceType(str, Enum)
凭证来源类型 / Credential Source Type
CredentialBasicAuth
class CredentialBasicAuth(BaseModel)
RelatedResource
class RelatedResource(BaseModel)
CredentialConfigInner
class CredentialConfigInner(BaseModel)
CredentialConfig
class CredentialConfig(CredentialConfigInner)
凭证配置
方法
🔹 inbound_api_key
def inbound_api_key(cls, api_key: str, header_key: str = 'Authorization')
配置访问 AgentRun 的 api key 凭证
🔹 inbound_static_jwt
def inbound_static_jwt(cls, jwks: str)
配置访问 AgentRun 的静态 JWKS 凭证
🔹 inbound_remote_jwt
def inbound_remote_jwt(cls, uri: str, timeout: int = 3000, ttl: int = 30000, **kwargs)
配置访问 AgentRun 的远程 JWT 凭证
🔹 inbound_basic
def inbound_basic(cls, users: List[CredentialBasicAuth])
配置访问 AgentRun 的 Basic 凭证
🔹 outbound_llm_api_key
def outbound_llm_api_key(cls, api_key: str, provider: str)
配置访问第三方模型的 api key 凭证
🔹 outbound_tool_api_key
def outbound_tool_api_key(cls, api_key: str)
配置访问第三方工具的 api key 凭证
🔹 outbound_tool_ak_sk
def outbound_tool_ak_sk(cls, provider: str, access_key_id: str, access_key_secred: str, account_id: str)
配置访问第三方工具的 ak/sk 凭证
🔹 outbound_tool_ak_sk_custom
def outbound_tool_ak_sk_custom(cls, auth_config: Dict[str, str])
配置访问第三方工具的自定义凭证
🔹 outbound_tool_custom_header
def outbound_tool_custom_header(cls, headers: Dict[str, str])
配置访问第三方工具的自定义 Header 凭证
CredentialMutableProps
class CredentialMutableProps(BaseModel)
凭证公共配置
CredentialImmutableProps
class CredentialImmutableProps(BaseModel)
CredentialSystemProps
class CredentialSystemProps(CredentialConfigInner)
CredentialCreateInput
class CredentialCreateInput(CredentialImmutableProps, CredentialMutableProps)
凭证创建输入参数
CredentialUpdateInput
class CredentialUpdateInput(CredentialMutableProps)
CredentialListInput
class CredentialListInput(PageableInput)
CredentialListOutput
class CredentialListOutput(BaseModel)
方法
🔹 to_credential_async
async def to_credential_async(self, config: Optional[Config] = None)
🔹 to_credential
def to_credential(self, config: Optional[Config] = None)