AS AgentScopeAPI 手册 / API Reference

CachedAccessToken

public record CachedAccessToken(String value, long refreshAtMs)
源码Source io/agentscope/extensions/channel/common/CachedAccessToken.java:29–34

承载已缓存访问令牌数据的记录类型。位于 io.agentscope.extensions.channel.common 包。核心成员包括 value、refreshAtMs、CachedAccessToken。

A platform access token together with the refresh deadline chosen by the provider that fetched it.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
valueString
执行值相关操作。
the token string accepted by the platform API; never `null` — absence of a token is represented by `AccessTokenStore#get()` returning `null`
refreshAtMslong
执行刷新 At Ms相关操作。
wall-clock epoch milliseconds after which the owning provider fetches a new token instead of returning this one

构造器摘要Constructor Summary

构造器Constructor说明Description
public CachedAccessToken(String value, long refreshAtMs)
初始化 `CachedAccessToken` 实例。
Creates a new instance.

记录组件详情Record Component Detail

value

String value

执行值相关操作。

the token string accepted by the platform API; never null — absence of a token is represented by AccessTokenStore#get() returning null

源码Source io/agentscope/extensions/channel/common/CachedAccessToken.java:29–34

refreshAtMs

long refreshAtMs

执行刷新 At Ms相关操作。

wall-clock epoch milliseconds after which the owning provider fetches a new token instead of returning this one

源码Source io/agentscope/extensions/channel/common/CachedAccessToken.java:29–34

构造器详情Constructor Detail

CachedAccessToken

public CachedAccessToken(String value, long refreshAtMs)

初始化 CachedAccessToken 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
valueString值(类型 `String`)。The value.
refreshAtMslong刷新 At Ms(类型 `long`)。The refresh at ms.
源码Source io/agentscope/extensions/channel/common/CachedAccessToken.java:31–33
基于官方固定版本源码静态生成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.