2025-10-10 15:12:59 +00:00
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
2024-07-03 18:31:04 +00:00
|
|
|
namespace AIStudio.Provider.SelfHosted;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The chat request model.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="Model">Which model to use for chat completion.</param>
|
|
|
|
|
/// <param name="Messages">The chat messages.</param>
|
|
|
|
|
/// <param name="Stream">Whether to stream the chat completion.</param>
|
|
|
|
|
public readonly record struct ChatRequest(
|
|
|
|
|
string Model,
|
|
|
|
|
IList<Message> Messages,
|
2025-08-10 14:26:25 +00:00
|
|
|
bool Stream
|
2025-10-10 15:12:59 +00:00
|
|
|
)
|
|
|
|
|
{
|
2025-11-13 16:39:07 +00:00
|
|
|
// Attention: The "required" modifier is not supported for [JsonExtensionData].
|
2025-10-23 13:06:02 +00:00
|
|
|
[JsonExtensionData]
|
2025-11-13 16:39:07 +00:00
|
|
|
public IDictionary<string, object> AdditionalApiParameters { get; init; } = new Dictionary<string, object>();
|
2025-10-10 15:12:59 +00:00
|
|
|
}
|