Skip to content

Commit 22cb9bc

Browse files
HavenDVgithub-actions[bot]
andauthored
feat: Updated OpenAPI spec (#218)
Co-authored-by: github-actions[bot] <[email protected]>
1 parent 52f2b93 commit 22cb9bc

File tree

383 files changed

+22878
-3922
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

383 files changed

+22878
-3922
lines changed

src/libs/tryAGI.OpenAI/Generated/AnyOf.6.g.cs

Lines changed: 0 additions & 429 deletions
This file was deleted.

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs

Lines changed: 164 additions & 53 deletions
Large diffs are not rendered by default.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#nullable enable
2+
3+
namespace tryAGI.OpenAI
4+
{
5+
public partial interface IRealtimeClient
6+
{
7+
/// <summary>
8+
/// Create realtime session<br/>
9+
/// Create a Realtime session and client secret for either realtime or transcription.
10+
/// </summary>
11+
/// <param name="request"></param>
12+
/// <param name="cancellationToken">The token to cancel the operation with</param>
13+
/// <exception cref="global::tryAGI.OpenAI.ApiException"></exception>
14+
global::System.Threading.Tasks.Task<global::tryAGI.OpenAI.RealtimeCreateClientSecretResponse> CreateRealtimeClientSecretAsync(
15+
global::tryAGI.OpenAI.RealtimeCreateClientSecretRequest request,
16+
global::System.Threading.CancellationToken cancellationToken = default);
17+
18+
/// <summary>
19+
/// Create realtime session<br/>
20+
/// Create a Realtime session and client secret for either realtime or transcription.
21+
/// </summary>
22+
/// <param name="expiresAfter">
23+
/// Configuration for the ephemeral token expiration.
24+
/// </param>
25+
/// <param name="session">
26+
/// Session configuration to use for the client secret. Choose either a realtime<br/>
27+
/// session or a transcription session.
28+
/// </param>
29+
/// <param name="cancellationToken">The token to cancel the operation with</param>
30+
/// <exception cref="global::System.InvalidOperationException"></exception>
31+
global::System.Threading.Tasks.Task<global::tryAGI.OpenAI.RealtimeCreateClientSecretResponse> CreateRealtimeClientSecretAsync(
32+
global::tryAGI.OpenAI.RealtimeCreateClientSecretRequestExpiresAfter? expiresAfter = default,
33+
global::tryAGI.OpenAI.Session? session = default,
34+
global::System.Threading.CancellationToken cancellationToken = default);
35+
}
36+
}

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeSession.g.cs

Lines changed: 32 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -29,96 +29,80 @@ public partial interface IRealtimeClient
2929
/// a usable ephemeral API token that can be used to authenticate browser clients<br/>
3030
/// for the Realtime API.
3131
/// </summary>
32+
/// <param name="audio">
33+
/// Configuration for input and output audio.
34+
/// </param>
3235
/// <param name="clientSecret">
3336
/// Configuration options for the generated client secret.
3437
/// </param>
35-
/// <param name="inputAudioFormat">
36-
/// The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.<br/>
37-
/// For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,<br/>
38-
/// single channel (mono), and little-endian byte order.<br/>
39-
/// Default Value: pcm16
40-
/// </param>
41-
/// <param name="inputAudioNoiseReduction">
42-
/// Configuration for input audio noise reduction. This can be set to `null` to turn off.<br/>
43-
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.<br/>
44-
/// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
45-
/// </param>
46-
/// <param name="inputAudioTranscription">
47-
/// Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.
38+
/// <param name="include">
39+
/// Additional fields to include in server outputs.<br/>
40+
/// - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.
4841
/// </param>
4942
/// <param name="instructions">
5043
/// The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.<br/>
5144
/// Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.
5245
/// </param>
53-
/// <param name="maxResponseOutputTokens">
46+
/// <param name="maxOutputTokens">
5447
/// Maximum number of output tokens for a single assistant response,<br/>
5548
/// inclusive of tool calls. Provide an integer between 1 and 4096 to<br/>
5649
/// limit output tokens, or `inf` for the maximum available tokens for a<br/>
5750
/// given model. Defaults to `inf`.
5851
/// </param>
59-
/// <param name="modalities">
60-
/// The set of modalities the model can respond with. To disable audio,<br/>
61-
/// set this to ["text"].
62-
/// </param>
6352
/// <param name="model">
6453
/// The Realtime model used for this session.
6554
/// </param>
66-
/// <param name="outputAudioFormat">
67-
/// The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.<br/>
68-
/// For `pcm16`, output audio is sampled at a rate of 24kHz.<br/>
69-
/// Default Value: pcm16
55+
/// <param name="outputModalities">
56+
/// The set of modalities the model can respond with. To disable audio,<br/>
57+
/// set this to ["text"].
7058
/// </param>
71-
/// <param name="speed">
72-
/// The speed of the model's spoken response. 1.0 is the default speed. 0.25 is<br/>
73-
/// the minimum speed. 1.5 is the maximum speed. This value can only be changed<br/>
74-
/// in between model turns, not while a response is in progress.<br/>
75-
/// Default Value: 1
59+
/// <param name="prompt">
60+
/// Reference to a prompt template and its variables. <br/>
61+
/// [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
7662
/// </param>
7763
/// <param name="temperature">
7864
/// Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.<br/>
7965
/// Default Value: 0.8
8066
/// </param>
8167
/// <param name="toolChoice">
82-
/// How the model chooses tools. Options are `auto`, `none`, `required`, or<br/>
83-
/// specify a function.<br/>
68+
/// How the model chooses tools. Provide one of the string modes or force a specific<br/>
69+
/// function/MCP tool.<br/>
8470
/// Default Value: auto
8571
/// </param>
8672
/// <param name="tools">
87-
/// Tools (functions) available to the model.
73+
/// Tools available to the model.
8874
/// </param>
8975
/// <param name="tracing">
9076
/// Configuration options for tracing. Set to null to disable tracing. Once<br/>
9177
/// tracing is enabled for a session, the configuration cannot be modified.<br/>
9278
/// `auto` will create a trace for the session with default values for the<br/>
9379
/// workflow name, group id, and metadata.
9480
/// </param>
95-
/// <param name="turnDetection">
96-
/// Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.<br/>
97-
/// Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.<br/>
98-
/// Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.
81+
/// <param name="truncation">
82+
/// Controls how the realtime conversation is truncated prior to model inference.<br/>
83+
/// The default is `auto`. When set to `retention_ratio`, the server retains a<br/>
84+
/// fraction of the conversation tokens prior to the instructions.
9985
/// </param>
100-
/// <param name="voice">
101-
/// Example: ash
86+
/// <param name="type">
87+
/// The type of session to create. Always `realtime` for the Realtime API.
10288
/// </param>
10389
/// <param name="cancellationToken">The token to cancel the operation with</param>
10490
/// <exception cref="global::System.InvalidOperationException"></exception>
10591
global::System.Threading.Tasks.Task<global::tryAGI.OpenAI.RealtimeSessionCreateResponse> CreateRealtimeSessionAsync(
92+
global::tryAGI.OpenAI.AnyOf<string, global::tryAGI.OpenAI.RealtimeSessionCreateRequestModel?> model,
93+
global::tryAGI.OpenAI.RealtimeSessionCreateRequestAudio? audio = default,
10694
global::tryAGI.OpenAI.RealtimeSessionCreateRequestClientSecret? clientSecret = default,
107-
global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioFormat? inputAudioFormat = default,
108-
global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioNoiseReduction? inputAudioNoiseReduction = default,
109-
global::tryAGI.OpenAI.RealtimeSessionCreateRequestInputAudioTranscription? inputAudioTranscription = default,
95+
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.RealtimeSessionCreateRequestIncludeItem>? include = default,
11096
string? instructions = default,
111-
global::tryAGI.OpenAI.AnyOf<int?, global::tryAGI.OpenAI.RealtimeSessionCreateRequestMaxResponseOutputTokens?>? maxResponseOutputTokens = default,
112-
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.RealtimeSessionCreateRequestModalitie>? modalities = default,
113-
global::tryAGI.OpenAI.RealtimeSessionCreateRequestModel? model = default,
114-
global::tryAGI.OpenAI.RealtimeSessionCreateRequestOutputAudioFormat? outputAudioFormat = default,
115-
double? speed = default,
97+
global::tryAGI.OpenAI.AnyOf<int?, global::tryAGI.OpenAI.RealtimeSessionCreateRequestMaxOutputTokens?>? maxOutputTokens = default,
98+
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.RealtimeSessionCreateRequestOutputModalitie>? outputModalities = default,
99+
global::tryAGI.OpenAI.Prompt2? prompt = default,
116100
double? temperature = default,
117-
string? toolChoice = default,
118-
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.RealtimeSessionCreateRequestTool>? tools = default,
101+
global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.ToolChoiceOptions?, global::tryAGI.OpenAI.ToolChoiceFunction, global::tryAGI.OpenAI.ToolChoiceMCP>? toolChoice = default,
102+
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.ToolsItem4>? tools = default,
119103
global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.RealtimeSessionCreateRequestTracingEnum?, global::tryAGI.OpenAI.RealtimeSessionCreateRequestTracingEnum2>? tracing = default,
120-
global::tryAGI.OpenAI.RealtimeSessionCreateRequestTurnDetection? turnDetection = default,
121-
global::tryAGI.OpenAI.VoiceIdsShared? voice = default,
104+
global::tryAGI.OpenAI.RealtimeTruncation? truncation = default,
105+
global::tryAGI.OpenAI.RealtimeSessionCreateRequestType type = default,
122106
global::System.Threading.CancellationToken cancellationToken = default);
123107
}
124108
}

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.CreateRealtimeTranscriptionSession.g.cs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ public partial interface IRealtimeClient
2929
/// a usable ephemeral API token that can be used to authenticate browser clients<br/>
3030
/// for the Realtime API.
3131
/// </summary>
32-
/// <param name="clientSecret">
33-
/// Configuration options for the generated client secret.
34-
/// </param>
3532
/// <param name="include">
3633
/// The set of items to include in the transcription. Current available items are:<br/>
3734
/// - `item.input_audio_transcription.logprobs`
@@ -50,25 +47,26 @@ public partial interface IRealtimeClient
5047
/// <param name="inputAudioTranscription">
5148
/// Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.
5249
/// </param>
53-
/// <param name="modalities">
54-
/// The set of modalities the model can respond with. To disable audio,<br/>
55-
/// set this to ["text"].
50+
/// <param name="model">
51+
/// ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source Whisper V2 model).<br/>
52+
/// Example: gpt-4o-transcribe
5653
/// </param>
5754
/// <param name="turnDetection">
58-
/// Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.<br/>
59-
/// Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.<br/>
60-
/// Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.
55+
/// Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.
56+
/// </param>
57+
/// <param name="type">
58+
/// The type of session to create. Always `transcription` for transcription sessions.
6159
/// </param>
6260
/// <param name="cancellationToken">The token to cancel the operation with</param>
6361
/// <exception cref="global::System.InvalidOperationException"></exception>
6462
global::System.Threading.Tasks.Task<global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateResponse> CreateRealtimeTranscriptionSessionAsync(
65-
global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestClientSecret? clientSecret = default,
66-
global::System.Collections.Generic.IList<string>? include = default,
63+
global::tryAGI.OpenAI.AnyOf<string, global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestModel?> model,
64+
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestIncludeItem>? include = default,
6765
global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioFormat? inputAudioFormat = default,
6866
global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction? inputAudioNoiseReduction = default,
6967
global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestInputAudioTranscription? inputAudioTranscription = default,
70-
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestModalitie>? modalities = default,
7168
global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestTurnDetection? turnDetection = default,
69+
global::tryAGI.OpenAI.RealtimeTranscriptionSessionCreateRequestType type = default,
7270
global::System.Threading.CancellationToken cancellationToken = default);
7371
}
7472
}

0 commit comments

Comments
 (0)