From 172710719048acd68f4cdee3701be2e7b03226ea Mon Sep 17 00:00:00 2001 From: chenchun Date: Wed, 7 Jan 2026 11:27:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BA=20Anthropic=20DTO=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20signature=E3=80=81stop=5Fsequence=E3=80=81cache=5Fc?= =?UTF-8?q?reation=20=E5=92=8C=20service=5Ftier=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 Yi.Framework.AiHub.Domain.Shared/Dtos/Anthropic/AnthropicChatCompletionDto.cs 中新增字段: - AnthropicChatCompletionDto: Signature、StopSequence(带 JsonPropertyName) - AnthropicChatCompletionDtoContentBlock: signature(小写字段) - AnthropicCompletionDtoUsage: CacheCreation、ServiceTier(带 JsonPropertyName) --- .../Dtos/Anthropic/AnthropicChatCompletionDto.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Dtos/Anthropic/AnthropicChatCompletionDto.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Dtos/Anthropic/AnthropicChatCompletionDto.cs index e6f6c0df..250bae92 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Dtos/Anthropic/AnthropicChatCompletionDto.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain.Shared/Dtos/Anthropic/AnthropicChatCompletionDto.cs @@ -39,6 +39,11 @@ public class AnthropicChatCompletionDtoDelta [JsonPropertyName("partial_json")] public string? PartialJson { get; set; } [JsonPropertyName("stop_reason")] public string? StopReason { get; set; } + + [JsonPropertyName("signature")] public string? Signature { get; set; } + + [JsonPropertyName("stop_sequence")] public string? StopSequence { get; set; } + } public class AnthropicChatCompletionDtoContentBlock @@ -103,6 +108,7 @@ public class AnthropicChatCompletionDtoContent [JsonPropertyName("partial_json")] public string? PartialJson { get; set; } public string? signature { get; set; } + } public class AnthropicCompletionDtoUsage @@ -118,6 +124,12 @@ public class AnthropicCompletionDtoUsage [JsonPropertyName("output_tokens")] public int? OutputTokens { get; set; } [JsonPropertyName("server_tool_use")] public AnthropicServerToolUse? ServerToolUse { get; set; } + + [JsonPropertyName("cache_creation")] public object? CacheCreation { get; set; } + + [JsonPropertyName("service_tier")] public string? ServiceTier { get; set; } + + } public class AnthropicServerToolUse