mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-05-21 10:32:16 +00:00
24 lines
829 B
C#
24 lines
829 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace AIStudio.Provider.Groq;
|
|
|
|
/// <summary>
|
|
/// The Groq 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>
|
|
/// <param name="Seed">The seed for the chat completion.</param>
|
|
public readonly record struct ChatRequest(
|
|
string Model,
|
|
IList<IMessageBase> Messages,
|
|
bool Stream,
|
|
[property: JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
int? Seed
|
|
)
|
|
{
|
|
// Attention: The "required" modifier is not supported for [JsonExtensionData].
|
|
[JsonExtensionData]
|
|
public IDictionary<string, object> AdditionalApiParameters { get; init; } = new Dictionary<string, object>();
|
|
}
|