Uses of Class
com.bytedesk.ai.springai.service.ChatTokenUsage
Packages that use ChatTokenUsage
Package
Description
百 *
SpringAIBaiduChatConfig
- 百度 AI 服务配置类,包含API密钥和模型设置 AI 服务提供者集成包,包含与 Spring AI 框架集成的所有类和配置。自定 *
SpringAICustomChatController
- 自定义 AI 服务的REST API控制器 SpringAICustomChatConfig
- 自定义 AI 服务配置类,包含API端点、密钥和模型设置 AI 服务提供者集成包,包含与 Spring AI 框架集成的所有类和配置。DeepSeek AI 服务提供者集成包,包含与 Spring AI 框架集成的所有类和配置。
智谱 AI 服务提供者集成包,包含与 Spring AI 框架集成的所有类和配置。
Zhipuai package contains classes and utilities for Zhipuai API integration.
-
Uses of ChatTokenUsage in com.bytedesk.ai.springai.providers.baidu
Methods in com.bytedesk.ai.springai.providers.baidu that return ChatTokenUsageModifier and TypeMethodDescriptionprivate ChatTokenUsage
SpringAIBaiduChatService.estimateBaiduTokenUsageFromResponse
(org.springframework.ai.chat.model.ChatResponse response) 估算百度API的token使用量(当无法从API获取实际token信息时使用)private ChatTokenUsage
SpringAIBaiduService.estimateBaiduTokenUsageFromResponse
(org.springframework.ai.chat.model.ChatResponse response) 估算百度API的token使用量(当无法从API获取实际token信息时使用)private ChatTokenUsage
SpringAIBaiduChatService.estimateBaiduTokenUsageFromText
(String outputText) 从完整响应文本估算百度API的token使用量private ChatTokenUsage
SpringAIBaiduService.estimateBaiduTokenUsageFromText
(String outputText) 从完整响应文本估算百度API的token使用量private ChatTokenUsage
SpringAIBaiduChatService.extractBaiduTokenUsage
(org.springframework.ai.chat.model.ChatResponse response) 专门为百度API提取token使用情况 由于百度API返回的usage字段是EmptyUsage对象,需要特殊处理private ChatTokenUsage
SpringAIBaiduService.extractBaiduTokenUsage
(org.springframework.ai.chat.model.ChatResponse response) 专门为百度API提取token使用情况 由于百度API返回的usage字段是EmptyUsage对象,需要特殊处理 -
Uses of ChatTokenUsage in com.bytedesk.ai.springai.providers.custom
Methods in com.bytedesk.ai.springai.providers.custom that return ChatTokenUsageModifier and TypeMethodDescriptionprivate ChatTokenUsage
SpringAICustomService.estimateTokenUsageFromText
(String outputText) 从完整响应文本估算token使用量 -
Uses of ChatTokenUsage in com.bytedesk.ai.springai.providers.minimax
Methods in com.bytedesk.ai.springai.providers.minimax that return ChatTokenUsageModifier and TypeMethodDescriptionprivate ChatTokenUsage
SpringAIMinimaxChatService.extractDeepSeekTokenUsage
(org.springframework.ai.chat.model.ChatResponse response) 专门为Minimax API提取token使用情况 由于Minimax API返回的usage字段是EmptyUsage对象,需要特殊处理private ChatTokenUsage
SpringAIMinimaxService.extractMinimaxTokenUsage
(org.springframework.ai.chat.model.ChatResponse response) 专门为Minimax API提取token使用情况 由于Minimax API返回的usage字段是EmptyUsage对象,需要特殊处理 -
Uses of ChatTokenUsage in com.bytedesk.ai.springai.providers.zhipuai
Methods in com.bytedesk.ai.springai.providers.zhipuai that return ChatTokenUsageModifier and TypeMethodDescriptionprivate ChatTokenUsage
SpringAIZhipuaiChatService.estimateTokenUsageFromResponse
(org.springframework.ai.chat.model.ChatResponse response) 估算token使用量(当无法从API获取实际token信息时使用)private ChatTokenUsage
SpringAIZhipuaiChatService.extractZhipuaiTokenUsage
(org.springframework.ai.chat.model.ChatResponse response) 手动提取智谱AI的token使用情况 由于Spring AI ZhiPuAI集成可能无法正确解析token使用情况,我们手动提取 -
Uses of ChatTokenUsage in com.bytedesk.ai.springai.service
Methods in com.bytedesk.ai.springai.service that return ChatTokenUsageModifier and TypeMethodDescriptionprotected ChatTokenUsage
BaseSpringAIService.extractTokenUsage
(Object response) Extract token usage from ChatResponse metadata -
Uses of ChatTokenUsage in com.bytedesk.ai.zhipuai
Methods in com.bytedesk.ai.zhipuai that return ChatTokenUsageModifier and TypeMethodDescriptionprivate ChatTokenUsage
ZhipuaiService.estimateTokenUsageFromMessage
(String message) 从消息估算token使用量private ChatTokenUsage
ZhipuaiService.estimateTokenUsageFromResponse
(com.zhipu.oapi.service.v4.model.ModelApiResponse response) 估算token使用量(当无法从API获取实际token信息时使用)private ChatTokenUsage
ZhipuaiService.extractTokenUsageFromAccumulator
(com.zhipu.oapi.service.v4.model.ChatMessageAccumulator accumulator) 从ChatMessageAccumulator中提取token使用情况private ChatTokenUsage
ZhipuaiService.extractZhipuaiTokenUsage
(com.zhipu.oapi.service.v4.model.ModelApiResponse response) 手动提取智谱AI的token使用情况 从ModelApiResponse中提取token使用信息