fix: address copilot comments
This commit is contained in:
@@ -17,7 +17,7 @@ class CitationConverter : JsonConverter<Citation>
|
||||
CitationType.CharacterLocation => JsonSerializer.Deserialize<CharacterLocationCitation>(root.GetRawText(), options)!,
|
||||
CitationType.PageLocation => JsonSerializer.Deserialize<PageLocationCitation>(root.GetRawText(), options)!,
|
||||
CitationType.ContentBlockLocation => JsonSerializer.Deserialize<ContentBlockLocationCitation>(root.GetRawText(), options)!,
|
||||
_ => throw new JsonException($"Unknown content type: {type}")
|
||||
_ => throw new JsonException($"Unknown citation type: {type}")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class SourceConverter : JsonConverter<Source>
|
||||
SourceType.Text => JsonSerializer.Deserialize<TextSource>(root.GetRawText(), options)!,
|
||||
SourceType.Content => JsonSerializer.Deserialize<CustomSource>(root.GetRawText(), options)!,
|
||||
SourceType.Base64 => DeserializeBase64Source(root, options),
|
||||
_ => throw new JsonException($"Unknown content type: {type}")
|
||||
_ => throw new JsonException($"Unknown source type: {type}")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ using AnthropicClient.Utils;
|
||||
namespace AnthropicClient.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an base64 source.
|
||||
/// Represents a base64 source.
|
||||
/// </summary>
|
||||
public class Base64Source : Source
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ public class ContentBlockLocationCitation : Citation
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the start block index of the citation.
|
||||
/// /// </summary>
|
||||
/// </summary>
|
||||
[JsonPropertyName("start_block_index")]
|
||||
public int StartBlockIndex { get; init; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user