Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit23f814b

Browse files
github-actions[bot]actions-userjorgerangel-msft
authored
Succeeded with Issues: Update @typespec/http-client-csharp to 1.0.0-alpha.20251031.1 (#802)
* Update @typespec/http-client-csharp to 1.0.0-alpha.20251031.1- Updated @typespec/http-client-csharp from 1.0.0-alpha.20251022.4 to 1.0.0-alpha.20251031.1- Updated Microsoft.TypeSpec.Generator.ClientModel from 1.0.0-alpha.20251022.4 to 1.0.0-alpha.20251031.1- Regenerated OpenAI SDK code with new generator version- Updated centrally managed package-lock.json file with new dependency versions* fix partial---------Co-authored-by: GitHub Action <action@github.com>Co-authored-by: Jorge Rangel <jorgerangel@microsoft.com>
1 parent90943c6 commit23f814b

File tree

87 files changed

+176
-138
lines changed

Some content is hidden

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

87 files changed

+176
-138
lines changed

‎codegen/generator/src/OpenAI.Library.Plugin.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReferenceInclude="Microsoft.TypeSpec.Generator.ClientModel"Version="1.0.0-alpha.20251022.4" />
11+
<PackageReferenceInclude="Microsoft.TypeSpec.Generator.ClientModel"Version="1.0.0-alpha.20251031.1" />
1212
</ItemGroup>
1313

1414
<!-- Copy output to package dist path for local execution and-->

‎codegen/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dependencies": {
3131
"@open-ai/plugin":"file:",
3232
"@azure-tools/typespec-client-generator-core":"0.61.0",
33-
"@typespec/http-client-csharp":"1.0.0-alpha.20251022.4",
33+
"@typespec/http-client-csharp":"1.0.0-alpha.20251031.1",
3434
"@typespec/http":"1.5.0",
3535
"@typespec/openapi":"1.5.0"
3636
},

‎package-lock.json‎

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎src/Custom/Internal/CancellationTokenExtensions.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespaceOpenAI;
55

6-
internalstaticclassCancellationTokenExtensions
6+
internalstaticpartialclassCancellationTokenExtensions
77
{
88
publicstaticRequestOptionsToRequestOptions(thisCancellationTokencancellationToken,boolstreaming=false)
99
{

‎src/Generated/AssistantClient.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public virtual CollectionResult<Assistant> GetAssistants(AssistantCollectionOpti
5353
options?.Order?.ToString(),
5454
options?.AfterId,
5555
options?.BeforeId,
56-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
56+
cancellationToken.ToRequestOptions());
5757
}
5858

5959
publicvirtualAsyncCollectionResult<Assistant>GetAssistantsAsync(AssistantCollectionOptionsoptions=default,CancellationTokencancellationToken=default)
@@ -64,7 +64,7 @@ public virtual AsyncCollectionResult<Assistant> GetAssistantsAsync(AssistantColl
6464
options?.Order?.ToString(),
6565
options?.AfterId,
6666
options?.BeforeId,
67-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
67+
cancellationToken.ToRequestOptions());
6868
}
6969

7070
publicvirtualClientResultCreateAssistant(BinaryContentcontent,RequestOptionsoptions=null)

‎src/Generated/BatchClient.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ public virtual AsyncCollectionResult GetBatchesAsync(string after, int? limit, R
3535

3636
publicvirtualCollectionResult<BatchJob>GetBatches(BatchCollectionOptionsoptions=default,CancellationTokencancellationToken=default)
3737
{
38-
returnnewBatchClientGetBatchesCollectionResultOfT(this,options?.AfterId,options?.PageSizeLimit,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
38+
returnnewBatchClientGetBatchesCollectionResultOfT(this,options?.AfterId,options?.PageSizeLimit,cancellationToken.ToRequestOptions());
3939
}
4040

4141
publicvirtualAsyncCollectionResult<BatchJob>GetBatchesAsync(BatchCollectionOptionsoptions=default,CancellationTokencancellationToken=default)
4242
{
43-
returnnewBatchClientGetBatchesAsyncCollectionResultOfT(this,options?.AfterId,options?.PageSizeLimit,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
43+
returnnewBatchClientGetBatchesAsyncCollectionResultOfT(this,options?.AfterId,options?.PageSizeLimit,cancellationToken.ToRequestOptions());
4444
}
4545

4646
publicvirtualClientResultGetBatch(stringbatchId,RequestOptionsoptions)

‎src/Generated/ChatClient.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public virtual CollectionResult<ChatCompletion> GetChatCompletions(ChatCompletio
5959
options?.Order?.ToString(),
6060
options?.Metadata,
6161
options?.Model,
62-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
62+
cancellationToken.ToRequestOptions());
6363
}
6464

6565
[Experimental("OPENAI001")]
@@ -72,7 +72,7 @@ public virtual AsyncCollectionResult<ChatCompletion> GetChatCompletionsAsync(Cha
7272
options?.Order?.ToString(),
7373
options?.Metadata,
7474
options?.Model,
75-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
75+
cancellationToken.ToRequestOptions());
7676
}
7777

7878
publicvirtualClientResultCompleteChat(BinaryContentcontent,RequestOptionsoptions=null)
@@ -186,7 +186,7 @@ public virtual CollectionResult<ChatCompletionMessageListDatum> GetChatCompletio
186186
options?.AfterId,
187187
options?.PageSizeLimit,
188188
options?.Order?.ToString(),
189-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
189+
cancellationToken.ToRequestOptions());
190190
}
191191

192192
[Experimental("OPENAI001")]
@@ -200,7 +200,7 @@ public virtual AsyncCollectionResult<ChatCompletionMessageListDatum> GetChatComp
200200
options?.AfterId,
201201
options?.PageSizeLimit,
202202
options?.Order?.ToString(),
203-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
203+
cancellationToken.ToRequestOptions());
204204
}
205205
}
206206
}

‎src/Generated/ContainerClient.cs‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ public virtual AsyncCollectionResult GetContainersAsync(int? limit, string order
3535

3636
publicvirtualCollectionResult<ContainerResource>GetContainers(ContainerCollectionOptionsoptions=default,CancellationTokencancellationToken=default)
3737
{
38-
returnnewContainerClientGetContainersCollectionResultOfT(this,options?.PageSizeLimit,options?.Order?.ToString(),options?.AfterId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
38+
returnnewContainerClientGetContainersCollectionResultOfT(this,options?.PageSizeLimit,options?.Order?.ToString(),options?.AfterId,cancellationToken.ToRequestOptions());
3939
}
4040

4141
publicvirtualAsyncCollectionResult<ContainerResource>GetContainersAsync(ContainerCollectionOptionsoptions=default,CancellationTokencancellationToken=default)
4242
{
43-
returnnewContainerClientGetContainersAsyncCollectionResultOfT(this,options?.PageSizeLimit,options?.Order?.ToString(),options?.AfterId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
43+
returnnewContainerClientGetContainersAsyncCollectionResultOfT(this,options?.PageSizeLimit,options?.Order?.ToString(),options?.AfterId,cancellationToken.ToRequestOptions());
4444
}
4545

4646
publicvirtualClientResultCreateContainer(BinaryContentcontent,RequestOptionsoptions=null)
@@ -63,15 +63,15 @@ public virtual ClientResult<ContainerResource> CreateContainer(CreateContainerBo
6363
{
6464
Argument.AssertNotNull(body,nameof(body));
6565

66-
ClientResultresult=CreateContainer(body,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
66+
ClientResultresult=CreateContainer(body,cancellationToken.ToRequestOptions());
6767
returnClientResult.FromValue((ContainerResource)result,result.GetRawResponse());
6868
}
6969

7070
publicvirtualasyncTask<ClientResult<ContainerResource>>CreateContainerAsync(CreateContainerBodybody,CancellationTokencancellationToken=default)
7171
{
7272
Argument.AssertNotNull(body,nameof(body));
7373

74-
ClientResultresult=awaitCreateContainerAsync(body,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null).ConfigureAwait(false);
74+
ClientResultresult=awaitCreateContainerAsync(body,cancellationToken.ToRequestOptions()).ConfigureAwait(false);
7575
returnClientResult.FromValue((ContainerResource)result,result.GetRawResponse());
7676
}
7777

@@ -95,15 +95,15 @@ public virtual ClientResult<ContainerResource> GetContainer(string containerId,
9595
{
9696
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
9797

98-
ClientResultresult=GetContainer(containerId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
98+
ClientResultresult=GetContainer(containerId,cancellationToken.ToRequestOptions());
9999
returnClientResult.FromValue((ContainerResource)result,result.GetRawResponse());
100100
}
101101

102102
publicvirtualasyncTask<ClientResult<ContainerResource>>GetContainerAsync(stringcontainerId,CancellationTokencancellationToken=default)
103103
{
104104
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
105105

106-
ClientResultresult=awaitGetContainerAsync(containerId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null).ConfigureAwait(false);
106+
ClientResultresult=awaitGetContainerAsync(containerId,cancellationToken.ToRequestOptions()).ConfigureAwait(false);
107107
returnClientResult.FromValue((ContainerResource)result,result.GetRawResponse());
108108
}
109109

@@ -127,15 +127,15 @@ public virtual ClientResult<DeleteContainerResponse> DeleteContainer(string cont
127127
{
128128
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
129129

130-
ClientResultresult=DeleteContainer(containerId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
130+
ClientResultresult=DeleteContainer(containerId,cancellationToken.ToRequestOptions());
131131
returnClientResult.FromValue((DeleteContainerResponse)result,result.GetRawResponse());
132132
}
133133

134134
publicvirtualasyncTask<ClientResult<DeleteContainerResponse>>DeleteContainerAsync(stringcontainerId,CancellationTokencancellationToken=default)
135135
{
136136
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
137137

138-
ClientResultresult=awaitDeleteContainerAsync(containerId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null).ConfigureAwait(false);
138+
ClientResultresult=awaitDeleteContainerAsync(containerId,cancellationToken.ToRequestOptions()).ConfigureAwait(false);
139139
returnClientResult.FromValue((DeleteContainerResponse)result,result.GetRawResponse());
140140
}
141141

@@ -193,7 +193,7 @@ public virtual CollectionResult<ContainerFileResource> GetContainerFiles(string
193193
options?.PageSizeLimit,
194194
options?.Order?.ToString(),
195195
options?.AfterId,
196-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
196+
cancellationToken.ToRequestOptions());
197197
}
198198

199199
publicvirtualAsyncCollectionResult<ContainerFileResource>GetContainerFilesAsync(stringcontainerId,ContainerFileCollectionOptionsoptions=default,CancellationTokencancellationToken=default)
@@ -206,7 +206,7 @@ public virtual AsyncCollectionResult<ContainerFileResource> GetContainerFilesAsy
206206
options?.PageSizeLimit,
207207
options?.Order?.ToString(),
208208
options?.AfterId,
209-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
209+
cancellationToken.ToRequestOptions());
210210
}
211211

212212
publicvirtualClientResultGetContainerFile(stringcontainerId,stringfileId,RequestOptionsoptions)
@@ -232,7 +232,7 @@ public virtual ClientResult<ContainerFileResource> GetContainerFile(string conta
232232
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
233233
Argument.AssertNotNullOrEmpty(fileId,nameof(fileId));
234234

235-
ClientResultresult=GetContainerFile(containerId,fileId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
235+
ClientResultresult=GetContainerFile(containerId,fileId,cancellationToken.ToRequestOptions());
236236
returnClientResult.FromValue((ContainerFileResource)result,result.GetRawResponse());
237237
}
238238

@@ -241,7 +241,7 @@ public virtual async Task<ClientResult<ContainerFileResource>> GetContainerFileA
241241
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
242242
Argument.AssertNotNullOrEmpty(fileId,nameof(fileId));
243243

244-
ClientResultresult=awaitGetContainerFileAsync(containerId,fileId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null).ConfigureAwait(false);
244+
ClientResultresult=awaitGetContainerFileAsync(containerId,fileId,cancellationToken.ToRequestOptions()).ConfigureAwait(false);
245245
returnClientResult.FromValue((ContainerFileResource)result,result.GetRawResponse());
246246
}
247247

@@ -268,7 +268,7 @@ public virtual ClientResult<DeleteContainerFileResponse> DeleteContainerFile(str
268268
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
269269
Argument.AssertNotNullOrEmpty(fileId,nameof(fileId));
270270

271-
ClientResultresult=DeleteContainerFile(containerId,fileId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
271+
ClientResultresult=DeleteContainerFile(containerId,fileId,cancellationToken.ToRequestOptions());
272272
returnClientResult.FromValue((DeleteContainerFileResponse)result,result.GetRawResponse());
273273
}
274274

@@ -277,7 +277,7 @@ public virtual async Task<ClientResult<DeleteContainerFileResponse>> DeleteConta
277277
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
278278
Argument.AssertNotNullOrEmpty(fileId,nameof(fileId));
279279

280-
ClientResultresult=awaitDeleteContainerFileAsync(containerId,fileId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null).ConfigureAwait(false);
280+
ClientResultresult=awaitDeleteContainerFileAsync(containerId,fileId,cancellationToken.ToRequestOptions()).ConfigureAwait(false);
281281
returnClientResult.FromValue((DeleteContainerFileResponse)result,result.GetRawResponse());
282282
}
283283

@@ -304,7 +304,7 @@ public virtual ClientResult<BinaryData> DownloadContainerFile(string containerId
304304
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
305305
Argument.AssertNotNullOrEmpty(fileId,nameof(fileId));
306306

307-
ClientResultresult=DownloadContainerFile(containerId,fileId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
307+
ClientResultresult=DownloadContainerFile(containerId,fileId,cancellationToken.ToRequestOptions());
308308
returnClientResult.FromValue(result.GetRawResponse().Content,result.GetRawResponse());
309309
}
310310

@@ -313,7 +313,7 @@ public virtual async Task<ClientResult<BinaryData>> DownloadContainerFileAsync(s
313313
Argument.AssertNotNullOrEmpty(containerId,nameof(containerId));
314314
Argument.AssertNotNullOrEmpty(fileId,nameof(fileId));
315315

316-
ClientResultresult=awaitDownloadContainerFileAsync(containerId,fileId,cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null).ConfigureAwait(false);
316+
ClientResultresult=awaitDownloadContainerFileAsync(containerId,fileId,cancellationToken.ToRequestOptions()).ConfigureAwait(false);
317317
returnClientResult.FromValue(result.GetRawResponse().Content,result.GetRawResponse());
318318
}
319319
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// <auto-generated/>
2+
3+
#nullable disable
4+
5+
usingSystem.ClientModel.Primitives;
6+
usingSystem.Threading;
7+
8+
namespaceOpenAI
9+
{
10+
internalstaticpartialclassCancellationTokenExtensions
11+
{
12+
publicstaticRequestOptionsToRequestOptions(thisCancellationTokencancellationToken)=>cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null;
13+
}
14+
}

‎src/Generated/InternalAssistantMessageClient.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public virtual CollectionResult<ThreadMessage> GetMessages(string threadId, Mess
6565
options?.Order?.ToString(),
6666
options?.AfterId,
6767
options?.BeforeId,
68-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
68+
cancellationToken.ToRequestOptions());
6969
}
7070

7171
publicvirtualAsyncCollectionResult<ThreadMessage>GetMessagesAsync(stringthreadId,MessageCollectionOptionsoptions=default,CancellationTokencancellationToken=default)
@@ -79,7 +79,7 @@ public virtual AsyncCollectionResult<ThreadMessage> GetMessagesAsync(string thre
7979
options?.Order?.ToString(),
8080
options?.AfterId,
8181
options?.BeforeId,
82-
cancellationToken.CanBeCanceled?newRequestOptions{CancellationToken=cancellationToken}:null);
82+
cancellationToken.ToRequestOptions());
8383
}
8484
}
8585
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp