using System.Text.Json.Serialization;
namespace AnthropicClient.Models;
///
/// Represents a message request.
///
public class StreamMessageRequest : BaseMessageRequest
{
[JsonConstructor]
internal StreamMessageRequest() : base() { }
///
/// Initializes a new instance of the class.
///
/// The model ID to use for the request.
/// The messages to send to the model.
/// The maximum number of tokens to generate.
/// The system ID to use for the request.
/// The metadata to include with the request.
/// The temperature to use for the request.
/// The top-K value to use for the request.
/// The top-P value to use for the request.
/// The tool choice mode to use for the request.
/// The tools to use for the request.
/// Thrown when the model ID is invalid.
/// Thrown when the model or messages is null.
/// Thrown when the messages contain no messages.
/// Thrown when the max tokens is less than one.
/// Thrown when the temperature is less than zero or greater than one.
/// A new instance of the class.
public StreamMessageRequest(
string model,
List messages,
int maxTokens = 1024,
string? system = null,
Dictionary? metadata = null,
decimal temperature = 0.0m,
int? topK = null,
decimal? topP = null,
ToolChoice? toolChoice = null,
List? tools = null
) : base(
model,
messages,
maxTokens,
system,
metadata,
temperature,
topK,
topP,
toolChoice,
tools,
true
)
{
}
}