feat: 支持 x-api-key 认证并扩展 Anthropic 响应字段,优化工具调用处理
This commit is contained in:
@@ -169,7 +169,7 @@ public class AnthropicChatCompletionsService(
|
||||
|
||||
var result = JsonSerializer.Deserialize<AnthropicStreamDto>(data,
|
||||
ThorJsonSerializer.DefaultOptions);
|
||||
|
||||
|
||||
result.SupplementalMultiplier(AnthropicChatCompletionsService.ClaudeMultiplier);
|
||||
yield return (eventType, result);
|
||||
}
|
||||
|
||||
@@ -536,6 +536,11 @@ public sealed class ClaudiaChatCompletionsService(
|
||||
toolName = result.ContentBlock.Name;
|
||||
}
|
||||
|
||||
if (toolId is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
yield return new ThorChatCompletionsResponse()
|
||||
{
|
||||
Choices =
|
||||
|
||||
Reference in New Issue
Block a user