Files
anthropic-client/src/AnthropicClient/Models/ChatResponse.cs
T

57 lines
1.5 KiB
C#
Raw Normal View History

2024-06-27 23:26:53 -05:00
using System.Text.Json.Serialization;
namespace AnthropicClient.Models;
/// <summary>
/// Represents a chat response.
/// </summary>
public class ChatResponse
{
/// <summary>
/// Gets the ID of the chat response.
/// </summary>
2024-06-28 10:54:00 -05:00
public string Id { get; init; } = string.Empty;
2024-06-27 23:26:53 -05:00
/// <summary>
/// Gets the model used for the chat response.
/// </summary>
2024-06-28 10:54:00 -05:00
public string Model { get; init; } = string.Empty;
2024-06-27 23:26:53 -05:00
/// <summary>
/// Gets the role of the chat response.
/// </summary>
2024-06-28 10:54:00 -05:00
public string Role { get; init; } = string.Empty;
2024-06-27 23:26:53 -05:00
/// <summary>
/// Gets the stop reason of the chat response.
/// </summary>
[JsonPropertyName("stop_reason")]
2024-06-28 10:54:00 -05:00
public string StopReason { get; init; } = string.Empty;
2024-06-27 23:26:53 -05:00
/// <summary>
/// Gets the stop sequence of the chat response.
/// </summary>
[JsonPropertyName("stop_sequence")]
2024-06-28 10:54:00 -05:00
public string StopSequence { get; init; } = string.Empty;
2024-06-27 23:26:53 -05:00
/// <summary>
/// Gets the type of the chat response.
/// </summary>
2024-06-28 10:54:00 -05:00
public string Type { get; init; } = string.Empty;
2024-06-27 23:26:53 -05:00
/// <summary>
/// Gets the usage of the chat response.
/// </summary>
2024-06-28 10:54:00 -05:00
public ChatUsage Usage { get; init; } = new();
2024-06-27 23:26:53 -05:00
/// <summary>
/// Gets the contents of the chat response.
/// </summary>
2024-06-28 10:54:00 -05:00
public List<Content> Content { get; init; } = [];
2024-07-01 21:00:27 -05:00
/// <summary>
/// Gets the tool call of the chat response. If the chat response does not contain a tool call, this property is null.
/// </summary>
[JsonIgnore]
public ToolCall? ToolCall { get; set; } = null;
2024-06-27 23:26:53 -05:00
}