Skip to content

Commit 837d94f

Browse files
actions-userjorgerangel-msft
authored andcommitted
Update @typespec/http-client-csharp to 1.0.0-alpha.20250929.2
- Updated @typespec/http-client-csharp from 1.0.0-alpha.20250926.1 to 1.0.0-alpha.20250929.2 - Updated Microsoft.TypeSpec.Generator.ClientModel from 1.0.0-alpha.20250926.1 to 1.0.0-alpha.20250929.2 - Regenerated OpenAI SDK code with new generator version - Updated centrally managed package-lock.json file with new dependency versions
1 parent b5d0881 commit 837d94f

8 files changed

+142
-100
lines changed

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

Lines changed: 2 additions & 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.20250926.1" />
11+
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250929.2" />
1212
</ItemGroup>
1313

1414
<!-- Copy output to package dist path for local execution and -->
@@ -25,3 +25,4 @@
2525

2626

2727

28+

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.60.0",
33-
"@typespec/http-client-csharp": "1.0.0-alpha.20250926.1",
33+
"@typespec/http-client-csharp": "1.0.0-alpha.20250929.2",
3434
"@typespec/http": "1.4.0",
3535
"@typespec/openapi": "1.4.0"
3636
},

package-lock.json

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

src/Generated/Models/Audio/AudioTranslation.Serialization.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#nullable disable
44

55
using System;
6+
using System.ClientModel;
67
using System.ClientModel.Primitives;
78
using System.Collections.Generic;
89
using System.Diagnostics.CodeAnalysis;
@@ -193,5 +194,13 @@ protected virtual AudioTranslation PersistableModelCreateCore(BinaryData data, M
193194
}
194195

195196
string IPersistableModel<AudioTranslation>.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
197+
198+
[Experimental("OPENAI001")]
199+
public static explicit operator AudioTranslation(ClientResult result)
200+
{
201+
using PipelineResponse response = result.GetRawResponse();
202+
using JsonDocument document = JsonDocument.Parse(response.Content);
203+
return DeserializeAudioTranslation(document.RootElement, ModelSerializationExtensions.WireOptions);
204+
}
196205
}
197206
}

src/Generated/Models/Audio/InternalCreateTranscriptionResponseJson.Serialization.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#nullable disable
44

55
using System;
6+
using System.ClientModel;
67
using System.ClientModel.Primitives;
78
using System.Collections.Generic;
89
using System.Text.Json;
@@ -148,5 +149,12 @@ protected virtual InternalCreateTranscriptionResponseJson PersistableModelCreate
148149
}
149150

150151
string IPersistableModel<InternalCreateTranscriptionResponseJson>.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
152+
153+
public static explicit operator InternalCreateTranscriptionResponseJson(ClientResult result)
154+
{
155+
using PipelineResponse response = result.GetRawResponse();
156+
using JsonDocument document = JsonDocument.Parse(response.Content);
157+
return DeserializeInternalCreateTranscriptionResponseJson(document.RootElement, ModelSerializationExtensions.WireOptions);
158+
}
151159
}
152160
}

src/Generated/Models/Audio/InternalCreateTranscriptionResponseVerboseJson.Serialization.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#nullable disable
44

55
using System;
6+
using System.ClientModel;
67
using System.ClientModel.Primitives;
78
using System.Collections.Generic;
89
using System.Text.Json;
@@ -215,5 +216,12 @@ protected virtual InternalCreateTranscriptionResponseVerboseJson PersistableMode
215216
}
216217

217218
string IPersistableModel<InternalCreateTranscriptionResponseVerboseJson>.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
219+
220+
public static explicit operator InternalCreateTranscriptionResponseVerboseJson(ClientResult result)
221+
{
222+
using PipelineResponse response = result.GetRawResponse();
223+
using JsonDocument document = JsonDocument.Parse(response.Content);
224+
return DeserializeInternalCreateTranscriptionResponseVerboseJson(document.RootElement, ModelSerializationExtensions.WireOptions);
225+
}
218226
}
219227
}

src/Generated/Models/Audio/InternalCreateTranslationResponseJson.Serialization.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#nullable disable
44

55
using System;
6+
using System.ClientModel;
67
using System.ClientModel.Primitives;
78
using System.Collections.Generic;
89
using System.Text.Json;
@@ -123,5 +124,12 @@ protected virtual InternalCreateTranslationResponseJson PersistableModelCreateCo
123124
}
124125

125126
string IPersistableModel<InternalCreateTranslationResponseJson>.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
127+
128+
public static explicit operator InternalCreateTranslationResponseJson(ClientResult result)
129+
{
130+
using PipelineResponse response = result.GetRawResponse();
131+
using JsonDocument document = JsonDocument.Parse(response.Content);
132+
return DeserializeInternalCreateTranslationResponseJson(document.RootElement, ModelSerializationExtensions.WireOptions);
133+
}
126134
}
127135
}

src/Generated/Models/Audio/StreamingAudioTranscriptionUpdate.Serialization.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#nullable disable
44

55
using System;
6+
using System.ClientModel;
67
using System.ClientModel.Primitives;
78
using System.Text.Json;
89
using OpenAI;
@@ -121,5 +122,12 @@ protected virtual StreamingAudioTranscriptionUpdate PersistableModelCreateCore(B
121122
}
122123

123124
string IPersistableModel<StreamingAudioTranscriptionUpdate>.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
125+
126+
public static explicit operator StreamingAudioTranscriptionUpdate(ClientResult result)
127+
{
128+
using PipelineResponse response = result.GetRawResponse();
129+
using JsonDocument document = JsonDocument.Parse(response.Content);
130+
return DeserializeStreamingAudioTranscriptionUpdate(document.RootElement, ModelSerializationExtensions.WireOptions);
131+
}
124132
}
125133
}

0 commit comments

Comments
 (0)