Skip to content

Commit a1a6b0a

Browse files
committed
test: Update OpenAI spec.
1 parent 0300601 commit a1a6b0a

File tree

1,158 files changed

+87611
-13643
lines changed

Some content is hidden

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

1,158 files changed

+87611
-13643
lines changed

specs/openai.yaml

Lines changed: 21982 additions & 9326 deletions
Large diffs are not rendered by default.

src/tests/AutoSDK.SnapshotTests/Snapshots/openai/NewtonsoftJson/_#G.AudioClient.CreateSpeech.g.verified.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ partial void ProcessCreateSpeechResponseContent(
177177
/// Default Value: mp3
178178
/// </param>
179179
/// <param name="speed">
180-
/// The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.<br/>
180+
/// The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default. Does not work with `gpt-4o-mini-tts`.<br/>
181181
/// Default Value: 1
182182
/// </param>
183183
/// <param name="cancellationToken">The token to cancel the operation with</param>

src/tests/AutoSDK.SnapshotTests/Snapshots/openai/NewtonsoftJson/_#G.AudioClient.CreateTranscription.g.verified.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ partial void ProcessCreateTranscriptionResponseContent(
116116
__httpRequestContent.Add(
117117
content: new global::System.Net.Http.StringContent($"{request.Stream}"),
118118
name: "stream");
119+
}
120+
if (request.ChunkingStrategy != default)
121+
{
122+
__httpRequestContent.Add(
123+
content: new global::System.Net.Http.StringContent(request.ChunkingStrategy?.ToString() ?? string.Empty),
124+
name: "chunking_strategy");
119125
}
120126
__httpRequest.Content = __httpRequestContent;
121127

@@ -257,6 +263,9 @@ partial void ProcessCreateTranscriptionResponseContent(
257263
/// Note: Streaming is not supported for the `whisper-1` model and will be ignored.<br/>
258264
/// Default Value: false
259265
/// </param>
266+
/// <param name="chunkingStrategy">
267+
/// Controls how the audio is cut into chunks. When set to `"auto"`, the server first normalizes loudness and then uses voice activity detection (VAD) to choose boundaries. `server_vad` object can be provided to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block.
268+
/// </param>
260269
/// <param name="cancellationToken">The token to cancel the operation with</param>
261270
/// <exception cref="global::System.InvalidOperationException"></exception>
262271
public async global::System.Threading.Tasks.Task<global::G.OneOf<global::G.CreateTranscriptionResponseJson, global::G.CreateTranscriptionResponseVerboseJson>> CreateTranscriptionAsync(
@@ -270,6 +279,7 @@ partial void ProcessCreateTranscriptionResponseContent(
270279
global::System.Collections.Generic.IList<global::G.TranscriptionInclude>? include = default,
271280
global::System.Collections.Generic.IList<global::G.CreateTranscriptionRequestTimestampGranularitie>? timestampGranularities = default,
272281
bool? stream = default,
282+
global::G.AnyOf<global::G.CreateTranscriptionRequestChunkingStrategy?, global::G.VadConfig>? chunkingStrategy = default,
273283
global::System.Threading.CancellationToken cancellationToken = default)
274284
{
275285
var __request = new global::G.CreateTranscriptionRequest
@@ -284,6 +294,7 @@ partial void ProcessCreateTranscriptionResponseContent(
284294
Include = include,
285295
TimestampGranularities = timestampGranularities,
286296
Stream = stream,
297+
ChunkingStrategy = chunkingStrategy,
287298
};
288299

289300
return await CreateTranscriptionAsync(

src/tests/AutoSDK.SnapshotTests/Snapshots/openai/NewtonsoftJson/_#G.CertificatesClient.DeactivateProjectCertificates.g.verified.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ partial void ProcessDeactivateProjectCertificatesResponseContent(
2525
ref string content);
2626

2727
/// <summary>
28-
/// Deactivate certificates at the project level.<br/>
29-
/// You can atomically and idempotently deactivate up to 10 certificates at a time.
28+
/// Deactivate certificates at the project level. You can atomically and <br/>
29+
/// idempotently deactivate up to 10 certificates at a time.
3030
/// </summary>
3131
/// <param name="projectId"></param>
3232
/// <param name="request"></param>
@@ -174,8 +174,8 @@ partial void ProcessDeactivateProjectCertificatesResponseContent(
174174
}
175175

176176
/// <summary>
177-
/// Deactivate certificates at the project level.<br/>
178-
/// You can atomically and idempotently deactivate up to 10 certificates at a time.
177+
/// Deactivate certificates at the project level. You can atomically and <br/>
178+
/// idempotently deactivate up to 10 certificates at a time.
179179
/// </summary>
180180
/// <param name="projectId"></param>
181181
/// <param name="certificateIds"></param>

src/tests/AutoSDK.SnapshotTests/Snapshots/openai/NewtonsoftJson/_#G.CertificatesClient.GetCertificate.g.verified.cs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ public partial class CertificatesClient
88
{
99
partial void PrepareGetCertificateArguments(
1010
global::System.Net.Http.HttpClient httpClient,
11-
ref string certId,
12-
global::System.Collections.Generic.IList<global::G.GetCertificateIncludeItem>? include,
13-
ref string certificateId);
11+
ref string certificateId,
12+
global::System.Collections.Generic.IList<global::G.GetCertificateIncludeItem>? include);
1413
partial void PrepareGetCertificateRequest(
1514
global::System.Net.Http.HttpClient httpClient,
1615
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
17-
string certId,
18-
global::System.Collections.Generic.IList<global::G.GetCertificateIncludeItem>? include,
19-
string certificateId);
16+
string certificateId,
17+
global::System.Collections.Generic.IList<global::G.GetCertificateIncludeItem>? include);
2018
partial void ProcessGetCertificateResponse(
2119
global::System.Net.Http.HttpClient httpClient,
2220
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -30,13 +28,11 @@ partial void ProcessGetCertificateResponseContent(
3028
/// Get a certificate that has been uploaded to the organization.<br/>
3129
/// You can get a certificate regardless of whether it is active or not.
3230
/// </summary>
33-
/// <param name="certId"></param>
34-
/// <param name="include"></param>
3531
/// <param name="certificateId"></param>
32+
/// <param name="include"></param>
3633
/// <param name="cancellationToken">The token to cancel the operation with</param>
3734
/// <exception cref="global::G.ApiException"></exception>
3835
public async global::System.Threading.Tasks.Task<global::G.Certificate> GetCertificateAsync(
39-
string certId,
4036
string certificateId,
4137
global::System.Collections.Generic.IList<global::G.GetCertificateIncludeItem>? include = default,
4238
global::System.Threading.CancellationToken cancellationToken = default)
@@ -45,9 +41,8 @@ partial void ProcessGetCertificateResponseContent(
4541
client: HttpClient);
4642
PrepareGetCertificateArguments(
4743
httpClient: HttpClient,
48-
certId: ref certId,
49-
include: include,
50-
certificateId: ref certificateId);
44+
certificateId: ref certificateId,
45+
include: include);
5146

5247
var __pathBuilder = new global::G.PathBuilder(
5348
path: $"/organization/certificates/{certificateId}",
@@ -86,9 +81,8 @@ partial void ProcessGetCertificateResponseContent(
8681
PrepareGetCertificateRequest(
8782
httpClient: HttpClient,
8883
httpRequestMessage: __httpRequest,
89-
certId: certId,
90-
include: include,
91-
certificateId: certificateId);
84+
certificateId: certificateId,
85+
include: include);
9286

9387
using var __response = await HttpClient.SendAsync(
9488
request: __httpRequest,

src/tests/AutoSDK.SnapshotTests/Snapshots/openai/NewtonsoftJson/_#G.CertificatesClient.ListProjectCertificates.g.verified.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ public partial class CertificatesClient
88
{
99
partial void PrepareListProjectCertificatesArguments(
1010
global::System.Net.Http.HttpClient httpClient,
11+
ref string projectId,
1112
ref int? limit,
1213
ref string? after,
13-
ref global::G.ListProjectCertificatesOrder? order,
14-
ref string projectId);
14+
ref global::G.ListProjectCertificatesOrder? order);
1515
partial void PrepareListProjectCertificatesRequest(
1616
global::System.Net.Http.HttpClient httpClient,
1717
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
18+
string projectId,
1819
int? limit,
1920
string? after,
20-
global::G.ListProjectCertificatesOrder? order,
21-
string projectId);
21+
global::G.ListProjectCertificatesOrder? order);
2222
partial void ProcessListProjectCertificatesResponse(
2323
global::System.Net.Http.HttpClient httpClient,
2424
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -31,14 +31,14 @@ partial void ProcessListProjectCertificatesResponseContent(
3131
/// <summary>
3232
/// List certificates for this project.
3333
/// </summary>
34+
/// <param name="projectId"></param>
3435
/// <param name="limit">
3536
/// Default Value: 20
3637
/// </param>
3738
/// <param name="after"></param>
3839
/// <param name="order">
3940
/// Default Value: desc
4041
/// </param>
41-
/// <param name="projectId"></param>
4242
/// <param name="cancellationToken">The token to cancel the operation with</param>
4343
/// <exception cref="global::G.ApiException"></exception>
4444
public async global::System.Threading.Tasks.Task<global::G.ListCertificatesResponse> ListProjectCertificatesAsync(
@@ -52,10 +52,10 @@ partial void ProcessListProjectCertificatesResponseContent(
5252
client: HttpClient);
5353
PrepareListProjectCertificatesArguments(
5454
httpClient: HttpClient,
55+
projectId: ref projectId,
5556
limit: ref limit,
5657
after: ref after,
57-
order: ref order,
58-
projectId: ref projectId);
58+
order: ref order);
5959

6060
var orderValue = order switch
6161
{
@@ -102,10 +102,10 @@ partial void ProcessListProjectCertificatesResponseContent(
102102
PrepareListProjectCertificatesRequest(
103103
httpClient: HttpClient,
104104
httpRequestMessage: __httpRequest,
105+
projectId: projectId,
105106
limit: limit,
106107
after: after,
107-
order: order,
108-
projectId: projectId);
108+
order: order);
109109

110110
using var __response = await HttpClient.SendAsync(
111111
request: __httpRequest,

src/tests/AutoSDK.SnapshotTests/Snapshots/openai/NewtonsoftJson/_#G.EmbeddingsClient.CreateEmbedding.g.verified.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ partial void ProcessCreateEmbeddingResponseContent(
170170
/// Creates an embedding vector representing the input text.
171171
/// </summary>
172172
/// <param name="input">
173-
/// Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. Some models may also impose a limit on total number of tokens summed across inputs.<br/>
173+
/// Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request.<br/>
174174
/// Example: The quick brown fox jumped over the lazy dog
175175
/// </param>
176176
/// <param name="model">

src/tests/AutoSDK.SnapshotTests/Snapshots/openai/NewtonsoftJson/_#G.EvalsClient.CreateEval.g.verified.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ partial void ProcessCreateEvalResponseContent(
2424

2525
/// <summary>
2626
/// Create the structure of an evaluation that can be used to test a model's performance.<br/>
27-
/// An evaluation is a set of testing criteria and a datasource. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.<br/>
27+
/// An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.<br/>
2828
/// For more information, see the [Evals guide](/docs/guides/evals).
2929
/// </summary>
3030
/// <param name="request"></param>
@@ -170,7 +170,7 @@ partial void ProcessCreateEvalResponseContent(
170170

171171
/// <summary>
172172
/// Create the structure of an evaluation that can be used to test a model's performance.<br/>
173-
/// An evaluation is a set of testing criteria and a datasource. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.<br/>
173+
/// An evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.<br/>
174174
/// For more information, see the [Evals guide](/docs/guides/evals).
175175
/// </summary>
176176
/// <param name="name">
@@ -184,16 +184,16 @@ partial void ProcessCreateEvalResponseContent(
184184
/// with a maximum length of 512 characters.
185185
/// </param>
186186
/// <param name="dataSourceConfig">
187-
/// The configuration for the data source used for the evaluation runs.
187+
/// The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation.
188188
/// </param>
189189
/// <param name="testingCriteria">
190-
/// A list of graders for all eval runs in this group.
190+
/// A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`).
191191
/// </param>
192192
/// <param name="cancellationToken">The token to cancel the operation with</param>
193193
/// <exception cref="global::System.InvalidOperationException"></exception>
194194
public async global::System.Threading.Tasks.Task<global::G.Eval> CreateEvalAsync(
195-
global::G.OneOf<global::G.CreateEvalCustomDataSourceConfig, global::G.CreateEvalLogsDataSourceConfig> dataSourceConfig,
196-
global::System.Collections.Generic.IList<global::G.OneOf<global::G.CreateEvalLabelModelGrader, global::G.EvalStringCheckGrader, global::G.EvalTextSimilarityGrader, global::G.EvalPythonGrader, global::G.EvalScoreModelGrader>> testingCriteria,
195+
global::G.OneOf<global::G.CreateEvalCustomDataSourceConfig, global::G.CreateEvalLogsDataSourceConfig, global::G.CreateEvalStoredCompletionsDataSourceConfig> dataSourceConfig,
196+
global::System.Collections.Generic.IList<global::G.OneOf<global::G.CreateEvalLabelModelGrader, global::G.EvalGraderStringCheck?, global::G.EvalGraderTextSimilarity?, global::G.EvalGraderPython?, global::G.EvalGraderScoreModel?>> testingCriteria,
197197
string? name = default,
198198
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
199199
global::System.Threading.CancellationToken cancellationToken = default)

src/tests/AutoSDK.SnapshotTests/Snapshots/openai/NewtonsoftJson/_#G.EvalsClient.CreateEvalRun.g.verified.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ partial void ProcessCreateEvalRunResponseContent(
2525
ref string content);
2626

2727
/// <summary>
28-
/// Create a new evaluation run. This is the endpoint that will kick off grading.
28+
/// Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation.
2929
/// </summary>
3030
/// <param name="evalId"></param>
3131
/// <param name="request"></param>
@@ -210,7 +210,7 @@ partial void ProcessCreateEvalRunResponseContent(
210210
}
211211

212212
/// <summary>
213-
/// Create a new evaluation run. This is the endpoint that will kick off grading.
213+
/// Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation.
214214
/// </summary>
215215
/// <param name="evalId"></param>
216216
/// <param name="name">

src/tests/AutoSDK.SnapshotTests/Snapshots/openai/NewtonsoftJson/_#G.FineTuningClient.CreateFineTuningJob.g.verified.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ partial void ProcessCreateFineTuningJobResponseContent(
2525
/// <summary>
2626
/// Creates a fine-tuning job which begins the process of creating a new model from a given dataset.<br/>
2727
/// Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.<br/>
28-
/// [Learn more about fine-tuning](/docs/guides/fine-tuning)
28+
/// [Learn more about fine-tuning](/docs/guides/model-optimization)
2929
/// </summary>
3030
/// <param name="request"></param>
3131
/// <param name="cancellationToken">The token to cancel the operation with</param>
@@ -171,7 +171,7 @@ partial void ProcessCreateFineTuningJobResponseContent(
171171
/// <summary>
172172
/// Creates a fine-tuning job which begins the process of creating a new model from a given dataset.<br/>
173173
/// Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.<br/>
174-
/// [Learn more about fine-tuning](/docs/guides/fine-tuning)
174+
/// [Learn more about fine-tuning](/docs/guides/model-optimization)
175175
/// </summary>
176176
/// <param name="model">
177177
/// The name of the model to fine-tune. You can select one of the<br/>
@@ -183,7 +183,7 @@ partial void ProcessCreateFineTuningJobResponseContent(
183183
/// See [upload file](/docs/api-reference/files/create) for how to upload a file.<br/>
184184
/// Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.<br/>
185185
/// The contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input), [completions](/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](/docs/api-reference/fine-tuning/preference-input) format.<br/>
186-
/// See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.<br/>
186+
/// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.<br/>
187187
/// Example: file-abc123
188188
/// </param>
189189
/// <param name="suffix">
@@ -197,7 +197,7 @@ partial void ProcessCreateFineTuningJobResponseContent(
197197
/// the fine-tuning results file.<br/>
198198
/// The same data should not be present in both train and validation files.<br/>
199199
/// Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.<br/>
200-
/// See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.<br/>
200+
/// See the [fine-tuning guide](/docs/guides/model-optimization) for more details.<br/>
201201
/// Example: file-abc123
202202
/// </param>
203203
/// <param name="integrations">

0 commit comments

Comments
 (0)