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 request body for the Responses API.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="Model">Which model to use.</param>
|
|
|
|
|
/// <param name="Input">The chat messages.</param>
|
|
|
|
|
/// <param name="Stream">Whether to stream the response.</param>
|
|
|
|
|
/// <param name="Store">Whether to store the response on the server (usually OpenAI's infrastructure).</param>
|
|
|
|
|
/// <param name="Tools">The tools to use for the request.</param>
|
|
|
|
|
public record ResponsesAPIRequest(
|
|
|
|
|
string Model,
|
|
|
|
|
IList<Message> Input,
|
|
|
|
|
bool Stream,
|
|
|
|
|
bool Store,
|
|
|
|
|
IList<Tool> Tools)
|
|
|
|
|
{
|
|
|
|
|
public ResponsesAPIRequest() : this(string.Empty, [], true, false, [])
|
|
|
|
|
{
|
|
|
|
|
}
|
2025-10-10 15:12:59 +00:00
|
|
|
|
|
|
|
|
[JsonExtensionData]
|
2025-10-22 15:38:12 +00:00
|
|
|
public Dictionary<string, object>? AdditionalApiParameters { get; init; }
|
2025-09-03 08:08:04 +00:00
|
|
|
}
|