fix: 调整 Anthropic DTO 属性为可空类型以避免反序列化错误
This commit is contained in:
@@ -108,9 +108,9 @@ public sealed class AnthropicInput
|
|||||||
|
|
||||||
public class AnthropicThinkingInput
|
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
|
public class AnthropicTooChoiceInput
|
||||||
@@ -122,16 +122,16 @@ public class AnthropicTooChoiceInput
|
|||||||
|
|
||||||
public class AnthropicMessageTool
|
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("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
|
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; }
|
[JsonPropertyName("properties")] public Dictionary<string, InputSchemaValue>? Properties { get; set; }
|
||||||
|
|
||||||
@@ -140,9 +140,9 @@ public class Input_schema
|
|||||||
|
|
||||||
public class InputSchemaValue
|
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; }
|
public InputSchemaValueItems? items { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user