AS AgentScopeAPI 手册 / API Reference

PromptTokensDetails

@JsonIgnoreProperties(ignoreUnknown = true) public static class PromptTokensDetails
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeUsage.java:154–180

提示词令牌数详情,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.dashscope.dto 包。核心成员包括 getCachedTokens、setCachedTokens、getCacheCreationInputTokens、setCacheCreationInputTokens。

Detailed breakdown of prompt tokens.

方法摘要Method Summary

方法Method说明Description
public Integer getCachedTokens()
获取已缓存令牌数。
Returns the cached tokens.
public void setCachedTokens(Integer cachedTokens)
设置已缓存令牌数。
Sets the cached tokens.
public Integer getCacheCreationInputTokens()
获取 `getCacheCreationInputTokens`。
Returns the cache creation input tokens.
public void setCacheCreationInputTokens(Integer cacheCreationInputTokens)
设置 `setCacheCreationInputTokens`。
Sets the cache creation input tokens.

方法详情Method Detail

getCachedTokens

public Integer getCachedTokens()

获取已缓存令牌数。

Returns the cached tokens.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeUsage.java:165–167

setCachedTokens

public void setCachedTokens(Integer cachedTokens)

设置已缓存令牌数。

Sets the cached tokens.

参数Parameters
名称Name类型Type说明Description
cachedTokensInteger已缓存令牌数(类型 `Integer`)。The cached tokens.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeUsage.java:169–171

getCacheCreationInputTokens

public Integer getCacheCreationInputTokens()

获取 getCacheCreationInputTokens。

Returns the cache creation input tokens.

返回Returns Integer
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeUsage.java:173–175

setCacheCreationInputTokens

public void setCacheCreationInputTokens(Integer cacheCreationInputTokens)

设置 setCacheCreationInputTokens。

Sets the cache creation input tokens.

参数Parameters
名称Name类型Type说明Description
cacheCreationInputTokensInteger缓存 Creation 输入令牌数(类型 `Integer`)。The cache creation input tokens.
源码Source io/agentscope/extensions/model/dashscope/dto/DashScopeUsage.java:177–179
基于官方固定版本源码静态生成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.