Skip to content

Commit 768170e

Browse files
HavenDVgithub-actions[bot]
andauthored
feat: Updated OpenAPI spec (#261)
Co-authored-by: github-actions[bot] <bot@openai.com>
1 parent 66155fe commit 768170e

20 files changed

Lines changed: 160 additions & 103 deletions

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeechAsStream.g.cs renamed to src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeech.g.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ namespace tryAGI.OpenAI
55
{
66
public partial class AudioClient
77
{
8-
partial void PrepareCreateSpeechAsStreamArguments(
8+
partial void PrepareCreateSpeechArguments(
99
global::System.Net.Http.HttpClient httpClient,
1010
global::tryAGI.OpenAI.CreateSpeechRequest request);
11-
partial void PrepareCreateSpeechAsStreamRequest(
11+
partial void PrepareCreateSpeechRequest(
1212
global::System.Net.Http.HttpClient httpClient,
1313
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
1414
global::tryAGI.OpenAI.CreateSpeechRequest request);
15-
partial void ProcessCreateSpeechAsStreamResponse(
15+
partial void ProcessCreateSpeechResponse(
1616
global::System.Net.Http.HttpClient httpClient,
1717
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
1818

@@ -23,7 +23,7 @@ partial void ProcessCreateSpeechAsStreamResponse(
2323
/// <param name="request"></param>
2424
/// <param name="cancellationToken">The token to cancel the operation with</param>
2525
/// <exception cref="global::tryAGI.OpenAI.ApiException"></exception>
26-
public async global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent> CreateSpeechAsStreamAsync(
26+
public async global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent> CreateSpeechAsync(
2727

2828
global::tryAGI.OpenAI.CreateSpeechRequest request,
2929
[global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -32,7 +32,7 @@ partial void ProcessCreateSpeechAsStreamResponse(
3232

3333
PrepareArguments(
3434
client: HttpClient);
35-
PrepareCreateSpeechAsStreamArguments(
35+
PrepareCreateSpeechArguments(
3636
httpClient: HttpClient,
3737
request: request);
3838

@@ -73,7 +73,7 @@ partial void ProcessCreateSpeechAsStreamResponse(
7373
PrepareRequest(
7474
client: HttpClient,
7575
request: __httpRequest);
76-
PrepareCreateSpeechAsStreamRequest(
76+
PrepareCreateSpeechRequest(
7777
httpClient: HttpClient,
7878
httpRequestMessage: __httpRequest,
7979
request: request);
@@ -86,7 +86,7 @@ partial void ProcessCreateSpeechAsStreamResponse(
8686
ProcessResponse(
8787
client: HttpClient,
8888
response: __response);
89-
ProcessCreateSpeechAsStreamResponse(
89+
ProcessCreateSpeechResponse(
9090
httpClient: HttpClient,
9191
httpResponseMessage: __response);
9292

@@ -160,7 +160,7 @@ partial void ProcessCreateSpeechAsStreamResponse(
160160
/// </param>
161161
/// <param name="cancellationToken">The token to cancel the operation with</param>
162162
/// <exception cref="global::System.InvalidOperationException"></exception>
163-
public async global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent> CreateSpeechAsStreamAsync(
163+
public async global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent> CreateSpeechAsync(
164164
global::tryAGI.OpenAI.AnyOf<string, global::tryAGI.OpenAI.CreateSpeechRequestModel?> model,
165165
string input,
166166
global::tryAGI.OpenAI.VoiceIdsOrCustomVoice voice,
@@ -181,7 +181,7 @@ partial void ProcessCreateSpeechAsStreamResponse(
181181
StreamFormat = streamFormat,
182182
};
183183

184-
var __enumerable = CreateSpeechAsStreamAsync(
184+
var __enumerable = CreateSpeechAsync(
185185
request: __request,
186186
cancellationToken: cancellationToken);
187187

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscription.g.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ partial void ProcessCreateTranscriptionResponseContent(
3636
{
3737
request = request ?? throw new global::System.ArgumentNullException(nameof(request));
3838

39+
40+
request = new global::tryAGI.OpenAI.CreateTranscriptionRequest
41+
{
42+
File = request.File,
43+
Filename = request.Filename,
44+
Model = request.Model,
45+
Language = request.Language,
46+
Prompt = request.Prompt,
47+
ResponseFormat = request.ResponseFormat,
48+
Temperature = request.Temperature,
49+
Include = request.Include,
50+
TimestampGranularities = request.TimestampGranularities,
51+
Stream = false,
52+
ChunkingStrategy = request.ChunkingStrategy,
53+
KnownSpeakerNames = request.KnownSpeakerNames,
54+
KnownSpeakerReferences = request.KnownSpeakerReferences,
55+
};
3956
PrepareArguments(
4057
client: HttpClient);
4158
PrepareCreateTranscriptionArguments(
@@ -287,7 +304,6 @@ partial void ProcessCreateTranscriptionResponseContent(
287304
/// This option is not available for `gpt-4o-transcribe-diarize`.<br/>
288305
/// Default Value: [segment]
289306
/// </param>
290-
/// <param name="stream"></param>
291307
/// <param name="chunkingStrategy"></param>
292308
/// <param name="knownSpeakerNames">
293309
/// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported.
@@ -307,7 +323,6 @@ partial void ProcessCreateTranscriptionResponseContent(
307323
double? temperature = default,
308324
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.TranscriptionInclude>? include = default,
309325
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.CreateTranscriptionRequestTimestampGranularitie>? timestampGranularities = default,
310-
bool? stream = default,
311326
global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1?, global::tryAGI.OpenAI.VadConfig>? chunkingStrategy = default,
312327
global::System.Collections.Generic.IList<string>? knownSpeakerNames = default,
313328
global::System.Collections.Generic.IList<string>? knownSpeakerReferences = default,
@@ -324,7 +339,7 @@ partial void ProcessCreateTranscriptionResponseContent(
324339
Temperature = temperature,
325340
Include = include,
326341
TimestampGranularities = timestampGranularities,
327-
Stream = stream,
342+
Stream = false,
328343
ChunkingStrategy = chunkingStrategy,
329344
KnownSpeakerNames = knownSpeakerNames,
330345
KnownSpeakerReferences = knownSpeakerReferences,

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscriptionAsStream.g.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ partial void ProcessCreateTranscriptionAsStreamResponse(
3131
{
3232
request = request ?? throw new global::System.ArgumentNullException(nameof(request));
3333

34+
35+
request = new global::tryAGI.OpenAI.CreateTranscriptionRequest
36+
{
37+
File = request.File,
38+
Filename = request.Filename,
39+
Model = request.Model,
40+
Language = request.Language,
41+
Prompt = request.Prompt,
42+
ResponseFormat = request.ResponseFormat,
43+
Temperature = request.Temperature,
44+
Include = request.Include,
45+
TimestampGranularities = request.TimestampGranularities,
46+
Stream = true,
47+
ChunkingStrategy = request.ChunkingStrategy,
48+
KnownSpeakerNames = request.KnownSpeakerNames,
49+
KnownSpeakerReferences = request.KnownSpeakerReferences,
50+
};
3451
PrepareArguments(
3552
client: HttpClient);
3653
PrepareCreateTranscriptionAsStreamArguments(
@@ -250,7 +267,6 @@ partial void ProcessCreateTranscriptionAsStreamResponse(
250267
/// This option is not available for `gpt-4o-transcribe-diarize`.<br/>
251268
/// Default Value: [segment]
252269
/// </param>
253-
/// <param name="stream"></param>
254270
/// <param name="chunkingStrategy"></param>
255271
/// <param name="knownSpeakerNames">
256272
/// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported.
@@ -270,7 +286,6 @@ partial void ProcessCreateTranscriptionAsStreamResponse(
270286
double? temperature = default,
271287
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.TranscriptionInclude>? include = default,
272288
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.CreateTranscriptionRequestTimestampGranularitie>? timestampGranularities = default,
273-
bool? stream = default,
274289
global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1?, global::tryAGI.OpenAI.VadConfig>? chunkingStrategy = default,
275290
global::System.Collections.Generic.IList<string>? knownSpeakerNames = default,
276291
global::System.Collections.Generic.IList<string>? knownSpeakerReferences = default,
@@ -287,7 +302,7 @@ partial void ProcessCreateTranscriptionAsStreamResponse(
287302
Temperature = temperature,
288303
Include = include,
289304
TimestampGranularities = timestampGranularities,
290-
Stream = stream,
305+
Stream = true,
291306
ChunkingStrategy = chunkingStrategy,
292307
KnownSpeakerNames = knownSpeakerNames,
293308
KnownSpeakerReferences = knownSpeakerReferences,

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateSpeechAsStream.g.cs renamed to src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateSpeech.g.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public partial interface IAudioClient
1111
/// <param name="request"></param>
1212
/// <param name="cancellationToken">The token to cancel the operation with</param>
1313
/// <exception cref="global::tryAGI.OpenAI.ApiException"></exception>
14-
global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent> CreateSpeechAsStreamAsync(
14+
global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent> CreateSpeechAsync(
1515

1616
global::tryAGI.OpenAI.CreateSpeechRequest request,
1717
global::System.Threading.CancellationToken cancellationToken = default);
@@ -46,7 +46,7 @@ public partial interface IAudioClient
4646
/// </param>
4747
/// <param name="cancellationToken">The token to cancel the operation with</param>
4848
/// <exception cref="global::System.InvalidOperationException"></exception>
49-
global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent> CreateSpeechAsStreamAsync(
49+
global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent> CreateSpeechAsync(
5050
global::tryAGI.OpenAI.AnyOf<string, global::tryAGI.OpenAI.CreateSpeechRequestModel?> model,
5151
string input,
5252
global::tryAGI.OpenAI.VoiceIdsOrCustomVoice voice,

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranscription.g.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public partial interface IAudioClient
5858
/// This option is not available for `gpt-4o-transcribe-diarize`.<br/>
5959
/// Default Value: [segment]
6060
/// </param>
61-
/// <param name="stream"></param>
6261
/// <param name="chunkingStrategy"></param>
6362
/// <param name="knownSpeakerNames">
6463
/// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported.
@@ -78,7 +77,6 @@ public partial interface IAudioClient
7877
double? temperature = default,
7978
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.TranscriptionInclude>? include = default,
8079
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.CreateTranscriptionRequestTimestampGranularitie>? timestampGranularities = default,
81-
bool? stream = default,
8280
global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1?, global::tryAGI.OpenAI.VadConfig>? chunkingStrategy = default,
8381
global::System.Collections.Generic.IList<string>? knownSpeakerNames = default,
8482
global::System.Collections.Generic.IList<string>? knownSpeakerReferences = default,

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.CreateTranscriptionAsStream.g.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public partial interface IAudioClient
5858
/// This option is not available for `gpt-4o-transcribe-diarize`.<br/>
5959
/// Default Value: [segment]
6060
/// </param>
61-
/// <param name="stream"></param>
6261
/// <param name="chunkingStrategy"></param>
6362
/// <param name="knownSpeakerNames">
6463
/// Optional list of speaker names that correspond to the audio samples provided in `known_speaker_references[]`. Each entry should be a short identifier (for example `customer` or `agent`). Up to 4 speakers are supported.
@@ -78,7 +77,6 @@ public partial interface IAudioClient
7877
double? temperature = default,
7978
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.TranscriptionInclude>? include = default,
8079
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.CreateTranscriptionRequestTimestampGranularitie>? timestampGranularities = default,
81-
bool? stream = default,
8280
global::tryAGI.OpenAI.AnyOf<global::tryAGI.OpenAI.CreateTranscriptionRequestChunkingStrategyVariant1?, global::tryAGI.OpenAI.VadConfig>? chunkingStrategy = default,
8381
global::System.Collections.Generic.IList<string>? knownSpeakerNames = default,
8482
global::System.Collections.Generic.IList<string>? knownSpeakerReferences = default,

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImage.g.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ public partial interface IImagesClient
5656
/// Default Value: 100<br/>
5757
/// Example: 100
5858
/// </param>
59-
/// <param name="stream">
60-
/// Generate the image in streaming mode. Defaults to `false`. See the<br/>
61-
/// [Image generation guide](/docs/guides/image-generation) for more information.<br/>
62-
/// This parameter is only supported for the GPT image models.<br/>
63-
/// Default Value: false<br/>
64-
/// Example: false
65-
/// </param>
6659
/// <param name="partialImages"></param>
6760
/// <param name="size">
6861
/// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.<br/>
@@ -103,7 +96,6 @@ public partial interface IImagesClient
10396
global::tryAGI.OpenAI.CreateImageRequestResponseFormat? responseFormat = default,
10497
global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat = default,
10598
int? outputCompression = default,
106-
bool? stream = default,
10799
int? partialImages = default,
108100
global::tryAGI.OpenAI.CreateImageRequestSize? size = default,
109101
global::tryAGI.OpenAI.CreateImageRequestModeration? moderation = default,

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageAsStream.g.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ public partial interface IImagesClient
5656
/// Default Value: 100<br/>
5757
/// Example: 100
5858
/// </param>
59-
/// <param name="stream">
60-
/// Generate the image in streaming mode. Defaults to `false`. See the<br/>
61-
/// [Image generation guide](/docs/guides/image-generation) for more information.<br/>
62-
/// This parameter is only supported for the GPT image models.<br/>
63-
/// Default Value: false<br/>
64-
/// Example: false
65-
/// </param>
6659
/// <param name="partialImages"></param>
6760
/// <param name="size">
6861
/// The size of the generated images. Must be one of `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.<br/>
@@ -103,7 +96,6 @@ public partial interface IImagesClient
10396
global::tryAGI.OpenAI.CreateImageRequestResponseFormat? responseFormat = default,
10497
global::tryAGI.OpenAI.CreateImageRequestOutputFormat? outputFormat = default,
10598
int? outputCompression = default,
106-
bool? stream = default,
10799
int? partialImages = default,
108100
global::tryAGI.OpenAI.CreateImageRequestSize? size = default,
109101
global::tryAGI.OpenAI.CreateImageRequestModeration? moderation = default,

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageEdit.g.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ public partial interface IImagesClient
9292
/// Example: user-1234
9393
/// </param>
9494
/// <param name="inputFidelity"></param>
95-
/// <param name="stream">
96-
/// Edit the image in streaming mode. Defaults to `false`. See the<br/>
97-
/// [Image generation guide](/docs/guides/image-generation) for more information.<br/>
98-
/// Default Value: false<br/>
99-
/// Example: false
100-
/// </param>
10195
/// <param name="partialImages"></param>
10296
/// <param name="quality">
10397
/// The quality of the image that will be generated for GPT image models. Defaults to `auto`.<br/>
@@ -120,7 +114,6 @@ public partial interface IImagesClient
120114
int? outputCompression = default,
121115
string? user = default,
122116
global::tryAGI.OpenAI.InputFidelity? inputFidelity = default,
123-
bool? stream = default,
124117
int? partialImages = default,
125118
global::tryAGI.OpenAI.CreateImageEditRequestQuality? quality = default,
126119
global::System.Threading.CancellationToken cancellationToken = default);

src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.CreateImageEditAsStream.g.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ public partial interface IImagesClient
9292
/// Example: user-1234
9393
/// </param>
9494
/// <param name="inputFidelity"></param>
95-
/// <param name="stream">
96-
/// Edit the image in streaming mode. Defaults to `false`. See the<br/>
97-
/// [Image generation guide](/docs/guides/image-generation) for more information.<br/>
98-
/// Default Value: false<br/>
99-
/// Example: false
100-
/// </param>
10195
/// <param name="partialImages"></param>
10296
/// <param name="quality">
10397
/// The quality of the image that will be generated for GPT image models. Defaults to `auto`.<br/>
@@ -120,7 +114,6 @@ public partial interface IImagesClient
120114
int? outputCompression = default,
121115
string? user = default,
122116
global::tryAGI.OpenAI.InputFidelity? inputFidelity = default,
123-
bool? stream = default,
124117
int? partialImages = default,
125118
global::tryAGI.OpenAI.CreateImageEditRequestQuality? quality = default,
126119
global::System.Threading.CancellationToken cancellationToken = default);

0 commit comments

Comments
 (0)