PromptTokensDetails
@JsonIgnoreProperties(ignoreUnknown = true) public static class PromptTokensDetails
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIUsage.java:115–150提示词令牌数详情,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.extensions.model.openai.dto 包。核心成员包括 getCachedTokens、setCachedTokens、getCacheWriteTokens、setCacheWriteTokens、getAudioTokens、setAudioTokens。
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 getCacheWriteTokens() | 获取缓存写入令牌数。 Returns the cache write tokens. |
public void setCacheWriteTokens(Integer cacheWriteTokens) | 设置缓存写入令牌数。 Sets the cache write tokens. |
public Integer getAudioTokens() | 获取音频令牌数。 Returns the audio tokens. |
public void setAudioTokens(Integer audioTokens) | 设置音频令牌数。 Sets the audio tokens. |
方法详情Method Detail
getCachedTokens
public Integer getCachedTokens()
获取已缓存令牌数。
Returns the cached tokens.
Integer返回数值结果。Returns a numeric result.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIUsage.java:127–129setCachedTokens
public void setCachedTokens(Integer cachedTokens)
设置已缓存令牌数。
Sets the cached tokens.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
cachedTokens | Integer | 已缓存令牌数(类型 `Integer`)。The cached tokens. |
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIUsage.java:131–133getCacheWriteTokens
public Integer getCacheWriteTokens()
获取缓存写入令牌数。
Returns the cache write tokens.
Integer返回数值结果。Returns a numeric result.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIUsage.java:135–137setCacheWriteTokens
public void setCacheWriteTokens(Integer cacheWriteTokens)
设置缓存写入令牌数。
Sets the cache write tokens.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
cacheWriteTokens | Integer | 缓存写入令牌数(类型 `Integer`)。The cache write tokens. |
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIUsage.java:139–141getAudioTokens
public Integer getAudioTokens()
获取音频令牌数。
Returns the audio tokens.
Integer返回数值结果。Returns a numeric result.
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIUsage.java:143–145setAudioTokens
public void setAudioTokens(Integer audioTokens)
设置音频令牌数。
Sets the audio tokens.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
audioTokens | Integer | 音频令牌数(类型 `Integer`)。The audio tokens. |
源码Source
io/agentscope/extensions/model/openai/dto/OpenAIUsage.java:147–149