using System.Text.Json.Serialization;
namespace AIStudio.Provider.Anthropic;
///
/// The Anthropic chat request model.
///
/// Which model to use for chat completion.
/// The chat messages.
/// The maximum number of tokens to generate.
/// Whether to stream the chat completion.
/// The system prompt for the chat completion.
public readonly record struct ChatRequest(
string Model,
IList Messages,
int MaxTokens,
bool Stream,
string System
)
{
///
/// The tools the model may call, or null when it should answer without them.
///
///
/// Omitted from the request when null: sending an empty list is not the same as sending no
/// tools at all, and the final round of a tool conversation has to offer none.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IList? Tools { get; init; }
// Attention: The "required" modifier is not supported for [JsonExtensionData].
[JsonExtensionData]
public IDictionary AdditionalApiParameters { get; init; } = new Dictionary();
}