From e351823f37828f93305884d60a5d6601db2eba08 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Tue, 8 Jul 2025 22:04:24 -0500 Subject: [PATCH] fix: address copilot comments --- src/AnthropicClient/Json/CitationConverter.cs | 2 +- src/AnthropicClient/Json/SourceConverter.cs | 2 +- src/AnthropicClient/Models/Base64Source.cs | 2 +- src/AnthropicClient/Models/ContentBlockLocationCitation.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AnthropicClient/Json/CitationConverter.cs b/src/AnthropicClient/Json/CitationConverter.cs index db4cf7c..baa6d9b 100644 --- a/src/AnthropicClient/Json/CitationConverter.cs +++ b/src/AnthropicClient/Json/CitationConverter.cs @@ -17,7 +17,7 @@ class CitationConverter : JsonConverter CitationType.CharacterLocation => JsonSerializer.Deserialize(root.GetRawText(), options)!, CitationType.PageLocation => JsonSerializer.Deserialize(root.GetRawText(), options)!, CitationType.ContentBlockLocation => JsonSerializer.Deserialize(root.GetRawText(), options)!, - _ => throw new JsonException($"Unknown content type: {type}") + _ => throw new JsonException($"Unknown citation type: {type}") }; } diff --git a/src/AnthropicClient/Json/SourceConverter.cs b/src/AnthropicClient/Json/SourceConverter.cs index f8dd163..a68fd70 100644 --- a/src/AnthropicClient/Json/SourceConverter.cs +++ b/src/AnthropicClient/Json/SourceConverter.cs @@ -17,7 +17,7 @@ class SourceConverter : JsonConverter SourceType.Text => JsonSerializer.Deserialize(root.GetRawText(), options)!, SourceType.Content => JsonSerializer.Deserialize(root.GetRawText(), options)!, SourceType.Base64 => DeserializeBase64Source(root, options), - _ => throw new JsonException($"Unknown content type: {type}") + _ => throw new JsonException($"Unknown source type: {type}") }; } diff --git a/src/AnthropicClient/Models/Base64Source.cs b/src/AnthropicClient/Models/Base64Source.cs index b175b7b..6a5f597 100644 --- a/src/AnthropicClient/Models/Base64Source.cs +++ b/src/AnthropicClient/Models/Base64Source.cs @@ -5,7 +5,7 @@ using AnthropicClient.Utils; namespace AnthropicClient.Models; /// -/// Represents an base64 source. +/// Represents a base64 source. /// public class Base64Source : Source { diff --git a/src/AnthropicClient/Models/ContentBlockLocationCitation.cs b/src/AnthropicClient/Models/ContentBlockLocationCitation.cs index f0383bb..701af71 100644 --- a/src/AnthropicClient/Models/ContentBlockLocationCitation.cs +++ b/src/AnthropicClient/Models/ContentBlockLocationCitation.cs @@ -9,7 +9,7 @@ public class ContentBlockLocationCitation : Citation { /// /// Gets the start block index of the citation. - /// /// + /// [JsonPropertyName("start_block_index")] public int StartBlockIndex { get; init; }