2025-10-10 15:12:59 +00:00
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
2025-09-03 08:08:04 +00:00
|
|
|
namespace AIStudio.Provider.OpenAI;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The OpenAI's legacy chat completion 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 record ChatCompletionAPIRequest(
|
|
|
|
|
string Model,
|
|
|
|
|
IList<Message> Messages,
|
|
|
|
|
bool Stream
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
public ChatCompletionAPIRequest() : this(string.Empty, [], true)
|
|
|
|
|
{
|
|
|
|
|
}
|
2025-10-10 15:12:59 +00:00
|
|
|
|
2025-10-23 07:40:36 +00:00
|
|
|
public IDictionary<string, string>? AdditionalApiParameters { get; init; }
|
2025-09-03 08:08:04 +00:00
|
|
|
}
|