docs: add missing xml comments
This commit is contained in:
@@ -2,9 +2,19 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents an event from the Anthropic API.
|
||||||
|
/// </summary>
|
||||||
public class AnthropicEvent
|
public class AnthropicEvent
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The type of the event.
|
||||||
|
/// </summary>
|
||||||
public string Type { get; init; } = string.Empty;
|
public string Type { get; init; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The data associated with the event.
|
||||||
|
/// </summary>
|
||||||
public EventData Data { get; init; } = default!;
|
public EventData Data { get; init; } = default!;
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
@@ -12,6 +22,12 @@ public class AnthropicEvent
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="AnthropicEvent"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type">The type of the event.</param>
|
||||||
|
/// <param name="data">The data associated with the event.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="AnthropicEvent"/> class.</returns>
|
||||||
public AnthropicEvent(string type, EventData data)
|
public AnthropicEvent(string type, EventData data)
|
||||||
{
|
{
|
||||||
Type = type;
|
Type = type;
|
||||||
|
|||||||
@@ -1,9 +1,20 @@
|
|||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a content delta.
|
||||||
|
/// </summary>
|
||||||
public abstract class ContentDelta
|
public abstract class ContentDelta
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the type of the content delta.
|
||||||
|
/// </summary>
|
||||||
public string Type { get; init; }
|
public string Type { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ContentDelta"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type">The type of the content delta.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="ContentDelta"/> class.</returns>
|
||||||
protected ContentDelta(string type)
|
protected ContentDelta(string type)
|
||||||
{
|
{
|
||||||
Type = type;
|
Type = type;
|
||||||
|
|||||||
@@ -2,9 +2,19 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for a content_block_delta event.
|
||||||
|
/// </summary>
|
||||||
public class ContentDeltaEventData : EventData
|
public class ContentDeltaEventData : EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the index of the content block.
|
||||||
|
/// </summary>
|
||||||
public int Index { get; init; }
|
public int Index { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the content delta.
|
||||||
|
/// </summary>
|
||||||
public ContentDelta Delta { get; init; } = default!;
|
public ContentDelta Delta { get; init; } = default!;
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
@@ -12,6 +22,12 @@ public class ContentDeltaEventData : EventData
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ContentDeltaEventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="index">The index of the content block.</param>
|
||||||
|
/// <param name="delta">The content delta.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="ContentDeltaEventData"/> class.</returns>
|
||||||
public ContentDeltaEventData(int index, ContentDelta delta) : base(EventType.ContentBlockDelta)
|
public ContentDeltaEventData(int index, ContentDelta delta) : base(EventType.ContentBlockDelta)
|
||||||
{
|
{
|
||||||
Index = index;
|
Index = index;
|
||||||
|
|||||||
@@ -1,7 +1,17 @@
|
|||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Provides constants for content delta types.
|
||||||
|
/// </summary>
|
||||||
public static class ContentDeltaType
|
public static class ContentDeltaType
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The text_delta.
|
||||||
|
/// </summary>
|
||||||
public const string TextDelta = "text_delta";
|
public const string TextDelta = "text_delta";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The input_json_delta.
|
||||||
|
/// </summary>
|
||||||
public const string JsonDelta = "input_json_delta";
|
public const string JsonDelta = "input_json_delta";
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,19 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for a content_block_start event.
|
||||||
|
/// </summary>
|
||||||
public class ContentStartEventData : EventData
|
public class ContentStartEventData : EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the index of the content block.
|
||||||
|
/// </summary>
|
||||||
public int Index { get; init; }
|
public int Index { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the content block.
|
||||||
|
/// </summary>
|
||||||
[JsonPropertyName("content_block")]
|
[JsonPropertyName("content_block")]
|
||||||
public Content ContentBlock { get; init; } = default!;
|
public Content ContentBlock { get; init; } = default!;
|
||||||
|
|
||||||
@@ -14,6 +23,12 @@ public class ContentStartEventData : EventData
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ContentStartEventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="index">The index of the content block.</param>
|
||||||
|
/// <param name="contentBlock">The content block.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="ContentStartEventData"/> class.</returns>
|
||||||
public ContentStartEventData(int index, Content contentBlock) : base(EventType.ContentBlockStart)
|
public ContentStartEventData(int index, Content contentBlock) : base(EventType.ContentBlockStart)
|
||||||
{
|
{
|
||||||
Index = index;
|
Index = index;
|
||||||
|
|||||||
@@ -2,8 +2,14 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for a content_block_stop event.
|
||||||
|
/// </summary>
|
||||||
public class ContentStopEventData : EventData
|
public class ContentStopEventData : EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the index of the content block.
|
||||||
|
/// </summary>
|
||||||
public int Index { get; init; }
|
public int Index { get; init; }
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
@@ -11,6 +17,11 @@ public class ContentStopEventData : EventData
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ContentStopEventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="index">The index of the content block.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="ContentStopEventData"/> class.</returns>
|
||||||
public ContentStopEventData(int index) : base(EventType.ContentBlockStop)
|
public ContentStopEventData(int index) : base(EventType.ContentBlockStop)
|
||||||
{
|
{
|
||||||
Index = index;
|
Index = index;
|
||||||
|
|||||||
@@ -2,8 +2,14 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for an error event.
|
||||||
|
/// </summary>
|
||||||
public class ErrorEventData : EventData
|
public class ErrorEventData : EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the error.
|
||||||
|
/// </summary>
|
||||||
public Error Error { get; init; } = default!;
|
public Error Error { get; init; } = default!;
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
@@ -11,6 +17,11 @@ public class ErrorEventData : EventData
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ErrorEventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="error">The error.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="ErrorEventData"/> class.</returns>
|
||||||
public ErrorEventData(Error error) : base(EventType.Error)
|
public ErrorEventData(Error error) : base(EventType.Error)
|
||||||
{
|
{
|
||||||
Error = error;
|
Error = error;
|
||||||
|
|||||||
@@ -1,9 +1,20 @@
|
|||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for an event.
|
||||||
|
/// </summary>
|
||||||
public abstract class EventData
|
public abstract class EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the type of the event.
|
||||||
|
/// </summary>
|
||||||
public string Type { get; init; }
|
public string Type { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="EventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type">The type of the event.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="EventData"/> class.</returns>
|
||||||
protected EventData(string type)
|
protected EventData(string type)
|
||||||
{
|
{
|
||||||
Type = type;
|
Type = type;
|
||||||
|
|||||||
@@ -1,14 +1,52 @@
|
|||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Provides constants for event types.
|
||||||
|
/// </summary>
|
||||||
public static class EventType
|
public static class EventType
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the error event type.
|
||||||
|
/// </summary>
|
||||||
public const string Error = "error";
|
public const string Error = "error";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the ping event type.
|
||||||
|
/// </summary>
|
||||||
public const string Ping = "ping";
|
public const string Ping = "ping";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the message_start event type.
|
||||||
|
/// </summary>
|
||||||
public const string MessageStart = "message_start";
|
public const string MessageStart = "message_start";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the message_delta event type.
|
||||||
|
/// </summary>
|
||||||
public const string MessageDelta = "message_delta";
|
public const string MessageDelta = "message_delta";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the message_stop event type.
|
||||||
|
/// </summary>
|
||||||
public const string MessageStop = "message_stop";
|
public const string MessageStop = "message_stop";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the message_complete event type.
|
||||||
|
/// </summary>
|
||||||
public const string MessageComplete = "message_complete";
|
public const string MessageComplete = "message_complete";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the content_block_start event type.
|
||||||
|
/// </summary>
|
||||||
public const string ContentBlockStart = "content_block_start";
|
public const string ContentBlockStart = "content_block_start";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the content_block_delta event type.
|
||||||
|
/// </summary>
|
||||||
public const string ContentBlockDelta = "content_block_delta";
|
public const string ContentBlockDelta = "content_block_delta";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the content_block_stop event type.
|
||||||
|
/// </summary>
|
||||||
public const string ContentBlockStop = "content_block_stop";
|
public const string ContentBlockStop = "content_block_stop";
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,14 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a JSON delta.
|
||||||
|
/// </summary>
|
||||||
public class JsonDelta : ContentDelta
|
public class JsonDelta : ContentDelta
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the partial JSON.
|
||||||
|
/// </summary>
|
||||||
[JsonPropertyName("partial_json")]
|
[JsonPropertyName("partial_json")]
|
||||||
public string PartialJson { get; init; } = string.Empty;
|
public string PartialJson { get; init; } = string.Empty;
|
||||||
|
|
||||||
@@ -12,6 +18,11 @@ public class JsonDelta : ContentDelta
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="JsonDelta"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="partialJson">The partial JSON.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="JsonDelta"/> class.</returns>
|
||||||
public JsonDelta(string partialJson) : base(ContentDeltaType.JsonDelta)
|
public JsonDelta(string partialJson) : base(ContentDeltaType.JsonDelta)
|
||||||
{
|
{
|
||||||
PartialJson = partialJson;
|
PartialJson = partialJson;
|
||||||
|
|||||||
@@ -1,10 +1,26 @@
|
|||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for the message_complete event.
|
||||||
|
/// </summary>
|
||||||
public class MessageCompleteEventData : EventData
|
public class MessageCompleteEventData : EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the anthropic headers.
|
||||||
|
/// </summary>
|
||||||
public AnthropicHeaders Headers { get; init; }
|
public AnthropicHeaders Headers { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the chat response message.
|
||||||
|
/// </summary>
|
||||||
public ChatResponse Message { get; init; }
|
public ChatResponse Message { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="MessageCompleteEventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message">The chat response message.</param>
|
||||||
|
/// <param name="headers">The anthropic headers.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="MessageCompleteEventData"/> class.</returns>
|
||||||
public MessageCompleteEventData(ChatResponse message, AnthropicHeaders headers) : base(EventType.MessageComplete)
|
public MessageCompleteEventData(ChatResponse message, AnthropicHeaders headers) : base(EventType.MessageComplete)
|
||||||
{
|
{
|
||||||
Message = message;
|
Message = message;
|
||||||
|
|||||||
@@ -2,9 +2,19 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for a message_delta event.
|
||||||
|
/// </summary>
|
||||||
public class MessageDeltaEventData : EventData
|
public class MessageDeltaEventData : EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the message delta.
|
||||||
|
/// </summary>
|
||||||
public MessageDelta Delta { get; init; } = new();
|
public MessageDelta Delta { get; init; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the chat usage.
|
||||||
|
/// </summary>
|
||||||
public ChatUsage Usage { get; init; } = new();
|
public ChatUsage Usage { get; init; } = new();
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
@@ -12,6 +22,12 @@ public class MessageDeltaEventData : EventData
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="MessageDeltaEventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="delta">The message delta.</param>
|
||||||
|
/// <param name="usage">The chat usage.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="MessageDeltaEventData"/> class.</returns>
|
||||||
public MessageDeltaEventData(MessageDelta delta, ChatUsage usage) : base(EventType.MessageDelta)
|
public MessageDeltaEventData(MessageDelta delta, ChatUsage usage) : base(EventType.MessageDelta)
|
||||||
{
|
{
|
||||||
Delta = delta;
|
Delta = delta;
|
||||||
@@ -19,11 +35,20 @@ public class MessageDeltaEventData : EventData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a message delta.
|
||||||
|
/// </summary>
|
||||||
public class MessageDelta
|
public class MessageDelta
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the stop reason.
|
||||||
|
/// </summary>
|
||||||
[JsonPropertyName("stop_reason")]
|
[JsonPropertyName("stop_reason")]
|
||||||
public string StopReason { get; init; } = string.Empty;
|
public string StopReason { get; init; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the stop sequence.
|
||||||
|
/// </summary>
|
||||||
[JsonPropertyName("stop_sequence")]
|
[JsonPropertyName("stop_sequence")]
|
||||||
public string StopSequence { get; init; } = string.Empty;
|
public string StopSequence { get; init; } = string.Empty;
|
||||||
|
|
||||||
@@ -32,6 +57,12 @@ public class MessageDelta
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="MessageDelta"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="stopReason">The stop reason.</param>
|
||||||
|
/// <param name="stopSequence">The stop sequence.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="MessageDelta"/> class.</returns>
|
||||||
public MessageDelta(string stopReason, string stopSequence)
|
public MessageDelta(string stopReason, string stopSequence)
|
||||||
{
|
{
|
||||||
StopReason = stopReason;
|
StopReason = stopReason;
|
||||||
|
|||||||
@@ -2,8 +2,14 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for a message_start event.
|
||||||
|
/// </summary>
|
||||||
public class MessageStartEventData : EventData
|
public class MessageStartEventData : EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the message.
|
||||||
|
/// </summary>
|
||||||
public ChatResponse Message { get; init; } = new();
|
public ChatResponse Message { get; init; } = new();
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
@@ -11,6 +17,11 @@ public class MessageStartEventData : EventData
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="MessageStartEventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message">The message.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="MessageStartEventData"/> class.</returns>
|
||||||
public MessageStartEventData(ChatResponse message) : base(EventType.MessageStart)
|
public MessageStartEventData(ChatResponse message) : base(EventType.MessageStart)
|
||||||
{
|
{
|
||||||
Message = message;
|
Message = message;
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for a message_stop event.
|
||||||
|
/// </summary>
|
||||||
public class MessageStopEventData : EventData
|
public class MessageStopEventData : EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="MessageStopEventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A new instance of the <see cref="MessageStopEventData"/> class.</returns>
|
||||||
public MessageStopEventData() : base(EventType.MessageStop)
|
public MessageStopEventData() : base(EventType.MessageStop)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents data for a ping event.
|
||||||
|
/// </summary>
|
||||||
public class PingEventData : EventData
|
public class PingEventData : EventData
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="PingEventData"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A new instance of the <see cref="PingEventData"/> class.</returns>
|
||||||
public PingEventData() : base(EventType.Ping)
|
public PingEventData() : base(EventType.Ping)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,14 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a text delta.
|
||||||
|
/// </summary>
|
||||||
public class TextDelta : ContentDelta
|
public class TextDelta : ContentDelta
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the text.
|
||||||
|
/// </summary>
|
||||||
public string Text { get; set; } = string.Empty;
|
public string Text { get; set; } = string.Empty;
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
@@ -11,6 +17,11 @@ public class TextDelta : ContentDelta
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="TextDelta"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="text">The text.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="TextDelta"/> class.</returns>
|
||||||
public TextDelta(string text) : base(ContentDeltaType.TextDelta)
|
public TextDelta(string text) : base(ContentDeltaType.TextDelta)
|
||||||
{
|
{
|
||||||
Text = text;
|
Text = text;
|
||||||
|
|||||||
Reference in New Issue
Block a user