Skip to content

Commit 2d49298

Browse files
committed
Merge branch 'main' of https://github.com/openai/openai-dotnet into shreja_VideosAPI
2 parents a5a7ad9 + 38c3c66 commit 2d49298

19 files changed

+130
-58
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-
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20251020.2" />
11+
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20251021.4" />
1212
</ItemGroup>
1313

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

codegen/generator/src/Visitors/MetadataQueryParamVisitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ dictionaryExpression.Original is VariableExpression variable &&
9292
if (statement is ExpressionStatement expressionStatement3 &&
9393
expressionStatement3.Expression is InvokeMethodExpression invokeMethodExpression &&
9494
invokeMethodExpression.MethodName == "AppendQueryDelimited" &&
95-
invokeMethodExpression.Arguments.Count == 5 &&
95+
invokeMethodExpression.Arguments.Count == 4 &&
9696
invokeMethodExpression.Arguments[0].ToDisplayString() == "\"metadata\"")
9797
{
9898
return new SingleLineCommentStatement("Plugin customization: remove unnecessary AppendQueryDelimited for metadata");

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.20251020.2",
33+
"@typespec/http-client-csharp": "1.0.0-alpha.20251021.4",
3434
"@typespec/http": "1.5.0",
3535
"@typespec/openapi": "1.5.0"
3636
},

package-lock.json

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

scripts/Export-Api.ps1

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function Invoke-GenAPI {
107107
Write-Output ""
108108

109109
# System.ClientModel
110-
$systemClientModelPath = Join-Path $nugetPackagesPath "system.clientmodel\1.6.1"
110+
$systemClientModelPath = Join-Path $nugetPackagesPath "system.clientmodel\1.7.0"
111111
$systemClientModelRef = $null
112112
if (Test-Path $systemClientModelPath) {
113113
$systemClientModelRef = Get-ChildItem `
@@ -121,6 +121,21 @@ function Invoke-GenAPI {
121121
Write-Output " $($systemClientModelRef)"
122122
Write-Output ""
123123

124+
# System.Net.ServerSentEvents
125+
$systemNetServerSentEventsPath = Join-Path $nugetPackagesPath "system.net.serversentevents\9.0.9"
126+
$systemNetServerSentEventsRef = $null
127+
if (Test-Path $systemNetServerSentEventsPath) {
128+
$systemNetServerSentEventsRef = Get-ChildItem `
129+
-Path $systemNetServerSentEventsPath `
130+
-Include $(($TargetFramework -eq "netstandard2.0") ? "netstandard2.0" : "net8.0") `
131+
-Recurse |
132+
Select-Object -Last 1
133+
}
134+
135+
Write-Output " * System.Net.ServerSentEvents:"
136+
Write-Output " $($systemNetServerSentEventsRef)"
137+
Write-Output ""
138+
124139
# Microsoft.Extensions.Logging.Abstractions
125140
$microsoftExtensionsLoggingAbstractionsPath = Join-Path $nugetPackagesPath "microsoft.extensions.logging.abstractions\8.0.3"
126141
$microsoftExtensionsLoggingAbstractionsRef = $null
@@ -209,6 +224,7 @@ function Invoke-GenAPI {
209224

210225
if ($netRef) { $genapiArgs += @("--assembly-reference", $netRef) }
211226
if ($systemClientModelRef) { $genapiArgs += @("--assembly-reference", $systemClientModelRef) }
227+
if ($systemNetServerSentEventsRef) { $genapiArgs += @("--assembly-reference", $systemNetServerSentEventsRef) }
212228
if ($microsoftExtensionsLoggingAbstractionsRef) { $genapiArgs += @("--assembly-reference", $microsoftExtensionsLoggingAbstractionsRef) }
213229
if ($microsoftExtensionsDependencyInjectionAbstractionsRef) { $genapiArgs += @("--assembly-reference", $microsoftExtensionsDependencyInjectionAbstractionsRef) }
214230
if ($systemMemoryDataRef) { $genapiArgs += @("--assembly-reference", $systemMemoryDataRef) }

src/Generated/AssistantClient.RestClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal virtual PipelineMessage CreateGetAssistantsRequest(int? limit, string o
2121
uri.AppendPath("/assistants", false);
2222
if (limit != null)
2323
{
24-
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
24+
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
2525
}
2626
if (order != null)
2727
{

src/Generated/BatchClient.RestClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ internal virtual PipelineMessage CreateGetBatchesRequest(string after, int? limi
3939
}
4040
if (limit != null)
4141
{
42-
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
42+
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
4343
}
4444
PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200);
4545
PipelineRequest request = message.Request;

src/Generated/ChatClient.RestClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal virtual PipelineMessage CreateGetChatCompletionsRequest(string after, i
2626
}
2727
if (limit != null)
2828
{
29-
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
29+
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
3030
}
3131
if (order != null)
3232
{
@@ -121,7 +121,7 @@ internal virtual PipelineMessage CreateGetChatCompletionMessagesRequest(string c
121121
}
122122
if (limit != null)
123123
{
124-
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
124+
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
125125
}
126126
if (order != null)
127127
{

src/Generated/ContainerClient.RestClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal virtual PipelineMessage CreateGetContainersRequest(int? limit, string o
2121
uri.AppendPath("/containers", false);
2222
if (limit != null)
2323
{
24-
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
24+
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
2525
}
2626
if (order != null)
2727
{
@@ -103,7 +103,7 @@ internal virtual PipelineMessage CreateGetContainerFilesRequest(string container
103103
uri.AppendPath("/files", false);
104104
if (limit != null)
105105
{
106-
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
106+
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
107107
}
108108
if (order != null)
109109
{

src/Generated/EvaluationClient.RestClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal virtual PipelineMessage CreateGetEvalsRequest(string after, int? limit,
2828
}
2929
if (limit != null)
3030
{
31-
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
31+
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
3232
}
3333
if (order != null)
3434
{
@@ -113,7 +113,7 @@ internal virtual PipelineMessage CreateGetEvalRunsRequest(string evalId, string
113113
}
114114
if (limit != null)
115115
{
116-
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
116+
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
117117
}
118118
if (order != null)
119119
{
@@ -206,7 +206,7 @@ internal virtual PipelineMessage CreateGetEvalRunOutputItemsRequest(string evalI
206206
}
207207
if (limit != null)
208208
{
209-
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
209+
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
210210
}
211211
if (status != null)
212212
{

0 commit comments

Comments
 (0)