2025-11-13 17:13:16 +00:00
|
|
|
using System.Text.Json.Serialization;
|
2024-11-09 21:04:00 +00:00
|
|
|
using AIStudio.Provider.OpenAI;
|
|
|
|
|
|
|
|
|
|
namespace AIStudio.Provider.Google;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The Google 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,
|
|
|
|
|
bool Stream
|
2025-11-13 17:13:16 +00:00
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
// Attention: The "required" modifier is not supported for [JsonExtensionData].
|
|
|
|
|
[JsonExtensionData]
|
|
|
|
|
public IDictionary<string, object> AdditionalApiParameters { get; init; } = new Dictionary<string, object>();
|
|
|
|
|
}
|