Skip to content

Commit 638c458

Browse files
bump to 1.0.0-alpha.20251009.7
1 parent 6b467cd commit 638c458

File tree

54 files changed

+21474
-14030
lines changed

Some content is hidden

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

54 files changed

+21474
-14030
lines changed

api/OpenAI.net8.0.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,8 @@ public class AudioTranslation : IJsonModel<AudioTranslation>, IPersistableModel<
12131213
[Experimental("OPENAI001")]
12141214
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
12151215
[Experimental("OPENAI001")]
1216+
public static explicit operator AudioTranslation(ClientResult result);
1217+
[Experimental("OPENAI001")]
12161218
protected virtual AudioTranslation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
12171219
[Experimental("OPENAI001")]
12181220
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
@@ -1342,6 +1344,7 @@ public class StreamingAudioTranscriptionTextDoneUpdate : StreamingAudioTranscrip
13421344
public class StreamingAudioTranscriptionUpdate : IJsonModel<StreamingAudioTranscriptionUpdate>, IPersistableModel<StreamingAudioTranscriptionUpdate> {
13431345
protected virtual StreamingAudioTranscriptionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
13441346
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
1347+
public static explicit operator StreamingAudioTranscriptionUpdate(ClientResult result);
13451348
protected virtual StreamingAudioTranscriptionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
13461349
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
13471350
}
@@ -2422,7 +2425,6 @@ public class CreateContainerBody : IJsonModel<CreateContainerBody>, IPersistable
24222425
[Experimental("OPENAI001")]
24232426
public class CreateContainerBodyExpiresAfter : IJsonModel<CreateContainerBodyExpiresAfter>, IPersistableModel<CreateContainerBodyExpiresAfter> {
24242427
public CreateContainerBodyExpiresAfter(int minutes);
2425-
public string Anchor { get; }
24262428
public int Minutes { get; }
24272429
protected virtual CreateContainerBodyExpiresAfter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
24282430
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);

api/OpenAI.netstandard2.0.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,7 @@ public class AudioTranslation : IJsonModel<AudioTranslation>, IPersistableModel<
10971097
public string Text { get; }
10981098
protected virtual AudioTranslation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
10991099
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
1100+
public static explicit operator AudioTranslation(ClientResult result);
11001101
protected virtual AudioTranslation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
11011102
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
11021103
}
@@ -1207,6 +1208,7 @@ public class StreamingAudioTranscriptionTextDoneUpdate : StreamingAudioTranscrip
12071208
public class StreamingAudioTranscriptionUpdate : IJsonModel<StreamingAudioTranscriptionUpdate>, IPersistableModel<StreamingAudioTranscriptionUpdate> {
12081209
protected virtual StreamingAudioTranscriptionUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
12091210
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
1211+
public static explicit operator StreamingAudioTranscriptionUpdate(ClientResult result);
12101212
protected virtual StreamingAudioTranscriptionUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
12111213
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
12121214
}
@@ -2097,7 +2099,6 @@ public class CreateContainerBody : IJsonModel<CreateContainerBody>, IPersistable
20972099
}
20982100
public class CreateContainerBodyExpiresAfter : IJsonModel<CreateContainerBodyExpiresAfter>, IPersistableModel<CreateContainerBodyExpiresAfter> {
20992101
public CreateContainerBodyExpiresAfter(int minutes);
2100-
public string Anchor { get; }
21012102
public int Minutes { get; }
21022103
protected virtual CreateContainerBodyExpiresAfter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
21032104
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);

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.20251003.2" />
11+
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20251009.7" />
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.60.0",
33-
"@typespec/http-client-csharp": "1.0.0-alpha.20251003.2",
33+
"@typespec/http-client-csharp": "1.0.0-alpha.20251009.7",
3434
"@typespec/http": "1.4.0",
3535
"@typespec/openapi": "1.4.0"
3636
},

package-lock.json

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

src/Custom/Batch/BatchClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ namespace OpenAI.Batch;
1414
/// <summary> The service client for OpenAI batch operations. </summary>
1515
[CodeGenType("Batches")]
1616
[CodeGenSuppress("BatchClient", typeof(ClientPipeline), typeof(Uri))]
17-
[CodeGenSuppress("CreateBatch", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(string), typeof(IDictionary<string, string>), typeof(CancellationToken))]
18-
[CodeGenSuppress("CreateBatchAsync", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(string), typeof(IDictionary<string, string>), typeof(CancellationToken))]
17+
[CodeGenSuppress("CreateBatch", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(IDictionary<string, string>), typeof(CancellationToken))]
18+
[CodeGenSuppress("CreateBatchAsync", typeof(string), typeof(InternalCreateBatchRequestEndpoint), typeof(IDictionary<string, string>), typeof(CancellationToken))]
1919
[CodeGenSuppress("CreateBatch", typeof(BinaryContent), typeof(RequestOptions))]
2020
[CodeGenSuppress("CreateBatchAsync", typeof(BinaryContent), typeof(RequestOptions))]
2121
[CodeGenSuppress("GetBatch", typeof(string), typeof(CancellationToken))]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace OpenAI.Containers;
2+
3+
public partial class ContainerResourceExpiresAfter
4+
{
5+
// CUSTOM: Convert to a string for back compatibility.
6+
public string Anchor { get; }
7+
}

src/Custom/Containers/internal/GeneratorStubs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
[CodeGenType("ContainerListResource")] internal partial class InternalContainerListResource { }
44
[CodeGenType("ContainerFileListResource")] internal partial class InternalContainerFileListResource { }
5+
[CodeGenType("ContainerResourceExpiresAfterAnchor")] internal partial struct InternalContainerResourceExpiresAfterAnchor { }

src/Custom/Responses/Internal/GeneratorStubs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ namespace OpenAI.Responses;
107107
[CodeGenType("LogProb")] internal partial class InternalLogProb {}
108108
[CodeGenType("TopLogProb")] internal partial class InternalTopLogProb {}
109109
[CodeGenType("ImageGenToolCallItemParam")] internal partial class InternalImageGenToolCallItemParam {}
110+
[CodeGenType("ImageGenToolModel")] internal partial struct InternalImageGenToolModel { }
110111
[CodeGenType("CodeInterpreterToolCallItemParam")] internal partial class InternalCodeInterpreterToolCallItemParam {}
111112
[CodeGenType("LocalShellToolCallItemParam")] internal partial class InternalLocalShellToolCallItemParam {}
112113
[CodeGenType("LocalShellExecAction")] internal partial class InternalLocalShellExecAction {}

src/Custom/Responses/Tools/ImageGenerationTool.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ public partial class ImageGenerationTool
2525
// CUSTOM:Renamed.
2626
[CodeGenMember("PartialImages")]
2727
public int? PartialImageCount { get; set; }
28+
29+
// CUSTOM: Convert to string to ensure backwards compatibility.
30+
public string Model { get; set; }
2831
}

0 commit comments

Comments
 (0)