feat: create chat message

This commit is contained in:
Stevan Freeborn
2024-06-27 23:26:53 -05:00
parent 68b359163d
commit 4c2cee643a
77 changed files with 3860 additions and 0 deletions
@@ -0,0 +1,34 @@
using System.Text.Json.Serialization;
namespace AnthropicClient.Models;
/// <summary>
/// Represents an error response from the Anthropic API.
/// </summary>
public class AnthropicError
{
/// <summary>
/// The type of the error.
/// </summary>
public string Type { get; init; } = "error";
/// <summary>
/// The error object.
/// </summary>
public Error? Error { get; init; } = null;
[JsonConstructor]
internal AnthropicError()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="AnthropicError"/> class.
/// </summary>
/// <param name="error">The error as an <see cref="Error"/> object.</param>
/// <returns>A new instance of the <see cref="AnthropicError"/> class.</returns>
public AnthropicError(Error error)
{
Error = error;
}
}