fix: 调整 Anthropic DTO 属性为可空类型以避免反序列化错误

This commit is contained in:
chenchun
2025-10-21 16:55:05 +08:00
parent cdbfc5383d
commit 1aaff2942d

View File

@@ -108,9 +108,9 @@ public sealed class AnthropicInput
public class AnthropicThinkingInput
{
[JsonPropertyName("type")] public string Type { get; set; }
[JsonPropertyName("type")] public string? Type { get; set; }
[JsonPropertyName("budget_tokens")] public int BudgetTokens { get; set; }
[JsonPropertyName("budget_tokens")] public int? BudgetTokens { get; set; }
}
public class AnthropicTooChoiceInput
@@ -122,16 +122,16 @@ public class AnthropicTooChoiceInput
public class AnthropicMessageTool
{
[JsonPropertyName("name")] public string name { get; set; }
[JsonPropertyName("name")] public string? name { get; set; }
[JsonPropertyName("description")] public string? Description { get; set; }
[JsonPropertyName("input_schema")] public Input_schema InputSchema { get; set; }
[JsonPropertyName("input_schema")] public Input_schema? InputSchema { get; set; }
}
public class Input_schema
{
[JsonPropertyName("type")] public string Type { get; set; }
[JsonPropertyName("type")] public string? Type { get; set; }
[JsonPropertyName("properties")] public Dictionary<string, InputSchemaValue>? Properties { get; set; }
@@ -140,9 +140,9 @@ public class Input_schema
public class InputSchemaValue
{
public string type { get; set; }
public string? type { get; set; }
public string description { get; set; }
public string? description { get; set; }
public InputSchemaValueItems? items { get; set; }
}