Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codegen/generator/src/OpenAI.Library.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20251020.2" />
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20251022.4" />
</ItemGroup>

<!-- Copy output to package dist path for local execution and -->
Expand Down
2 changes: 1 addition & 1 deletion codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"@open-ai/plugin": "file:",
"@azure-tools/typespec-client-generator-core": "0.61.0",
"@typespec/http-client-csharp": "1.0.0-alpha.20251020.2",
"@typespec/http-client-csharp": "1.0.0-alpha.20251022.4",
"@typespec/http": "1.5.0",
"@typespec/openapi": "1.5.0"
},
Expand Down
42 changes: 21 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Generated/AssistantClient.RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal virtual PipelineMessage CreateGetAssistantsRequest(int? limit, string o
uri.AppendPath("/assistants", false);
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
if (order != null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Generated/BatchClient.RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ internal virtual PipelineMessage CreateGetBatchesRequest(string after, int? limi
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200);
PipelineRequest request = message.Request;
Expand Down
6 changes: 3 additions & 3 deletions src/Generated/ChatClient.RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal virtual PipelineMessage CreateGetChatCompletionsRequest(string after, i
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
if (order != null)
{
Expand All @@ -40,7 +40,7 @@ internal virtual PipelineMessage CreateGetChatCompletionsRequest(string after, i
// Plugin customization: Properly handle metadata query parameters
uri.AppendQuery($"metadata[{@param.Key}]", @param.Value, true);
}
// Plugin customization: remove unnecessary AppendQueryDelimited for metadata
uri.AppendQueryDelimited("metadata", list, ",", escape: true);
}
if (model != null)
{
Expand Down Expand Up @@ -121,7 +121,7 @@ internal virtual PipelineMessage CreateGetChatCompletionMessagesRequest(string c
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
if (order != null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Generated/ContainerClient.RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal virtual PipelineMessage CreateGetContainersRequest(int? limit, string o
uri.AppendPath("/containers", false);
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
if (order != null)
{
Expand Down Expand Up @@ -103,7 +103,7 @@ internal virtual PipelineMessage CreateGetContainerFilesRequest(string container
uri.AppendPath("/files", false);
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
if (order != null)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Generated/EvaluationClient.RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal virtual PipelineMessage CreateGetEvalsRequest(string after, int? limit,
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
if (order != null)
{
Expand Down Expand Up @@ -113,7 +113,7 @@ internal virtual PipelineMessage CreateGetEvalRunsRequest(string evalId, string
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
if (order != null)
{
Expand Down Expand Up @@ -206,7 +206,7 @@ internal virtual PipelineMessage CreateGetEvalRunOutputItemsRequest(string evalI
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
if (status != null)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Generated/FineTuningClient.RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal virtual PipelineMessage CreateGetFineTuningCheckpointPermissionsRequest
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
if (order != null)
{
Expand Down Expand Up @@ -100,7 +100,7 @@ internal virtual PipelineMessage CreateGetPaginatedFineTuningJobsRequest(string
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200);
PipelineRequest request = message.Request;
Expand Down Expand Up @@ -149,7 +149,7 @@ internal virtual PipelineMessage CreateGetFineTuningJobCheckpointsRequest(string
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200);
PipelineRequest request = message.Request;
Expand All @@ -171,7 +171,7 @@ internal virtual PipelineMessage CreateGetFineTuningEventsRequest(string fineTun
}
if (limit != null)
{
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true);
uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true);
}
PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200);
PipelineRequest request = message.Request;
Expand Down
16 changes: 8 additions & 8 deletions src/Generated/Internal/ClientUriBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ public void AppendPath(string value, bool escape)

public void AppendPath(int value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape);

public void AppendPath(byte[] value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape);
public void AppendPath(byte[] value, SerializationFormat format = SerializationFormat.Default, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape);

public void AppendPath(DateTimeOffset value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape);
public void AppendPath(DateTimeOffset value, SerializationFormat format = SerializationFormat.Default, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape);

public void AppendPath(TimeSpan value, string format, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape);
public void AppendPath(TimeSpan value, SerializationFormat format = SerializationFormat.Default, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value, format), escape);

public void AppendPath(Guid value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape);

public void AppendPath(long value, bool escape = true) => AppendPath(TypeFormatters.ConvertToString(value), escape);

public void AppendPathDelimited<T>(IEnumerable<T> value, string delimiter, string format = null, bool escape = true)
public void AppendPathDelimited<T>(IEnumerable<T> value, string delimiter, SerializationFormat format = SerializationFormat.Default, bool escape = true)
{
delimiter ??= ",";
IEnumerable<string> stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format));
Expand All @@ -90,9 +90,9 @@ public void AppendQuery(string name, string value, bool escape)

public void AppendQuery(string name, float value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape);

public void AppendQuery(string name, DateTimeOffset value, string format, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape);
public void AppendQuery(string name, DateTimeOffset value, SerializationFormat format = SerializationFormat.Default, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape);

public void AppendQuery(string name, TimeSpan value, string format, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape);
public void AppendQuery(string name, TimeSpan value, SerializationFormat format = SerializationFormat.Default, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape);

public void AppendQuery(string name, double value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape);

Expand All @@ -104,11 +104,11 @@ public void AppendQuery(string name, string value, bool escape)

public void AppendQuery(string name, TimeSpan value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape);

public void AppendQuery(string name, byte[] value, string format, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape);
public void AppendQuery(string name, byte[] value, SerializationFormat format = SerializationFormat.Default, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value, format), escape);

public void AppendQuery(string name, Guid value, bool escape = true) => AppendQuery(name, TypeFormatters.ConvertToString(value), escape);

public void AppendQueryDelimited<T>(string name, IEnumerable<T> value, string delimiter, string format = null, bool escape = true)
public void AppendQueryDelimited<T>(string name, IEnumerable<T> value, string delimiter, SerializationFormat format = SerializationFormat.Default, bool escape = true)
{
delimiter ??= ",";
IEnumerable<string> stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format));
Expand Down
2 changes: 1 addition & 1 deletion src/Generated/Internal/PipelineRequestHeadersExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void SetDelimited<T>(this PipelineRequestHeaders headers, string n
headers.Set(name, string.Join(delimiter, stringValues));
}

public static void SetDelimited<T>(this PipelineRequestHeaders headers, string name, IEnumerable<T> value, string delimiter, string format)
public static void SetDelimited<T>(this PipelineRequestHeaders headers, string name, IEnumerable<T> value, string delimiter, SerializationFormat format)
{
IEnumerable<string> stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format));
headers.Set(name, string.Join(delimiter, stringValues));
Expand Down
28 changes: 28 additions & 0 deletions src/Generated/Internal/SerializationFormat.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// <auto-generated/>

#nullable disable

namespace OpenAI
{
internal enum SerializationFormat
{
Default = 0,
DateTime_RFC1123 = 1,
DateTime_RFC3339 = 2,
DateTime_RFC7231 = 3,
DateTime_ISO8601 = 4,
DateTime_Unix = 5,
Date_ISO8601 = 6,
Duration_ISO8601 = 7,
Duration_Constant = 8,
Duration_Seconds = 9,
Duration_Seconds_Float = 10,
Duration_Seconds_Double = 11,
Duration_Milliseconds = 12,
Duration_Milliseconds_Float = 13,
Duration_Milliseconds_Double = 14,
Time_ISO8601 = 15,
Bytes_Base64Url = 16,
Bytes_Base64 = 17
}
}
Loading