fix: 修正Claude聊天响应的Token统计逻辑并优化AiGateWayManager使用条件,同时移除前端无用环境变量定义
This commit is contained in:
@@ -225,7 +225,7 @@ public class AiGateWayManager : DomainService
|
||||
{
|
||||
await foreach (var data in completeChatResponse)
|
||||
{
|
||||
if (data.Usage is not null)
|
||||
if (data.Usage is not null&&(data.Usage.CompletionTokens>0||data.Usage.OutputTokens>0))
|
||||
{
|
||||
tokenUsage = data.Usage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user