From 48c71771cba2f06e3360e1c60c91b92dee1ad780 Mon Sep 17 00:00:00 2001 From: Jose Arriaga Maldonado Date: Tue, 27 Aug 2024 17:19:18 -0700 Subject: [PATCH] Revert removeal of the version path parameter from the default endpoint URL --- .../Pagination/AssistantsPageEnumerator.cs | 2 +- .../Pagination/MessagesPageEnumerator.cs | 2 +- .../Pagination/RunStepsPageEnumerator.cs | 2 +- .../Internal/Pagination/RunsPageEnumerator.cs | 2 +- .../Pagination/BatchesPageEnumerator.cs | 2 +- .../FineTuningJobCheckpointsPageEnumerator.cs | 2 +- .../FineTuningJobEventsPageEnumerator.cs | 2 +- .../FineTuningJobsPageEnumerator.cs | 2 +- .dotnet/src/Custom/OpenAIClient.cs | 2 +- .../VectorStoreFileBatchesPageEnumerator.cs | 2 +- .../VectorStoreFilesPageEnumerator.cs | 2 +- .../Pagination/VectorStoresPageEnumerator.cs | 2 +- .dotnet/src/Generated/AssistantClient.cs | 10 +- .dotnet/src/Generated/AudioClient.cs | 6 +- .dotnet/src/Generated/BatchClient.cs | 8 +- .dotnet/src/Generated/ChatClient.cs | 2 +- .dotnet/src/Generated/EmbeddingClient.cs | 2 +- .dotnet/src/Generated/FileClient.cs | 10 +- .dotnet/src/Generated/FineTuningClient.cs | 12 +-- .dotnet/src/Generated/ImageClient.cs | 6 +- .../InternalAssistantMessageClient.cs | 10 +- .../Generated/InternalAssistantRunClient.cs | 18 ++-- .../InternalAssistantThreadClient.cs | 8 +- .../src/Generated/InternalUploadsClient.cs | 8 +- .../src/Generated/LegacyCompletionClient.cs | 2 +- .dotnet/src/Generated/ModelClient.cs | 6 +- .dotnet/src/Generated/ModerationClient.cs | 2 +- .dotnet/src/Generated/VectorStoreClient.cs | 26 ++--- .openapi3/openapi3-openai.yaml | 98 +++++++++---------- .typespec/assistants/operations.tsp | 2 +- .typespec/audio/operations.tsp | 2 +- .typespec/batch/operations.tsp | 2 +- .typespec/chat/operations.tsp | 2 +- .typespec/completions/operations.tsp | 2 +- .typespec/embeddings/operations.tsp | 2 +- .typespec/files/operations.tsp | 2 +- .typespec/fine-tuning/operations.tsp | 2 +- .typespec/images/operations.tsp | 2 +- .typespec/main.tsp | 2 +- .typespec/messages/operations.tsp | 2 +- .typespec/models/operations.tsp | 2 +- .typespec/moderations/operations.tsp | 2 +- .typespec/runs/operations.tsp | 2 +- .typespec/threads/operations.tsp | 2 +- .typespec/uploads/operations.tsp | 2 +- .typespec/vector-stores/operations.tsp | 2 +- 46 files changed, 146 insertions(+), 146 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs index 7f970feca..66019bbb5 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs @@ -107,7 +107,7 @@ private PipelineMessage CreateGetAssistantsRequest(int? limit, string order, str request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/assistants", false); + uri.AppendPath("/assistants", false); if (limit != null) { uri.AppendQuery("limit", limit.Value, true); diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs index 860bfbe0d..53e09fec5 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs @@ -115,7 +115,7 @@ private PipelineMessage CreateGetMessagesRequest(string threadId, int? limit, st request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages", false); if (limit != null) diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs index 1245c4763..b5992ce78 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs @@ -119,7 +119,7 @@ private PipelineMessage CreateGetRunStepsRequest(string threadId, string runId, request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs index 879f389be..f48ceb3c1 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs @@ -113,7 +113,7 @@ private PipelineMessage CreateGetRunsRequest(string threadId, int? limit, string request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs", false); if (limit != null) diff --git a/.dotnet/src/Custom/Batch/Internal/Pagination/BatchesPageEnumerator.cs b/.dotnet/src/Custom/Batch/Internal/Pagination/BatchesPageEnumerator.cs index f8055d3a4..1939f1d78 100644 --- a/.dotnet/src/Custom/Batch/Internal/Pagination/BatchesPageEnumerator.cs +++ b/.dotnet/src/Custom/Batch/Internal/Pagination/BatchesPageEnumerator.cs @@ -88,7 +88,7 @@ internal PipelineMessage CreateGetBatchesRequest(string after, int? limit, Reque request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/batches", false); + uri.AppendPath("/batches", false); if (after != null) { uri.AppendQuery("after", after, true); diff --git a/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobCheckpointsPageEnumerator.cs b/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobCheckpointsPageEnumerator.cs index f404409d6..0422a2a54 100644 --- a/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobCheckpointsPageEnumerator.cs +++ b/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobCheckpointsPageEnumerator.cs @@ -94,7 +94,7 @@ internal PipelineMessage CreateGetFineTuningJobCheckpointsRequest(string fineTun request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/fine_tuning/jobs/", false); + uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/checkpoints", false); if (after != null) diff --git a/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobEventsPageEnumerator.cs b/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobEventsPageEnumerator.cs index 095bedfa3..95c3ab1f3 100644 --- a/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobEventsPageEnumerator.cs +++ b/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobEventsPageEnumerator.cs @@ -94,7 +94,7 @@ internal PipelineMessage CreateGetFineTuningEventsRequest(string fineTuningJobId request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/fine_tuning/jobs/", false); + uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/events", false); if (after != null) diff --git a/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobsPageEnumerator.cs b/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobsPageEnumerator.cs index d9ad21b9a..6f572ef2c 100644 --- a/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobsPageEnumerator.cs +++ b/.dotnet/src/Custom/FineTuning/Internal/Pagination/FineTuningJobsPageEnumerator.cs @@ -88,7 +88,7 @@ internal PipelineMessage CreateGetFineTuningJobsRequest(string after, int? limit request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/fine_tuning/jobs", false); + uri.AppendPath("/fine_tuning/jobs", false); if (after != null) { uri.AppendQuery("after", after, true); diff --git a/.dotnet/src/Custom/OpenAIClient.cs b/.dotnet/src/Custom/OpenAIClient.cs index ebc442386..f40a3ade3 100644 --- a/.dotnet/src/Custom/OpenAIClient.cs +++ b/.dotnet/src/Custom/OpenAIClient.cs @@ -61,7 +61,7 @@ namespace OpenAI; [CodeGenSuppress("GetVectorStoreClientClient")] public partial class OpenAIClient { - private const string OpenAIV1Endpoint = "https://api.openai.com"; + private const string OpenAIV1Endpoint = "https://api.openai.com/v1"; private const string OpenAIBetaHeaderValue = "assistants=v2"; private static class KnownHeaderNames diff --git a/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoreFileBatchesPageEnumerator.cs b/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoreFileBatchesPageEnumerator.cs index 3212db4d7..1445485dc 100644 --- a/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoreFileBatchesPageEnumerator.cs +++ b/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoreFileBatchesPageEnumerator.cs @@ -121,7 +121,7 @@ internal PipelineMessage CreateGetFilesInVectorStoreBatchesRequest(string vector request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches/", false); uri.AppendPath(batchId, true); diff --git a/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoreFilesPageEnumerator.cs b/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoreFilesPageEnumerator.cs index 81506b05d..9a5e9bec3 100644 --- a/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoreFilesPageEnumerator.cs +++ b/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoreFilesPageEnumerator.cs @@ -116,7 +116,7 @@ internal PipelineMessage CreateGetVectorStoreFilesRequest(string vectorStoreId, request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files", false); if (limit != null) diff --git a/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoresPageEnumerator.cs b/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoresPageEnumerator.cs index d3416a3b5..311a88372 100644 --- a/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoresPageEnumerator.cs +++ b/.dotnet/src/Custom/VectorStores/Internal/Pagination/VectorStoresPageEnumerator.cs @@ -106,7 +106,7 @@ internal PipelineMessage CreateGetVectorStoresRequest(int? limit, string order, request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores", false); + uri.AppendPath("/vector_stores", false); if (limit != null) { uri.AppendQuery("limit", limit.Value, true); diff --git a/.dotnet/src/Generated/AssistantClient.cs b/.dotnet/src/Generated/AssistantClient.cs index 3e5a40f5b..14c304e84 100644 --- a/.dotnet/src/Generated/AssistantClient.cs +++ b/.dotnet/src/Generated/AssistantClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateCreateAssistantRequest(BinaryContent content, Req request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/assistants", false); + uri.AppendPath("/assistants", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -49,7 +49,7 @@ internal PipelineMessage CreateGetAssistantsRequest(int? limit, string order, st request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/assistants", false); + uri.AppendPath("/assistants", false); if (limit != null) { uri.AppendQuery("limit", limit.Value, true); @@ -80,7 +80,7 @@ internal PipelineMessage CreateGetAssistantRequest(string assistantId, RequestOp request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/assistants/", false); + uri.AppendPath("/assistants/", false); uri.AppendPath(assistantId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -96,7 +96,7 @@ internal PipelineMessage CreateModifyAssistantRequest(string assistantId, Binary request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/assistants/", false); + uri.AppendPath("/assistants/", false); uri.AppendPath(assistantId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -114,7 +114,7 @@ internal PipelineMessage CreateDeleteAssistantRequest(string assistantId, Reques request.Method = "DELETE"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/assistants/", false); + uri.AppendPath("/assistants/", false); uri.AppendPath(assistantId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); diff --git a/.dotnet/src/Generated/AudioClient.cs b/.dotnet/src/Generated/AudioClient.cs index 6022edc5e..8b5a4f1db 100644 --- a/.dotnet/src/Generated/AudioClient.cs +++ b/.dotnet/src/Generated/AudioClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateCreateSpeechRequest(BinaryContent content, Reques request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/audio/speech", false); + uri.AppendPath("/audio/speech", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/octet-stream"); request.Headers.Set("Content-Type", "application/json"); @@ -49,7 +49,7 @@ internal PipelineMessage CreateCreateTranscriptionRequest(BinaryContent content, request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/audio/transcriptions", false); + uri.AppendPath("/audio/transcriptions", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); @@ -66,7 +66,7 @@ internal PipelineMessage CreateCreateTranslationRequest(BinaryContent content, s request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/audio/translations", false); + uri.AppendPath("/audio/translations", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); diff --git a/.dotnet/src/Generated/BatchClient.cs b/.dotnet/src/Generated/BatchClient.cs index 2b43e1b0f..3ccd2f901 100644 --- a/.dotnet/src/Generated/BatchClient.cs +++ b/.dotnet/src/Generated/BatchClient.cs @@ -33,7 +33,7 @@ internal PipelineMessage CreateCreateBatchRequest(BinaryContent content, Request request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/batches", false); + uri.AppendPath("/batches", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -50,7 +50,7 @@ internal PipelineMessage CreateGetBatchesRequest(string after, int? limit, Reque request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/batches", false); + uri.AppendPath("/batches", false); if (after != null) { uri.AppendQuery("after", after, true); @@ -73,7 +73,7 @@ internal PipelineMessage CreateRetrieveBatchRequest(string batchId, RequestOptio request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/batches/", false); + uri.AppendPath("/batches/", false); uri.AppendPath(batchId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -89,7 +89,7 @@ internal PipelineMessage CreateCancelBatchRequest(string batchId, RequestOptions request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/batches/", false); + uri.AppendPath("/batches/", false); uri.AppendPath(batchId, true); uri.AppendPath("/cancel", false); request.Uri = uri.ToUri(); diff --git a/.dotnet/src/Generated/ChatClient.cs b/.dotnet/src/Generated/ChatClient.cs index b27f0ede5..6db94d5ea 100644 --- a/.dotnet/src/Generated/ChatClient.cs +++ b/.dotnet/src/Generated/ChatClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateCreateChatCompletionRequest(BinaryContent content request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/chat/completions", false); + uri.AppendPath("/chat/completions", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); diff --git a/.dotnet/src/Generated/EmbeddingClient.cs b/.dotnet/src/Generated/EmbeddingClient.cs index 00352b853..e93cade41 100644 --- a/.dotnet/src/Generated/EmbeddingClient.cs +++ b/.dotnet/src/Generated/EmbeddingClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateCreateEmbeddingRequest(BinaryContent content, Req request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/embeddings", false); + uri.AppendPath("/embeddings", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); diff --git a/.dotnet/src/Generated/FileClient.cs b/.dotnet/src/Generated/FileClient.cs index bfb518a32..131f6ba5d 100644 --- a/.dotnet/src/Generated/FileClient.cs +++ b/.dotnet/src/Generated/FileClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateCreateFileRequest(BinaryContent content, string c request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/files", false); + uri.AppendPath("/files", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); @@ -49,7 +49,7 @@ internal PipelineMessage CreateGetFilesRequest(string purpose, RequestOptions op request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/files", false); + uri.AppendPath("/files", false); if (purpose != null) { uri.AppendQuery("purpose", purpose, true); @@ -68,7 +68,7 @@ internal PipelineMessage CreateRetrieveFileRequest(string fileId, RequestOptions request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/files/", false); + uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -84,7 +84,7 @@ internal PipelineMessage CreateDeleteFileRequest(string fileId, RequestOptions o request.Method = "DELETE"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/files/", false); + uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -100,7 +100,7 @@ internal PipelineMessage CreateDownloadFileRequest(string fileId, RequestOptions request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/files/", false); + uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); uri.AppendPath("/content", false); request.Uri = uri.ToUri(); diff --git a/.dotnet/src/Generated/FineTuningClient.cs b/.dotnet/src/Generated/FineTuningClient.cs index fe4998f43..c4446699d 100644 --- a/.dotnet/src/Generated/FineTuningClient.cs +++ b/.dotnet/src/Generated/FineTuningClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateCreateFineTuningJobRequest(BinaryContent content, request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/fine_tuning/jobs", false); + uri.AppendPath("/fine_tuning/jobs", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -49,7 +49,7 @@ internal PipelineMessage CreateGetPaginatedFineTuningJobsRequest(string after, i request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/fine_tuning/jobs", false); + uri.AppendPath("/fine_tuning/jobs", false); if (after != null) { uri.AppendQuery("after", after, true); @@ -72,7 +72,7 @@ internal PipelineMessage CreateRetrieveFineTuningJobRequest(string fineTuningJob request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/fine_tuning/jobs/", false); + uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -88,7 +88,7 @@ internal PipelineMessage CreateCancelFineTuningJobRequest(string fineTuningJobId request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/fine_tuning/jobs/", false); + uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/cancel", false); request.Uri = uri.ToUri(); @@ -105,7 +105,7 @@ internal PipelineMessage CreateGetFineTuningJobCheckpointsRequest(string fineTun request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/fine_tuning/jobs/", false); + uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/checkpoints", false); if (after != null) @@ -130,7 +130,7 @@ internal PipelineMessage CreateGetFineTuningEventsRequest(string fineTuningJobId request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/fine_tuning/jobs/", false); + uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/events", false); if (after != null) diff --git a/.dotnet/src/Generated/ImageClient.cs b/.dotnet/src/Generated/ImageClient.cs index cab97e7f5..6e0558f0a 100644 --- a/.dotnet/src/Generated/ImageClient.cs +++ b/.dotnet/src/Generated/ImageClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateCreateImageRequest(BinaryContent content, Request request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/images/generations", false); + uri.AppendPath("/images/generations", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -49,7 +49,7 @@ internal PipelineMessage CreateCreateImageEditRequest(BinaryContent content, str request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/images/edits", false); + uri.AppendPath("/images/edits", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); @@ -66,7 +66,7 @@ internal PipelineMessage CreateCreateImageVariationRequest(BinaryContent content request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/images/variations", false); + uri.AppendPath("/images/variations", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); diff --git a/.dotnet/src/Generated/InternalAssistantMessageClient.cs b/.dotnet/src/Generated/InternalAssistantMessageClient.cs index 5b211af7f..5ad0ce023 100644 --- a/.dotnet/src/Generated/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Generated/InternalAssistantMessageClient.cs @@ -48,7 +48,7 @@ internal PipelineMessage CreateCreateMessageRequest(string threadId, BinaryConte request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages", false); request.Uri = uri.ToUri(); @@ -67,7 +67,7 @@ internal PipelineMessage CreateGetMessagesRequest(string threadId, int? limit, s request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages", false); if (limit != null) @@ -100,7 +100,7 @@ internal PipelineMessage CreateGetMessageRequest(string threadId, string message request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages/", false); uri.AppendPath(messageId, true); @@ -118,7 +118,7 @@ internal PipelineMessage CreateModifyMessageRequest(string threadId, string mess request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages/", false); uri.AppendPath(messageId, true); @@ -138,7 +138,7 @@ internal PipelineMessage CreateDeleteMessageRequest(string threadId, string mess request.Method = "DELETE"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages/", false); uri.AppendPath(messageId, true); diff --git a/.dotnet/src/Generated/InternalAssistantRunClient.cs b/.dotnet/src/Generated/InternalAssistantRunClient.cs index 2a6b2de95..b079a8a5e 100644 --- a/.dotnet/src/Generated/InternalAssistantRunClient.cs +++ b/.dotnet/src/Generated/InternalAssistantRunClient.cs @@ -66,7 +66,7 @@ internal PipelineMessage CreateCreateThreadAndRunRequest(BinaryContent content, request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/runs", false); + uri.AppendPath("/threads/runs", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -83,7 +83,7 @@ internal PipelineMessage CreateCreateRunRequest(string threadId, BinaryContent c request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs", false); request.Uri = uri.ToUri(); @@ -102,7 +102,7 @@ internal PipelineMessage CreateGetRunsRequest(string threadId, int? limit, strin request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs", false); if (limit != null) @@ -135,7 +135,7 @@ internal PipelineMessage CreateGetRunRequest(string threadId, string runId, Requ request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); @@ -153,7 +153,7 @@ internal PipelineMessage CreateModifyRunRequest(string threadId, string runId, B request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); @@ -173,7 +173,7 @@ internal PipelineMessage CreateCancelRunRequest(string threadId, string runId, R request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); @@ -192,7 +192,7 @@ internal PipelineMessage CreateSubmitToolOutputsToRunRequest(string threadId, st request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); @@ -213,7 +213,7 @@ internal PipelineMessage CreateGetRunStepsRequest(string threadId, string runId, request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); @@ -248,7 +248,7 @@ internal PipelineMessage CreateGetRunStepRequest(string threadId, string runId, request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); diff --git a/.dotnet/src/Generated/InternalAssistantThreadClient.cs b/.dotnet/src/Generated/InternalAssistantThreadClient.cs index 9bba60ad5..347ef4bdd 100644 --- a/.dotnet/src/Generated/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Generated/InternalAssistantThreadClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateCreateThreadRequest(BinaryContent content, Reques request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads", false); + uri.AppendPath("/threads", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -49,7 +49,7 @@ internal PipelineMessage CreateGetThreadRequest(string threadId, RequestOptions request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -65,7 +65,7 @@ internal PipelineMessage CreateModifyThreadRequest(string threadId, BinaryConten request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -83,7 +83,7 @@ internal PipelineMessage CreateDeleteThreadRequest(string threadId, RequestOptio request.Method = "DELETE"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/threads/", false); + uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); diff --git a/.dotnet/src/Generated/InternalUploadsClient.cs b/.dotnet/src/Generated/InternalUploadsClient.cs index 0e30e2f4d..4c6d033aa 100644 --- a/.dotnet/src/Generated/InternalUploadsClient.cs +++ b/.dotnet/src/Generated/InternalUploadsClient.cs @@ -174,7 +174,7 @@ internal PipelineMessage CreateCreateUploadRequest(BinaryContent content, Reques request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/uploads", false); + uri.AppendPath("/uploads", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -191,7 +191,7 @@ internal PipelineMessage CreateAddUploadPartRequest(string uploadId, BinaryConte request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/uploads/", false); + uri.AppendPath("/uploads/", false); uri.AppendPath(uploadId, true); uri.AppendPath("/parts", false); request.Uri = uri.ToUri(); @@ -210,7 +210,7 @@ internal PipelineMessage CreateCompleteUploadRequest(string uploadId, BinaryCont request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/uploads/", false); + uri.AppendPath("/uploads/", false); uri.AppendPath(uploadId, true); uri.AppendPath("/complete", false); request.Uri = uri.ToUri(); @@ -229,7 +229,7 @@ internal PipelineMessage CreateCancelUploadRequest(string uploadId, RequestOptio request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/uploads/", false); + uri.AppendPath("/uploads/", false); uri.AppendPath(uploadId, true); uri.AppendPath("/cancel", false); request.Uri = uri.ToUri(); diff --git a/.dotnet/src/Generated/LegacyCompletionClient.cs b/.dotnet/src/Generated/LegacyCompletionClient.cs index 4a0ad7e28..efb44faac 100644 --- a/.dotnet/src/Generated/LegacyCompletionClient.cs +++ b/.dotnet/src/Generated/LegacyCompletionClient.cs @@ -66,7 +66,7 @@ internal PipelineMessage CreateCreateCompletionRequest(BinaryContent content, Re request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/completions", false); + uri.AppendPath("/completions", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); diff --git a/.dotnet/src/Generated/ModelClient.cs b/.dotnet/src/Generated/ModelClient.cs index 62db6d531..86aef48f2 100644 --- a/.dotnet/src/Generated/ModelClient.cs +++ b/.dotnet/src/Generated/ModelClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateGetModelsRequest(RequestOptions options) request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/models", false); + uri.AppendPath("/models", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); message.Apply(options); @@ -47,7 +47,7 @@ internal PipelineMessage CreateRetrieveRequest(string model, RequestOptions opti request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/models/", false); + uri.AppendPath("/models/", false); uri.AppendPath(model, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -63,7 +63,7 @@ internal PipelineMessage CreateDeleteRequest(string model, RequestOptions option request.Method = "DELETE"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/models/", false); + uri.AppendPath("/models/", false); uri.AppendPath(model, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); diff --git a/.dotnet/src/Generated/ModerationClient.cs b/.dotnet/src/Generated/ModerationClient.cs index 73c07013a..9eac79948 100644 --- a/.dotnet/src/Generated/ModerationClient.cs +++ b/.dotnet/src/Generated/ModerationClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateCreateModerationRequest(BinaryContent content, Re request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/moderations", false); + uri.AppendPath("/moderations", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); diff --git a/.dotnet/src/Generated/VectorStoreClient.cs b/.dotnet/src/Generated/VectorStoreClient.cs index 14b48e96d..5e44c7abe 100644 --- a/.dotnet/src/Generated/VectorStoreClient.cs +++ b/.dotnet/src/Generated/VectorStoreClient.cs @@ -32,7 +32,7 @@ internal PipelineMessage CreateGetVectorStoresRequest(int? limit, string order, request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores", false); + uri.AppendPath("/vector_stores", false); if (limit != null) { uri.AppendQuery("limit", limit.Value, true); @@ -63,7 +63,7 @@ internal PipelineMessage CreateCreateVectorStoreRequest(BinaryContent content, R request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores", false); + uri.AppendPath("/vector_stores", false); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); @@ -80,7 +80,7 @@ internal PipelineMessage CreateGetVectorStoreRequest(string vectorStoreId, Reque request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -96,7 +96,7 @@ internal PipelineMessage CreateModifyVectorStoreRequest(string vectorStoreId, Bi request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -114,7 +114,7 @@ internal PipelineMessage CreateDeleteVectorStoreRequest(string vectorStoreId, Re request.Method = "DELETE"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); request.Uri = uri.ToUri(); request.Headers.Set("Accept", "application/json"); @@ -130,7 +130,7 @@ internal PipelineMessage CreateGetVectorStoreFilesRequest(string vectorStoreId, request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files", false); if (limit != null) @@ -167,7 +167,7 @@ internal PipelineMessage CreateCreateVectorStoreFileRequest(string vectorStoreId request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files", false); request.Uri = uri.ToUri(); @@ -186,7 +186,7 @@ internal PipelineMessage CreateGetVectorStoreFileRequest(string vectorStoreId, s request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); @@ -204,7 +204,7 @@ internal PipelineMessage CreateDeleteVectorStoreFileRequest(string vectorStoreId request.Method = "DELETE"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); @@ -222,7 +222,7 @@ internal PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vectorSt request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches", false); request.Uri = uri.ToUri(); @@ -241,7 +241,7 @@ internal PipelineMessage CreateGetVectorStoreFileBatchRequest(string vectorStore request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches/", false); uri.AppendPath(batchId, true); @@ -259,7 +259,7 @@ internal PipelineMessage CreateCancelVectorStoreFileBatchRequest(string vectorSt request.Method = "POST"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches/", false); uri.AppendPath(batchId, true); @@ -278,7 +278,7 @@ internal PipelineMessage CreateGetFilesInVectorStoreBatchesRequest(string vector request.Method = "GET"; var uri = new ClientUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/v1/vector_stores/", false); + uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches/", false); uri.AppendPath(batchId, true); diff --git a/.openapi3/openapi3-openai.yaml b/.openapi3/openapi3-openai.yaml index 96af29c49..93bdf855a 100644 --- a/.openapi3/openapi3-openai.yaml +++ b/.openapi3/openapi3-openai.yaml @@ -18,7 +18,7 @@ tags: - name: Vector Stores - name: Uploads paths: - /v1/assistants: + /assistants: post: tags: - Assistants @@ -92,7 +92,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListAssistantsResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/assistants/{assistant_id}: + /assistants/{assistant_id}: get: tags: - Assistants @@ -162,7 +162,7 @@ paths: anyOf: - $ref: '#/components/schemas/DeleteAssistantResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/audio/speech: + /audio/speech: post: tags: - Audio @@ -189,7 +189,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateSpeechRequest' - /v1/audio/transcriptions: + /audio/transcriptions: post: tags: - Audio @@ -215,7 +215,7 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/CreateTranscriptionRequestMultiPart' - /v1/audio/translations: + /audio/translations: post: tags: - Audio @@ -241,7 +241,7 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/CreateTranslationRequestMultiPart' - /v1/batches: + /batches: post: tags: - Batch @@ -322,7 +322,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListBatchesResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/batches/{batch_id}: + /batches/{batch_id}: get: tags: - Batch @@ -344,7 +344,7 @@ paths: anyOf: - $ref: '#/components/schemas/Batch' - $ref: '#/components/schemas/ErrorResponse' - /v1/batches/{batch_id}/cancel: + /batches/{batch_id}/cancel: post: tags: - Batch @@ -366,7 +366,7 @@ paths: anyOf: - $ref: '#/components/schemas/Batch' - $ref: '#/components/schemas/ErrorResponse' - /v1/chat/completions: + /chat/completions: post: tags: - Chat @@ -388,7 +388,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateChatCompletionRequest' - /v1/completions: + /completions: post: tags: - Completions @@ -410,7 +410,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateCompletionRequest' - /v1/embeddings: + /embeddings: post: tags: - Embeddings @@ -432,7 +432,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateEmbeddingRequest' - /v1/files: + /files: post: tags: - Files @@ -483,7 +483,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListFilesResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/files/{file_id}: + /files/{file_id}: get: tags: - Files @@ -526,7 +526,7 @@ paths: anyOf: - $ref: '#/components/schemas/DeleteFileResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/files/{file_id}/content: + /files/{file_id}/content: get: tags: - Files @@ -549,7 +549,7 @@ paths: - type: string format: byte - $ref: '#/components/schemas/ErrorResponse' - /v1/fine_tuning/jobs: + /fine_tuning/jobs: post: tags: - Fine-tuning @@ -605,7 +605,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListPaginatedFineTuningJobsResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/fine_tuning/jobs/{fine_tuning_job_id}: + /fine_tuning/jobs/{fine_tuning_job_id}: get: tags: - Fine-tuning @@ -630,7 +630,7 @@ paths: anyOf: - $ref: '#/components/schemas/FineTuningJob' - $ref: '#/components/schemas/ErrorResponse' - /v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel: + /fine_tuning/jobs/{fine_tuning_job_id}/cancel: post: tags: - Fine-tuning @@ -652,7 +652,7 @@ paths: anyOf: - $ref: '#/components/schemas/FineTuningJob' - $ref: '#/components/schemas/ErrorResponse' - /v1/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints: + /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints: get: tags: - Fine-tuning @@ -688,7 +688,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListFineTuningJobCheckpointsResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/fine_tuning/jobs/{fine_tuning_job_id}/events: + /fine_tuning/jobs/{fine_tuning_job_id}/events: get: tags: - Fine-tuning @@ -724,7 +724,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListFineTuningJobEventsResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/images/edits: + /images/edits: post: tags: - Images @@ -746,7 +746,7 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/CreateImageEditRequestMultiPart' - /v1/images/generations: + /images/generations: post: tags: - Images @@ -768,7 +768,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateImageRequest' - /v1/images/variations: + /images/variations: post: tags: - Images @@ -790,7 +790,7 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/CreateImageVariationRequestMultiPart' - /v1/models: + /models: get: tags: - Models @@ -808,7 +808,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListModelsResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/models/{model}: + /models/{model}: get: tags: - Models @@ -853,7 +853,7 @@ paths: anyOf: - $ref: '#/components/schemas/DeleteModelResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/moderations: + /moderations: post: tags: - Moderations @@ -875,7 +875,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateModerationRequest' - /v1/threads: + /threads: post: tags: - Assistants @@ -897,7 +897,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateThreadRequest' - /v1/threads/runs: + /threads/runs: post: tags: - Assistants @@ -919,7 +919,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateThreadAndRunRequest' - /v1/threads/{thread_id}: + /threads/{thread_id}: get: tags: - Assistants @@ -989,7 +989,7 @@ paths: anyOf: - $ref: '#/components/schemas/DeleteThreadResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/threads/{thread_id}/messages: + /threads/{thread_id}/messages: post: tags: - Assistants @@ -1075,7 +1075,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListMessagesResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/threads/{thread_id}/messages/{message_id}: + /threads/{thread_id}/messages/{message_id}: get: tags: - Assistants @@ -1163,7 +1163,7 @@ paths: anyOf: - $ref: '#/components/schemas/DeleteMessageResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/threads/{thread_id}/runs: + /threads/{thread_id}/runs: post: tags: - Assistants @@ -1249,7 +1249,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListRunsResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/threads/{thread_id}/runs/{run_id}: + /threads/{thread_id}/runs/{run_id}: get: tags: - Assistants @@ -1310,7 +1310,7 @@ paths: application/json: schema: $ref: '#/components/schemas/ModifyRunRequest' - /v1/threads/{thread_id}/runs/{run_id}/cancel: + /threads/{thread_id}/runs/{run_id}/cancel: post: tags: - Assistants @@ -1338,7 +1338,7 @@ paths: anyOf: - $ref: '#/components/schemas/RunObject' - $ref: '#/components/schemas/ErrorResponse' - /v1/threads/{thread_id}/runs/{run_id}/steps: + /threads/{thread_id}/runs/{run_id}/steps: get: tags: - Assistants @@ -1403,7 +1403,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListRunStepsResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/threads/{thread_id}/runs/{run_id}/steps/{step_id}: + /threads/{thread_id}/runs/{run_id}/steps/{step_id}: get: tags: - Assistants @@ -1437,7 +1437,7 @@ paths: anyOf: - $ref: '#/components/schemas/RunStepObject' - $ref: '#/components/schemas/ErrorResponse' - /v1/threads/{thread_id}/runs/{run_id}/submit_tool_outputs: + /threads/{thread_id}/runs/{run_id}/submit_tool_outputs: post: tags: - Assistants @@ -1474,7 +1474,7 @@ paths: application/json: schema: $ref: '#/components/schemas/SubmitToolOutputsRunRequest' - /v1/uploads: + /uploads: post: tags: - Uploads @@ -1504,7 +1504,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateUploadRequest' - /v1/uploads/{upload_id}/cancel: + /uploads/{upload_id}/cancel: post: tags: - Uploads @@ -1525,7 +1525,7 @@ paths: anyOf: - $ref: '#/components/schemas/Upload' - $ref: '#/components/schemas/ErrorResponse' - /v1/uploads/{upload_id}/complete: + /uploads/{upload_id}/complete: post: tags: - Uploads @@ -1559,7 +1559,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CompleteUploadRequest' - /v1/uploads/{upload_id}/parts: + /uploads/{upload_id}/parts: post: tags: - Uploads @@ -1591,7 +1591,7 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/AddUploadPartRequestMultiPart' - /v1/vector_stores: + /vector_stores: get: tags: - Vector Stores @@ -1665,7 +1665,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateVectorStoreRequest' - /v1/vector_stores/{vector_store_id}: + /vector_stores/{vector_store_id}: get: tags: - Vector Stores @@ -1735,7 +1735,7 @@ paths: anyOf: - $ref: '#/components/schemas/DeleteVectorStoreResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/vector_stores/{vector_store_id}/file_batches: + /vector_stores/{vector_store_id}/file_batches: post: tags: - Vector Stores @@ -1763,7 +1763,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateVectorStoreFileBatchRequest' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: + /vector_stores/{vector_store_id}/file_batches/{batch_id}: get: tags: - Vector Stores @@ -1791,7 +1791,7 @@ paths: anyOf: - $ref: '#/components/schemas/VectorStoreFileBatchObject' - $ref: '#/components/schemas/ErrorResponse' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: + /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: post: tags: - Vector Stores @@ -1819,7 +1819,7 @@ paths: anyOf: - $ref: '#/components/schemas/VectorStoreFileBatchObject' - $ref: '#/components/schemas/ErrorResponse' - /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: + /vector_stores/{vector_store_id}/file_batches/{batch_id}/files: get: tags: - Vector Stores @@ -1890,7 +1890,7 @@ paths: anyOf: - $ref: '#/components/schemas/ListVectorStoreFilesResponse' - $ref: '#/components/schemas/ErrorResponse' - /v1/vector_stores/{vector_store_id}/files: + /vector_stores/{vector_store_id}/files: get: tags: - Vector Stores @@ -1982,7 +1982,7 @@ paths: application/json: schema: $ref: '#/components/schemas/CreateVectorStoreFileRequest' - /v1/vector_stores/{vector_store_id}/files/{file_id}: + /vector_stores/{vector_store_id}/files/{file_id}: get: tags: - Vector Stores @@ -9411,6 +9411,6 @@ components: type: http scheme: bearer servers: - - url: https://api.openai.com + - url: https://api.openai.com/v1 description: OpenAI Endpoint variables: {} diff --git a/.typespec/assistants/operations.tsp b/.typespec/assistants/operations.tsp index b7d1a11bb..f18d38c1a 100644 --- a/.typespec/assistants/operations.tsp +++ b/.typespec/assistants/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/assistants") +@route("/assistants") interface Assistants { @post @operationId("createAssistant") diff --git a/.typespec/audio/operations.tsp b/.typespec/audio/operations.tsp index b69a34d40..c4759c87c 100644 --- a/.typespec/audio/operations.tsp +++ b/.typespec/audio/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/audio") +@route("/audio") interface Audio { @route("speech") @post diff --git a/.typespec/batch/operations.tsp b/.typespec/batch/operations.tsp index fa39ee04a..c3fa6863e 100644 --- a/.typespec/batch/operations.tsp +++ b/.typespec/batch/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/batches") +@route("/batches") interface Batches { @post @operationId("createBatch") diff --git a/.typespec/chat/operations.tsp b/.typespec/chat/operations.tsp index ecb068c73..880f687c6 100644 --- a/.typespec/chat/operations.tsp +++ b/.typespec/chat/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/chat") +@route("/chat") interface Chat { @route("completions") @post diff --git a/.typespec/completions/operations.tsp b/.typespec/completions/operations.tsp index e82c5b90a..a1f674e08 100644 --- a/.typespec/completions/operations.tsp +++ b/.typespec/completions/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/completions") +@route("/completions") interface Completions { @post @operationId("createCompletion") diff --git a/.typespec/embeddings/operations.tsp b/.typespec/embeddings/operations.tsp index da892213e..b474d925b 100644 --- a/.typespec/embeddings/operations.tsp +++ b/.typespec/embeddings/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/embeddings") +@route("/embeddings") interface Embeddings { @post @operationId("createEmbedding") diff --git a/.typespec/files/operations.tsp b/.typespec/files/operations.tsp index a4a51afec..2b2494f0b 100644 --- a/.typespec/files/operations.tsp +++ b/.typespec/files/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/files") +@route("/files") interface Files { @post @operationId("createFile") diff --git a/.typespec/fine-tuning/operations.tsp b/.typespec/fine-tuning/operations.tsp index ddb4cabee..e6b1620c0 100644 --- a/.typespec/fine-tuning/operations.tsp +++ b/.typespec/fine-tuning/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/fine_tuning") +@route("/fine_tuning") interface FineTuning { @route("jobs") @post diff --git a/.typespec/images/operations.tsp b/.typespec/images/operations.tsp index 62c37f590..dc0fb1d3c 100644 --- a/.typespec/images/operations.tsp +++ b/.typespec/images/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/images") +@route("/images") interface Images { @route("generations") @post diff --git a/.typespec/main.tsp b/.typespec/main.tsp index c7b01887a..4e9261637 100644 --- a/.typespec/main.tsp +++ b/.typespec/main.tsp @@ -35,6 +35,6 @@ using TypeSpec.Http; url: "https://github.com/openai/openai-openapi/blob/master/LICENSE", }, }) -@server("https://api.openai.com", "OpenAI Endpoint") +@server("https://api.openai.com/v1", "OpenAI Endpoint") @useAuth(BearerAuth) namespace OpenAI; diff --git a/.typespec/messages/operations.tsp b/.typespec/messages/operations.tsp index 23b0e34a0..cfe06629b 100644 --- a/.typespec/messages/operations.tsp +++ b/.typespec/messages/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/threads/{thread_id}/messages") +@route("/threads/{thread_id}/messages") interface Messages { @post @operationId("createMessage") diff --git a/.typespec/models/operations.tsp b/.typespec/models/operations.tsp index 558cc9716..bd8ea8150 100644 --- a/.typespec/models/operations.tsp +++ b/.typespec/models/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/models") +@route("/models") interface Models { @get @operationId("listModels") diff --git a/.typespec/moderations/operations.tsp b/.typespec/moderations/operations.tsp index b288ccb6e..29a846297 100644 --- a/.typespec/moderations/operations.tsp +++ b/.typespec/moderations/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/moderations") +@route("/moderations") interface Moderations { @post @operationId("createModeration") diff --git a/.typespec/runs/operations.tsp b/.typespec/runs/operations.tsp index 18cd5498d..1dc221020 100644 --- a/.typespec/runs/operations.tsp +++ b/.typespec/runs/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/threads") +@route("/threads") interface Runs { @route("runs") @post diff --git a/.typespec/threads/operations.tsp b/.typespec/threads/operations.tsp index 00dffe377..ebf7345aa 100644 --- a/.typespec/threads/operations.tsp +++ b/.typespec/threads/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/threads") +@route("/threads") interface Threads { @post @operationId("createThread") diff --git a/.typespec/uploads/operations.tsp b/.typespec/uploads/operations.tsp index eabef6ea2..1da4a995a 100644 --- a/.typespec/uploads/operations.tsp +++ b/.typespec/uploads/operations.tsp @@ -9,7 +9,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/uploads") +@route("/uploads") interface Uploads { @post @operationId("createUpload") diff --git a/.typespec/vector-stores/operations.tsp b/.typespec/vector-stores/operations.tsp index 908cf6583..a7b2fe279 100644 --- a/.typespec/vector-stores/operations.tsp +++ b/.typespec/vector-stores/operations.tsp @@ -10,7 +10,7 @@ using TypeSpec.OpenAPI; namespace OpenAI; -@route("/v1/vector_stores") +@route("/vector_stores") interface VectorStores { @get @operationId("listVectorStores")