From 1b9c711721172dbe483ab163f69006fd1acd8b79 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Sep 2024 03:17:14 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../OpenAI.AssistantsClient.CancelRun.g.cs | 6 +- ...enAI.AssistantsClient.CreateAssistant.g.cs | 6 +- ...OpenAI.AssistantsClient.CreateMessage.g.cs | 6 +- .../OpenAI.AssistantsClient.CreateRun.g.cs | 7 +- .../OpenAI.AssistantsClient.CreateThread.g.cs | 6 +- ...I.AssistantsClient.CreateThreadAndRun.g.cs | 6 +- ...enAI.AssistantsClient.DeleteAssistant.g.cs | 6 +- ...OpenAI.AssistantsClient.DeleteMessage.g.cs | 6 +- .../OpenAI.AssistantsClient.DeleteThread.g.cs | 6 +- .../OpenAI.AssistantsClient.GetAssistant.g.cs | 6 +- .../OpenAI.AssistantsClient.GetMessage.g.cs | 6 +- .../OpenAI.AssistantsClient.GetRun.g.cs | 6 +- .../OpenAI.AssistantsClient.GetRunStep.g.cs | 7 +- .../OpenAI.AssistantsClient.GetThread.g.cs | 6 +- ...penAI.AssistantsClient.ListAssistants.g.cs | 12 +- .../OpenAI.AssistantsClient.ListMessages.g.cs | 13 +- .../OpenAI.AssistantsClient.ListRunSteps.g.cs | 13 +- .../OpenAI.AssistantsClient.ListRuns.g.cs | 12 +- ...enAI.AssistantsClient.ModifyAssistant.g.cs | 6 +- ...OpenAI.AssistantsClient.ModifyMessage.g.cs | 6 +- .../OpenAI.AssistantsClient.ModifyRun.g.cs | 6 +- .../OpenAI.AssistantsClient.ModifyThread.g.cs | 6 +- ...ssistantsClient.SubmitToolOuputsToRun.g.cs | 6 +- .../OpenAI.AudioClient.CreateSpeech.g.cs | 6 +- ...penAI.AudioClient.CreateTranscription.g.cs | 9 +- .../OpenAI.AudioClient.CreateTranslation.g.cs | 6 +- .../OpenAI.AuditLogsClient.ListAuditLogs.g.cs | 20 ++- .../OpenAI.BatchClient.CancelBatch.g.cs | 6 +- .../OpenAI.BatchClient.CreateBatch.g.cs | 6 +- .../OpenAI.BatchClient.ListBatches.g.cs | 10 +- .../OpenAI.BatchClient.RetrieveBatch.g.cs | 6 +- ...penAI.ChatClient.CreateChatCompletion.g.cs | 6 +- ...AI.CompletionsClient.CreateCompletion.g.cs | 6 +- ...enAI.EmbeddingsClient.CreateEmbedding.g.cs | 6 +- .../OpenAI.FilesClient.CreateFile.g.cs | 6 +- .../OpenAI.FilesClient.DeleteFile.g.cs | 6 +- .../OpenAI.FilesClient.DownloadFile.g.cs | 6 +- .../OpenAI.FilesClient.ListFiles.g.cs | 9 +- .../OpenAI.FilesClient.RetrieveFile.g.cs | 6 +- ....FineTuningClient.CancelFineTuningJob.g.cs | 6 +- ....FineTuningClient.CreateFineTuningJob.g.cs | 6 +- ...FineTuningClient.ListFineTuningEvents.g.cs | 10 +- ...ngClient.ListFineTuningJobCheckpoints.g.cs | 10 +- ...ingClient.ListPaginatedFineTuningJobs.g.cs | 10 +- ...ineTuningClient.RetrieveFineTuningJob.g.cs | 6 +- .../OpenAI.ImagesClient.CreateImage.g.cs | 6 +- .../OpenAI.ImagesClient.CreateImageEdit.g.cs | 6 +- ...nAI.ImagesClient.CreateImageVariation.g.cs | 6 +- .../OpenAI.InvitesClient.DeleteInvite.g.cs | 6 +- .../OpenAI.InvitesClient.InviteUser.g.cs | 6 +- .../OpenAI.InvitesClient.ListInvites.g.cs | 10 +- .../OpenAI.InvitesClient.RetrieveInvite.g.cs | 6 +- .../OpenAI.ModelsClient.DeleteModel.g.cs | 6 +- .../OpenAI.ModelsClient.ListModels.g.cs | 6 +- .../OpenAI.ModelsClient.RetrieveModel.g.cs | 6 +- ...AI.ModerationsClient.CreateModeration.g.cs | 6 +- .../OpenAI/Generated/OpenAI.PathBuilder.g.cs | 129 ++++++++++++++++++ .../OpenAI.ProjectsClient.ArchiveProject.g.cs | 6 +- .../OpenAI.ProjectsClient.CreateProject.g.cs | 6 +- ...ctsClient.CreateProjectServiceAccount.g.cs | 6 +- ...enAI.ProjectsClient.CreateProjectUser.g.cs | 6 +- ...AI.ProjectsClient.DeleteProjectApiKey.g.cs | 6 +- ...ctsClient.DeleteProjectServiceAccount.g.cs | 6 +- ...enAI.ProjectsClient.DeleteProjectUser.g.cs | 6 +- ...nAI.ProjectsClient.ListProjectApiKeys.g.cs | 10 +- ...ectsClient.ListProjectServiceAccounts.g.cs | 10 +- ...penAI.ProjectsClient.ListProjectUsers.g.cs | 10 +- .../OpenAI.ProjectsClient.ListProjects.g.cs | 11 +- .../OpenAI.ProjectsClient.ModifyProject.g.cs | 6 +- ...enAI.ProjectsClient.ModifyProjectUser.g.cs | 6 +- ...OpenAI.ProjectsClient.RetrieveProject.g.cs | 6 +- ....ProjectsClient.RetrieveProjectApiKey.g.cs | 6 +- ...sClient.RetrieveProjectServiceAccount.g.cs | 6 +- ...AI.ProjectsClient.RetrieveProjectUser.g.cs | 6 +- .../OpenAI.UploadsClient.AddUploadPart.g.cs | 6 +- .../OpenAI.UploadsClient.CancelUpload.g.cs | 6 +- .../OpenAI.UploadsClient.CompleteUpload.g.cs | 6 +- .../OpenAI.UploadsClient.CreateUpload.g.cs | 6 +- .../OpenAI.UsersClient.DeleteUser.g.cs | 6 +- .../OpenAI.UsersClient.ListUsers.g.cs | 10 +- .../OpenAI.UsersClient.ModifyUser.g.cs | 6 +- .../OpenAI.UsersClient.RetrieveUser.g.cs | 6 +- ...oresClient.CancelVectorStoreFileBatch.g.cs | 6 +- ....VectorStoresClient.CreateVectorStore.g.cs | 6 +- ...torStoresClient.CreateVectorStoreFile.g.cs | 6 +- ...oresClient.CreateVectorStoreFileBatch.g.cs | 6 +- ....VectorStoresClient.DeleteVectorStore.g.cs | 6 +- ...torStoresClient.DeleteVectorStoreFile.g.cs | 6 +- ...nAI.VectorStoresClient.GetVectorStore.g.cs | 6 +- ...VectorStoresClient.GetVectorStoreFile.g.cs | 6 +- ...rStoresClient.GetVectorStoreFileBatch.g.cs | 6 +- ...resClient.ListFilesInVectorStoreBatch.g.cs | 13 +- ...ctorStoresClient.ListVectorStoreFiles.g.cs | 13 +- ...I.VectorStoresClient.ListVectorStores.g.cs | 12 +- ....VectorStoresClient.ModifyVectorStore.g.cs | 6 +- 95 files changed, 702 insertions(+), 100 deletions(-) create mode 100644 src/libs/OpenAI/Generated/OpenAI.PathBuilder.g.cs diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CancelRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CancelRun.g.cs index 30e8d3d4..813655f0 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CancelRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CancelRun.g.cs @@ -42,9 +42,13 @@ partial void ProcessCancelRunResponseContent( threadId: ref threadId, runId: ref runId); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/runs/{runId}/cancel", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/runs/{runId}/cancel", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs index 404f3e6b..5d4f3c1f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateAssistantResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/assistants", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/assistants", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs index 0e728b71..afa5a702 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs @@ -44,9 +44,13 @@ partial void ProcessCreateMessageResponseContent( threadId: ref threadId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/messages", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/messages", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs index 93e7016a..aec2807d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs @@ -1,4 +1,3 @@ -using System.Linq; #nullable enable @@ -50,9 +49,13 @@ partial void ProcessCreateRunResponseContent( include: include, request: request); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/runs", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/runs?{string.Join("&", include?.Select(static x => $"include={x}") ?? global::System.Array.Empty())}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThread.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThread.g.cs index fefd98d9..eedc1b54 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThread.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThread.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateThreadResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/threads", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/threads", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs index 52a7b813..a2688f3c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateThreadAndRunResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/threads/runs", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/threads/runs", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteAssistant.g.cs index 003558a8..4fc8b931 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteAssistant.g.cs @@ -37,9 +37,13 @@ partial void ProcessDeleteAssistantResponseContent( httpClient: _httpClient, assistantId: ref assistantId); + var __pathBuilder = new PathBuilder( + path: $"/assistants/{assistantId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/assistants/{assistantId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteMessage.g.cs index b8015543..a814bb81 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteMessage.g.cs @@ -42,9 +42,13 @@ partial void ProcessDeleteMessageResponseContent( threadId: ref threadId, messageId: ref messageId); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/messages/{messageId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/messages/{messageId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteThread.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteThread.g.cs index 1760b17c..a37e8a91 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteThread.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteThread.g.cs @@ -37,9 +37,13 @@ partial void ProcessDeleteThreadResponseContent( httpClient: _httpClient, threadId: ref threadId); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetAssistant.g.cs index 45cd94e9..f1e05820 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetAssistant.g.cs @@ -37,9 +37,13 @@ partial void ProcessGetAssistantResponseContent( httpClient: _httpClient, assistantId: ref assistantId); + var __pathBuilder = new PathBuilder( + path: $"/assistants/{assistantId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/assistants/{assistantId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetMessage.g.cs index 67b602ad..eddb3e85 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetMessage.g.cs @@ -42,9 +42,13 @@ partial void ProcessGetMessageResponseContent( threadId: ref threadId, messageId: ref messageId); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/messages/{messageId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/messages/{messageId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRun.g.cs index 8a21aafb..2bf6b37d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRun.g.cs @@ -42,9 +42,13 @@ partial void ProcessGetRunResponseContent( threadId: ref threadId, runId: ref runId); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/runs/{runId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/runs/{runId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRunStep.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRunStep.g.cs index 58974812..5dae44e1 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRunStep.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRunStep.g.cs @@ -1,4 +1,3 @@ -using System.Linq; #nullable enable @@ -53,9 +52,13 @@ partial void ProcessGetRunStepResponseContent( stepId: ref stepId, include: include); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/runs/{runId}/steps/{stepId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/runs/{runId}/steps/{stepId}?{string.Join("&", include?.Select(static x => $"include={x}") ?? global::System.Array.Empty())}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetThread.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetThread.g.cs index c9e95d7c..234e526d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetThread.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetThread.g.cs @@ -37,9 +37,13 @@ partial void ProcessGetThreadResponseContent( httpClient: _httpClient, threadId: ref threadId); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListAssistants.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListAssistants.g.cs index 19598fb7..6ed4daa2 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListAssistants.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListAssistants.g.cs @@ -56,9 +56,19 @@ partial void ProcessListAssistantsResponseContent( after: ref after, before: ref before); + var __pathBuilder = new PathBuilder( + path: "/assistants", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/assistants?limit={limit}&order={(global::System.Uri.EscapeDataString(order?.ToValueString() ?? string.Empty))}&after={after}&before={before}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListMessages.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListMessages.g.cs index b32825f5..f7dbce7c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListMessages.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListMessages.g.cs @@ -66,9 +66,20 @@ partial void ProcessListMessagesResponseContent( before: ref before, runId: ref runId); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/messages", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + .AddOptionalParameter("run_id", runId) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/messages?limit={limit}&order={(global::System.Uri.EscapeDataString(order?.ToValueString() ?? string.Empty))}&after={after}&before={before}&run_id={runId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRunSteps.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRunSteps.g.cs index 9f5096b2..bdeb3b7a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRunSteps.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRunSteps.g.cs @@ -1,4 +1,3 @@ -using System.Linq; #nullable enable @@ -72,9 +71,19 @@ partial void ProcessListRunStepsResponseContent( before: ref before, include: include); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/runs/{runId}/steps", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/runs/{runId}/steps?limit={limit}&order={(global::System.Uri.EscapeDataString(order?.ToValueString() ?? string.Empty))}&after={after}&before={before}&{string.Join("&", include?.Select(static x => $"include={x}") ?? global::System.Array.Empty())}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRuns.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRuns.g.cs index e946b635..caa38c55 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRuns.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRuns.g.cs @@ -61,9 +61,19 @@ partial void ProcessListRunsResponseContent( after: ref after, before: ref before); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/runs", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/runs?limit={limit}&order={(global::System.Uri.EscapeDataString(order?.ToValueString() ?? string.Empty))}&after={after}&before={before}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs index 3db50d49..6354cefd 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs @@ -44,9 +44,13 @@ partial void ProcessModifyAssistantResponseContent( assistantId: ref assistantId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/assistants/{assistantId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/assistants/{assistantId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyMessage.g.cs index 6b5a2ad2..fdbd4919 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyMessage.g.cs @@ -49,9 +49,13 @@ partial void ProcessModifyMessageResponseContent( messageId: ref messageId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/messages/{messageId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/messages/{messageId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyRun.g.cs index 2e56de60..33aed8b6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyRun.g.cs @@ -49,9 +49,13 @@ partial void ProcessModifyRunResponseContent( runId: ref runId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/runs/{runId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/runs/{runId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyThread.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyThread.g.cs index 6338a1be..458ae595 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyThread.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyThread.g.cs @@ -44,9 +44,13 @@ partial void ProcessModifyThreadResponseContent( threadId: ref threadId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs index 829b4fa7..7845cf3d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs @@ -49,9 +49,13 @@ partial void ProcessSubmitToolOuputsToRunResponseContent( runId: ref runId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/threads/{threadId}/runs/{runId}/submit_tool_outputs", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/threads/{threadId}/runs/{runId}/submit_tool_outputs", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateSpeech.g.cs b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateSpeech.g.cs index c07c06db..ae120433 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateSpeech.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateSpeech.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateSpeechResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/audio/speech", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/audio/speech", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranscription.g.cs b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranscription.g.cs index 84d940ed..6c538273 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranscription.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranscription.g.cs @@ -1,4 +1,3 @@ -using System.Linq; #nullable enable @@ -40,9 +39,13 @@ partial void ProcessCreateTranscriptionResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/audio/transcriptions", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/audio/transcriptions", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()) @@ -84,7 +87,7 @@ partial void ProcessCreateTranscriptionResponseContent( if (request.TimestampGranularities != default) { __httpRequestContent.Add( - content: new global::System.Net.Http.StringContent($"[{string.Join(",", request.TimestampGranularities.Select(x => x.ToValueString()))}]"), + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.TimestampGranularities, x => x.ToValueString()))}]"), name: "timestamp_granularities[]"); } httpRequest.Content = __httpRequestContent; diff --git a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranslation.g.cs b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranslation.g.cs index 4723b246..c6dcd0bf 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranslation.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranslation.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateTranslationResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/audio/translations", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/audio/translations", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()) diff --git a/src/libs/OpenAI/Generated/OpenAI.AuditLogsClient.ListAuditLogs.g.cs b/src/libs/OpenAI/Generated/OpenAI.AuditLogsClient.ListAuditLogs.g.cs index a4518728..5c23104d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AuditLogsClient.ListAuditLogs.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AuditLogsClient.ListAuditLogs.g.cs @@ -1,4 +1,3 @@ -using System.Linq; #nullable enable @@ -80,9 +79,26 @@ partial void ProcessListAuditLogsResponseContent( after: ref after, before: ref before); + var __pathBuilder = new PathBuilder( + path: "/organization/audit_logs", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("gt", effectiveAt?.Gt?.ToString()) + .AddOptionalParameter("gte", effectiveAt?.Gte?.ToString()) + .AddOptionalParameter("lt", effectiveAt?.Lt?.ToString()) + .AddOptionalParameter("lte", effectiveAt?.Lte?.ToString()) + .AddOptionalParameter("project_ids[]", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("actor_ids[]", actorIds, delimiter: ",", explode: true) + .AddOptionalParameter("actor_emails[]", actorEmails, delimiter: ",", explode: true) + .AddOptionalParameter("resource_ids[]", resourceIds, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/audit_logs?effective_at={effectiveAt}&{string.Join("&", projectIds?.Select(static x => $"projectIds={x}") ?? global::System.Array.Empty())}&{string.Join("&", eventTypes?.Select(static x => $"eventTypes={x}") ?? global::System.Array.Empty())}&{string.Join("&", actorIds?.Select(static x => $"actorIds={x}") ?? global::System.Array.Empty())}&{string.Join("&", actorEmails?.Select(static x => $"actorEmails={x}") ?? global::System.Array.Empty())}&{string.Join("&", resourceIds?.Select(static x => $"resourceIds={x}") ?? global::System.Array.Empty())}&limit={limit}&after={after}&before={before}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.BatchClient.CancelBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.BatchClient.CancelBatch.g.cs index 14b8d8ac..5590d37d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.BatchClient.CancelBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.BatchClient.CancelBatch.g.cs @@ -37,9 +37,13 @@ partial void ProcessCancelBatchResponseContent( httpClient: _httpClient, batchId: ref batchId); + var __pathBuilder = new PathBuilder( + path: $"/batches/{batchId}/cancel", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/batches/{batchId}/cancel", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.BatchClient.CreateBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.BatchClient.CreateBatch.g.cs index 84e14ebb..b14da49e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.BatchClient.CreateBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.BatchClient.CreateBatch.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateBatchResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/batches", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/batches", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.BatchClient.ListBatches.g.cs b/src/libs/OpenAI/Generated/OpenAI.BatchClient.ListBatches.g.cs index ac1019a8..20670534 100644 --- a/src/libs/OpenAI/Generated/OpenAI.BatchClient.ListBatches.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.BatchClient.ListBatches.g.cs @@ -44,9 +44,17 @@ partial void ProcessListBatchesResponseContent( after: ref after, limit: ref limit); + var __pathBuilder = new PathBuilder( + path: "/batches", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/batches?after={after}&limit={limit}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.BatchClient.RetrieveBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.BatchClient.RetrieveBatch.g.cs index 9d58e816..3e90a760 100644 --- a/src/libs/OpenAI/Generated/OpenAI.BatchClient.RetrieveBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.BatchClient.RetrieveBatch.g.cs @@ -37,9 +37,13 @@ partial void ProcessRetrieveBatchResponseContent( httpClient: _httpClient, batchId: ref batchId); + var __pathBuilder = new PathBuilder( + path: $"/batches/{batchId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/batches/{batchId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs b/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs index 5cf8bafa..7b498df5 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateChatCompletionResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/chat/completions", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/chat/completions", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.CreateCompletion.g.cs b/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.CreateCompletion.g.cs index d901f90a..5cfcd500 100644 --- a/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.CreateCompletion.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.CreateCompletion.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateCompletionResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/completions", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/completions", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.CreateEmbedding.g.cs b/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.CreateEmbedding.g.cs index 284b419c..94cb8430 100644 --- a/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.CreateEmbedding.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.CreateEmbedding.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateEmbeddingResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/embeddings", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/embeddings", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.CreateFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.CreateFile.g.cs index d88a2790..859c7beb 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.CreateFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.CreateFile.g.cs @@ -43,9 +43,13 @@ partial void ProcessCreateFileResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/files", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/files", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()) diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.DeleteFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.DeleteFile.g.cs index 2940a945..fe732e7e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.DeleteFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.DeleteFile.g.cs @@ -37,9 +37,13 @@ partial void ProcessDeleteFileResponseContent( httpClient: _httpClient, fileId: ref fileId); + var __pathBuilder = new PathBuilder( + path: $"/files/{fileId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.DownloadFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.DownloadFile.g.cs index b5efd419..47bea913 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.DownloadFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.DownloadFile.g.cs @@ -37,9 +37,13 @@ partial void ProcessDownloadFileResponseContent( httpClient: _httpClient, fileId: ref fileId); + var __pathBuilder = new PathBuilder( + path: $"/files/{fileId}/content", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/files/{fileId}/content", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.ListFiles.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.ListFiles.g.cs index d10fd5fb..7bd9057a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.ListFiles.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.ListFiles.g.cs @@ -37,9 +37,16 @@ partial void ProcessListFilesResponseContent( httpClient: _httpClient, purpose: ref purpose); + var __pathBuilder = new PathBuilder( + path: "/files", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("purpose", purpose) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/files?purpose={purpose}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.RetrieveFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.RetrieveFile.g.cs index 688ac139..ea9ff395 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.RetrieveFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.RetrieveFile.g.cs @@ -37,9 +37,13 @@ partial void ProcessRetrieveFileResponseContent( httpClient: _httpClient, fileId: ref fileId); + var __pathBuilder = new PathBuilder( + path: $"/files/{fileId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CancelFineTuningJob.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CancelFineTuningJob.g.cs index 015c06d7..870af44d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CancelFineTuningJob.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CancelFineTuningJob.g.cs @@ -39,9 +39,13 @@ partial void ProcessCancelFineTuningJobResponseContent( httpClient: _httpClient, fineTuningJobId: ref fineTuningJobId); + var __pathBuilder = new PathBuilder( + path: $"/fine_tuning/jobs/{fineTuningJobId}/cancel", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/fine_tuning/jobs/{fineTuningJobId}/cancel", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CreateFineTuningJob.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CreateFineTuningJob.g.cs index 5519b47c..38c8b121 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CreateFineTuningJob.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CreateFineTuningJob.g.cs @@ -41,9 +41,13 @@ partial void ProcessCreateFineTuningJobResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/fine_tuning/jobs", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/fine_tuning/jobs", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningEvents.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningEvents.g.cs index 6dcf0535..7ac9fe05 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningEvents.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningEvents.g.cs @@ -51,9 +51,17 @@ partial void ProcessListFineTuningEventsResponseContent( after: ref after, limit: ref limit); + var __pathBuilder = new PathBuilder( + path: $"/fine_tuning/jobs/{fineTuningJobId}/events", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/fine_tuning/jobs/{fineTuningJobId}/events?after={after}&limit={limit}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs index b24de94a..63919ed9 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs @@ -51,9 +51,17 @@ partial void ProcessListFineTuningJobCheckpointsResponseContent( after: ref after, limit: ref limit); + var __pathBuilder = new PathBuilder( + path: $"/fine_tuning/jobs/{fineTuningJobId}/checkpoints", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/fine_tuning/jobs/{fineTuningJobId}/checkpoints?after={after}&limit={limit}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs index 6b9b4fd6..87b530c8 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs @@ -44,9 +44,17 @@ partial void ProcessListPaginatedFineTuningJobsResponseContent( after: ref after, limit: ref limit); + var __pathBuilder = new PathBuilder( + path: "/fine_tuning/jobs", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("after", after) + .AddOptionalParameter("limit", limit?.ToString()) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/fine_tuning/jobs?after={after}&limit={limit}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs index 3b5d3810..15f66fc5 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs @@ -40,9 +40,13 @@ partial void ProcessRetrieveFineTuningJobResponseContent( httpClient: _httpClient, fineTuningJobId: ref fineTuningJobId); + var __pathBuilder = new PathBuilder( + path: $"/fine_tuning/jobs/{fineTuningJobId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/fine_tuning/jobs/{fineTuningJobId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImage.g.cs b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImage.g.cs index 889ee98e..f0f4fe8d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImage.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateImageResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/images/generations", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/images/generations", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageEdit.g.cs b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageEdit.g.cs index fa6a5d4a..8f2ac9ed 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageEdit.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageEdit.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateImageEditResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/images/edits", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/images/edits", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()) diff --git a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageVariation.g.cs b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageVariation.g.cs index 76fee046..dc503ca1 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageVariation.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageVariation.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateImageVariationResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/images/variations", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/images/variations", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty()) diff --git a/src/libs/OpenAI/Generated/OpenAI.InvitesClient.DeleteInvite.g.cs b/src/libs/OpenAI/Generated/OpenAI.InvitesClient.DeleteInvite.g.cs index 5da21e96..e25d8060 100644 --- a/src/libs/OpenAI/Generated/OpenAI.InvitesClient.DeleteInvite.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.InvitesClient.DeleteInvite.g.cs @@ -37,9 +37,13 @@ partial void ProcessDeleteInviteResponseContent( httpClient: _httpClient, inviteId: ref inviteId); + var __pathBuilder = new PathBuilder( + path: $"/organization/invites/{inviteId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/invites/{inviteId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.InvitesClient.InviteUser.g.cs b/src/libs/OpenAI/Generated/OpenAI.InvitesClient.InviteUser.g.cs index bc711804..4bd0a267 100644 --- a/src/libs/OpenAI/Generated/OpenAI.InvitesClient.InviteUser.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.InvitesClient.InviteUser.g.cs @@ -39,9 +39,13 @@ partial void ProcessInviteUserResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/organization/invites", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/organization/invites", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.InvitesClient.ListInvites.g.cs b/src/libs/OpenAI/Generated/OpenAI.InvitesClient.ListInvites.g.cs index bcc9201e..4487f42e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.InvitesClient.ListInvites.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.InvitesClient.ListInvites.g.cs @@ -44,9 +44,17 @@ partial void ProcessListInvitesResponseContent( limit: ref limit, after: ref after); + var __pathBuilder = new PathBuilder( + path: "/organization/invites", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/invites?limit={limit}&after={after}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.InvitesClient.RetrieveInvite.g.cs b/src/libs/OpenAI/Generated/OpenAI.InvitesClient.RetrieveInvite.g.cs index 3c5dfb21..3bf2f54a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.InvitesClient.RetrieveInvite.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.InvitesClient.RetrieveInvite.g.cs @@ -37,9 +37,13 @@ partial void ProcessRetrieveInviteResponseContent( httpClient: _httpClient, inviteId: ref inviteId); + var __pathBuilder = new PathBuilder( + path: $"/organization/invites/{inviteId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/invites/{inviteId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.DeleteModel.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.DeleteModel.g.cs index 81034a14..eb7ec2ca 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.DeleteModel.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.DeleteModel.g.cs @@ -39,9 +39,13 @@ partial void ProcessDeleteModelResponseContent( httpClient: _httpClient, model: ref model); + var __pathBuilder = new PathBuilder( + path: $"/models/{model}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/models/{model}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.ListModels.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.ListModels.g.cs index 953dec1b..b1457cdb 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.ListModels.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.ListModels.g.cs @@ -32,9 +32,13 @@ partial void ProcessListModelsResponseContent( PrepareListModelsArguments( httpClient: _httpClient); + var __pathBuilder = new PathBuilder( + path: "/models", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/models", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.RetrieveModel.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.RetrieveModel.g.cs index 458a2574..c2f1fa48 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.RetrieveModel.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.RetrieveModel.g.cs @@ -39,9 +39,13 @@ partial void ProcessRetrieveModelResponseContent( httpClient: _httpClient, model: ref model); + var __pathBuilder = new PathBuilder( + path: $"/models/{model}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/models/{model}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs index bb6f1fe7..e1a1b53b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateModerationResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/moderations", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/moderations", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.PathBuilder.g.cs b/src/libs/OpenAI/Generated/OpenAI.PathBuilder.g.cs new file mode 100644 index 00000000..2861d7fa --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.PathBuilder.g.cs @@ -0,0 +1,129 @@ +using System.Linq; + +#nullable enable + +namespace OpenAI +{ + public class PathBuilder + { + private readonly global::System.Text.StringBuilder _stringBuilder = + new global::System.Text.StringBuilder(capacity: 256); + private bool _firstParameter = true; + public PathBuilder( + string path, + global::System.Uri? baseUri = null) + { + if (baseUri is not null) + { + _stringBuilder.Append(baseUri.AbsoluteUri.TrimEnd('/')); + } + _stringBuilder.Append(path); + } + public PathBuilder AddRequiredParameter( + string name, + string value) + { + if (_firstParameter) + { + _stringBuilder.Append('?'); + _firstParameter = false; + } + else + { + _stringBuilder.Append('&'); + } + + _stringBuilder.Append(global::System.Uri.EscapeDataString(name)); + _stringBuilder.Append('='); + _stringBuilder.Append(global::System.Uri.EscapeDataString(value)); + return this; + } + public PathBuilder AddRequiredParameter( + string name, + global::System.Collections.Generic.IEnumerable value, + string delimiter = ",", + bool explode = false) + { + if (explode) + { + foreach (var item in value) + { + AddRequiredParameter($"{name}", item); + } + + return this; + } + AddRequiredParameter(name, string.Join(delimiter, value)); + return this; + } + public PathBuilder AddRequiredParameter( + string name, + global::System.Collections.Generic.IEnumerable value, + global::System.Func selector, + string delimiter = ",", + bool explode = false) + { + AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + return this; + } + public PathBuilder AddOptionalParameter( + string name, + string? value) + { + if (value is not null) + { + AddRequiredParameter(name, value); + } + return this; + } + public PathBuilder AddOptionalParameter( + string name, + global::System.Collections.Generic.IEnumerable? value, + string delimiter = ",", + bool explode = false) + { + if (value is not null) + { + AddRequiredParameter(name, value, delimiter, explode); + } + return this; + } + public PathBuilder AddOptionalParameter( + string name, + global::System.Collections.Generic.IEnumerable? value, + global::System.Func selector, + string delimiter = ",", + bool explode = false) + { + if (value is not null) + { + AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + } + return this; + } + public PathBuilder AddRequiredParameter( + string name, + T value, + string? format = null, + global::System.IFormatProvider? formatProvider = null) + where T : global::System.IFormattable + { + AddRequiredParameter(name, value.ToString(format, formatProvider)); + return this; + } + public PathBuilder AddOptionalParameter( + string name, + T? value, + string? format = null, + global::System.IFormatProvider? formatProvider = null) + where T : global::System.IFormattable + { + if (value is not null) + { + AddOptionalParameter(name, value.ToString(format, formatProvider)); + } + return this; + } + public override string ToString() => _stringBuilder.ToString(); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ArchiveProject.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ArchiveProject.g.cs index 2293da26..0d518a0b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ArchiveProject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ArchiveProject.g.cs @@ -37,9 +37,13 @@ partial void ProcessArchiveProjectResponseContent( httpClient: _httpClient, projectId: ref projectId); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/archive", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/archive", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProject.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProject.g.cs index 84d12f3e..5cbd13f4 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProject.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateProjectResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/organization/projects", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/organization/projects", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProjectServiceAccount.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProjectServiceAccount.g.cs index a123c2c0..6de436de 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProjectServiceAccount.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProjectServiceAccount.g.cs @@ -44,9 +44,13 @@ partial void ProcessCreateProjectServiceAccountResponseContent( projectId: ref projectId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/service_accounts", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/service_accounts", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProjectUser.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProjectUser.g.cs index 9c7d72fa..830d29d0 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProjectUser.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.CreateProjectUser.g.cs @@ -44,9 +44,13 @@ partial void ProcessCreateProjectUserResponseContent( projectId: ref projectId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/users", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/users", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectApiKey.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectApiKey.g.cs index d4048e75..8794f7d6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectApiKey.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectApiKey.g.cs @@ -42,9 +42,13 @@ partial void ProcessDeleteProjectApiKeyResponseContent( projectId: ref projectId, keyId: ref keyId); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/api_keys/{keyId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/api_keys/{keyId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectServiceAccount.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectServiceAccount.g.cs index 82d06ea6..4afb2d04 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectServiceAccount.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectServiceAccount.g.cs @@ -42,9 +42,13 @@ partial void ProcessDeleteProjectServiceAccountResponseContent( projectId: ref projectId, serviceAccountId: ref serviceAccountId); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/service_accounts/{serviceAccountId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/service_accounts/{serviceAccountId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectUser.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectUser.g.cs index 62ff212a..eb99a471 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectUser.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.DeleteProjectUser.g.cs @@ -42,9 +42,13 @@ partial void ProcessDeleteProjectUserResponseContent( projectId: ref projectId, userId: ref userId); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/users/{userId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/users/{userId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectApiKeys.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectApiKeys.g.cs index caa82144..a8707a2f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectApiKeys.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectApiKeys.g.cs @@ -49,9 +49,17 @@ partial void ProcessListProjectApiKeysResponseContent( limit: ref limit, after: ref after); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/api_keys", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/api_keys?limit={limit}&after={after}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectServiceAccounts.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectServiceAccounts.g.cs index 91faee1c..24bb28d2 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectServiceAccounts.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectServiceAccounts.g.cs @@ -49,9 +49,17 @@ partial void ProcessListProjectServiceAccountsResponseContent( limit: ref limit, after: ref after); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/service_accounts", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/service_accounts?limit={limit}&after={after}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectUsers.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectUsers.g.cs index 27bf49ae..19391791 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectUsers.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjectUsers.g.cs @@ -49,9 +49,17 @@ partial void ProcessListProjectUsersResponseContent( limit: ref limit, after: ref after); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/users", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/users?limit={limit}&after={after}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjects.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjects.g.cs index 24214c4b..1acb5aa3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjects.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ListProjects.g.cs @@ -51,9 +51,18 @@ partial void ProcessListProjectsResponseContent( after: ref after, includeArchived: ref includeArchived); + var __pathBuilder = new PathBuilder( + path: "/organization/projects", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("include_archived", includeArchived?.ToString()) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects?limit={limit}&after={after}&include_archived={includeArchived}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ModifyProject.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ModifyProject.g.cs index a2b5d62d..29cae0f6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ModifyProject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ModifyProject.g.cs @@ -39,9 +39,13 @@ partial void ProcessModifyProjectResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/organization/projects/{project_id}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/organization/projects/{project_id}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ModifyProjectUser.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ModifyProjectUser.g.cs index 0ce7e18e..b71d858e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ModifyProjectUser.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.ModifyProjectUser.g.cs @@ -39,9 +39,13 @@ partial void ProcessModifyProjectUserResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/organization/projects/{project_id}/users/{user_id}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/organization/projects/{project_id}/users/{user_id}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProject.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProject.g.cs index 9fa55761..e74ffeea 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProject.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProject.g.cs @@ -37,9 +37,13 @@ partial void ProcessRetrieveProjectResponseContent( httpClient: _httpClient, projectId: ref projectId); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectApiKey.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectApiKey.g.cs index a8d584e6..e4fe8b37 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectApiKey.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectApiKey.g.cs @@ -42,9 +42,13 @@ partial void ProcessRetrieveProjectApiKeyResponseContent( projectId: ref projectId, keyId: ref keyId); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/api_keys/{keyId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/api_keys/{keyId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectServiceAccount.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectServiceAccount.g.cs index 5905102f..1d5adb3a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectServiceAccount.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectServiceAccount.g.cs @@ -42,9 +42,13 @@ partial void ProcessRetrieveProjectServiceAccountResponseContent( projectId: ref projectId, serviceAccountId: ref serviceAccountId); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/service_accounts/{serviceAccountId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/service_accounts/{serviceAccountId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectUser.g.cs b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectUser.g.cs index fe80b8d2..0ca7f7a6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectUser.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ProjectsClient.RetrieveProjectUser.g.cs @@ -42,9 +42,13 @@ partial void ProcessRetrieveProjectUserResponseContent( projectId: ref projectId, userId: ref userId); + var __pathBuilder = new PathBuilder( + path: $"/organization/projects/{projectId}/users/{userId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/projects/{projectId}/users/{userId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.UploadsClient.AddUploadPart.g.cs b/src/libs/OpenAI/Generated/OpenAI.UploadsClient.AddUploadPart.g.cs index 0ead2861..83f2bee6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.UploadsClient.AddUploadPart.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.UploadsClient.AddUploadPart.g.cs @@ -48,9 +48,13 @@ partial void ProcessAddUploadPartResponseContent( uploadId: ref uploadId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/uploads/{uploadId}/parts", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/uploads/{uploadId}/parts", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{uploadId}"), diff --git a/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CancelUpload.g.cs b/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CancelUpload.g.cs index d6ef310c..6a4e0b37 100644 --- a/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CancelUpload.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CancelUpload.g.cs @@ -39,9 +39,13 @@ partial void ProcessCancelUploadResponseContent( httpClient: _httpClient, uploadId: ref uploadId); + var __pathBuilder = new PathBuilder( + path: $"/uploads/{uploadId}/cancel", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/uploads/{uploadId}/cancel", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CompleteUpload.g.cs b/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CompleteUpload.g.cs index d269c856..f2751a6f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CompleteUpload.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CompleteUpload.g.cs @@ -49,9 +49,13 @@ partial void ProcessCompleteUploadResponseContent( uploadId: ref uploadId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/uploads/{uploadId}/complete", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/uploads/{uploadId}/complete", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CreateUpload.g.cs b/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CreateUpload.g.cs index f8e5def2..32ea8149 100644 --- a/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CreateUpload.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.UploadsClient.CreateUpload.g.cs @@ -43,9 +43,13 @@ partial void ProcessCreateUploadResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/uploads", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/uploads", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.UsersClient.DeleteUser.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsersClient.DeleteUser.g.cs index c1c73d79..6745948f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.UsersClient.DeleteUser.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.UsersClient.DeleteUser.g.cs @@ -37,9 +37,13 @@ partial void ProcessDeleteUserResponseContent( httpClient: _httpClient, userId: ref userId); + var __pathBuilder = new PathBuilder( + path: $"/organization/users/{userId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/users/{userId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.UsersClient.ListUsers.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsersClient.ListUsers.g.cs index 83d2cc88..9604f4c5 100644 --- a/src/libs/OpenAI/Generated/OpenAI.UsersClient.ListUsers.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.UsersClient.ListUsers.g.cs @@ -44,9 +44,17 @@ partial void ProcessListUsersResponseContent( limit: ref limit, after: ref after); + var __pathBuilder = new PathBuilder( + path: "/organization/users", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("after", after) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/users?limit={limit}&after={after}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.UsersClient.ModifyUser.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsersClient.ModifyUser.g.cs index 6d71bee2..28c9e311 100644 --- a/src/libs/OpenAI/Generated/OpenAI.UsersClient.ModifyUser.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.UsersClient.ModifyUser.g.cs @@ -39,9 +39,13 @@ partial void ProcessModifyUserResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/organization/users/{user_id}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/organization/users/{user_id}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.UsersClient.RetrieveUser.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsersClient.RetrieveUser.g.cs index c759135f..0870fe1c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.UsersClient.RetrieveUser.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.UsersClient.RetrieveUser.g.cs @@ -37,9 +37,13 @@ partial void ProcessRetrieveUserResponseContent( httpClient: _httpClient, userId: ref userId); + var __pathBuilder = new PathBuilder( + path: $"/organization/users/{userId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/organization/users/{userId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs index 681aeef4..5348128b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs @@ -42,9 +42,13 @@ partial void ProcessCancelVectorStoreFileBatchResponseContent( vectorStoreId: ref vectorStoreId, batchId: ref batchId); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}/file_batches/{batchId}/cancel", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}/file_batches/{batchId}/cancel", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs index 92bf7396..ee712ab6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs @@ -39,9 +39,13 @@ partial void ProcessCreateVectorStoreResponseContent( httpClient: _httpClient, request: request); + var __pathBuilder = new PathBuilder( + path: "/vector_stores", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/vector_stores", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs index 526294a4..4fae050d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs @@ -46,9 +46,13 @@ partial void ProcessCreateVectorStoreFileResponseContent( vectorStoreId: ref vectorStoreId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}/files", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}/files", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs index 477a3602..4e2c843f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs @@ -46,9 +46,13 @@ partial void ProcessCreateVectorStoreFileBatchResponseContent( vectorStoreId: ref vectorStoreId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}/file_batches", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}/file_batches", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStore.g.cs index 9db1bcf2..fd5547a8 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStore.g.cs @@ -37,9 +37,13 @@ partial void ProcessDeleteVectorStoreResponseContent( httpClient: _httpClient, vectorStoreId: ref vectorStoreId); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs index cf9b4b07..e653b237 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs @@ -42,9 +42,13 @@ partial void ProcessDeleteVectorStoreFileResponseContent( vectorStoreId: ref vectorStoreId, fileId: ref fileId); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}/files/{fileId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStore.g.cs index 155165d0..83b15e4a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStore.g.cs @@ -37,9 +37,13 @@ partial void ProcessGetVectorStoreResponseContent( httpClient: _httpClient, vectorStoreId: ref vectorStoreId); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs index 8079940c..9fe4b22c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs @@ -46,9 +46,13 @@ partial void ProcessGetVectorStoreFileResponseContent( vectorStoreId: ref vectorStoreId, fileId: ref fileId); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}/files/{fileId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs index 257b524a..38074e81 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs @@ -46,9 +46,13 @@ partial void ProcessGetVectorStoreFileBatchResponseContent( vectorStoreId: ref vectorStoreId, batchId: ref batchId); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}/file_batches/{batchId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}/file_batches/{batchId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs index 09fb0b4c..b639b1a5 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs @@ -71,9 +71,20 @@ partial void ProcessListFilesInVectorStoreBatchResponseContent( before: ref before, filter: ref filter); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}/file_batches/{batchId}/files", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + .AddOptionalParameter("filter", filter?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}/file_batches/{batchId}/files?limit={limit}&order={(global::System.Uri.EscapeDataString(order?.ToValueString() ?? string.Empty))}&after={after}&before={before}&filter={(global::System.Uri.EscapeDataString(filter?.ToValueString() ?? string.Empty))}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs index b90832a7..b0bacc94 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs @@ -66,9 +66,20 @@ partial void ProcessListVectorStoreFilesResponseContent( before: ref before, filter: ref filter); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}/files", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + .AddOptionalParameter("filter", filter?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}/files?limit={limit}&order={(global::System.Uri.EscapeDataString(order?.ToValueString() ?? string.Empty))}&after={after}&before={before}&filter={(global::System.Uri.EscapeDataString(filter?.ToValueString() ?? string.Empty))}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStores.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStores.g.cs index 5980398e..38927525 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStores.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStores.g.cs @@ -56,9 +56,19 @@ partial void ProcessListVectorStoresResponseContent( after: ref after, before: ref before); + var __pathBuilder = new PathBuilder( + path: "/vector_stores", + baseUri: _httpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("after", after) + .AddOptionalParameter("before", before) + ; + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores?limit={limit}&order={(global::System.Uri.EscapeDataString(order?.ToValueString() ?? string.Empty))}&after={after}&before={before}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); PrepareRequest( client: _httpClient, diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ModifyVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ModifyVectorStore.g.cs index 1350d45e..fdcbc3c6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ModifyVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ModifyVectorStore.g.cs @@ -44,9 +44,13 @@ partial void ProcessModifyVectorStoreResponseContent( vectorStoreId: ref vectorStoreId, request: request); + var __pathBuilder = new PathBuilder( + path: $"/vector_stores/{vectorStoreId}", + baseUri: _httpClient.BaseAddress); + var __path = __pathBuilder.ToString(); using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/vector_stores/{vectorStoreId}", global::System.UriKind.RelativeOrAbsolute)); + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody,