BotSharp/src/Plugins/BotSharp.Plugin.OpenAI/Models/Realtime/RealtimeSessionRequest.cs

33 lines
970 B
C#
Raw Normal View History

2025-03-05 18:29:28 +00:00
using BotSharp.Abstraction.Functions.Models;
2025-02-07 17:18:47 +00:00
namespace BotSharp.Plugin.OpenAI.Models.Realtime;
2025-03-05 18:29:28 +00:00
public class RealtimeSessionCreationRequest
2025-02-09 23:31:46 +00:00
{
2025-03-05 18:29:28 +00:00
[JsonPropertyName("model")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string Model { get; set; } = null!;
[JsonPropertyName("modalities")]
public string[] Modalities { get; set; } = ["audio", "text"];
[JsonPropertyName("instructions")]
public string Instructions { get; set; } = null!;
[JsonPropertyName("tool_choice")]
public string ToolChoice { get; set; } = "auto";
[JsonPropertyName("tools")]
public FunctionDef[] Tools { get; set; } = [];
2025-02-09 23:31:46 +00:00
2025-03-05 18:29:28 +00:00
[JsonPropertyName("turn_detection")]
public RealtimeSessionTurnDetection TurnDetection { get; set; } = new();
2025-02-09 23:31:46 +00:00
}
/// <summary>
/// https://platform.openai.com/docs/api-reference/realtime-client-events/session/update
/// </summary>
public class RealtimeSessionUpdateRequest : RealtimeSessionBody
2025-02-07 17:18:47 +00:00
{
}