Skip to content

Commit 583e9f6

Browse files
authored
Revert the removal of the version path parameter v1 from the default endpoint URL (#192)
1 parent 5773292 commit 583e9f6

29 files changed

+82
-80
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
### Other Changes
1515

16+
- Reverted the removal of the version path parameter "v1" from the default endpoint URL. (commit_hash)
17+
1618
## 2.0.0-beta.10 (2024-08-26)
1719

1820
### Breaking Changes

src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private PipelineMessage CreateGetAssistantsRequest(int? limit, string order, str
107107
request.Method = "GET";
108108
var uri = new ClientUriBuilder();
109109
uri.Reset(_endpoint);
110-
uri.AppendPath("/v1/assistants", false);
110+
uri.AppendPath("/assistants", false);
111111
if (limit != null)
112112
{
113113
uri.AppendQuery("limit", limit.Value, true);

src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private PipelineMessage CreateGetMessagesRequest(string threadId, int? limit, st
115115
request.Method = "GET";
116116
var uri = new ClientUriBuilder();
117117
uri.Reset(_endpoint);
118-
uri.AppendPath("/v1/threads/", false);
118+
uri.AppendPath("/threads/", false);
119119
uri.AppendPath(threadId, true);
120120
uri.AppendPath("/messages", false);
121121
if (limit != null)

src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private PipelineMessage CreateGetRunStepsRequest(string threadId, string runId,
119119
request.Method = "GET";
120120
var uri = new ClientUriBuilder();
121121
uri.Reset(_endpoint);
122-
uri.AppendPath("/v1/threads/", false);
122+
uri.AppendPath("/threads/", false);
123123
uri.AppendPath(threadId, true);
124124
uri.AppendPath("/runs/", false);
125125
uri.AppendPath(runId, true);

src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private PipelineMessage CreateGetRunsRequest(string threadId, int? limit, string
113113
request.Method = "GET";
114114
var uri = new ClientUriBuilder();
115115
uri.Reset(_endpoint);
116-
uri.AppendPath("/v1/threads/", false);
116+
uri.AppendPath("/threads/", false);
117117
uri.AppendPath(threadId, true);
118118
uri.AppendPath("/runs", false);
119119
if (limit != null)

src/Custom/Batch/Internal/Pagination/BatchesPageEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ internal PipelineMessage CreateGetBatchesRequest(string after, int? limit, Reque
8888
request.Method = "GET";
8989
var uri = new ClientUriBuilder();
9090
uri.Reset(_endpoint);
91-
uri.AppendPath("/v1/batches", false);
91+
uri.AppendPath("/batches", false);
9292
if (after != null)
9393
{
9494
uri.AppendQuery("after", after, true);

src/Custom/FineTuning/Internal/Pagination/FineTuningJobCheckpointsPageEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ internal PipelineMessage CreateGetFineTuningJobCheckpointsRequest(string fineTun
9494
request.Method = "GET";
9595
var uri = new ClientUriBuilder();
9696
uri.Reset(_endpoint);
97-
uri.AppendPath("/v1/fine_tuning/jobs/", false);
97+
uri.AppendPath("/fine_tuning/jobs/", false);
9898
uri.AppendPath(fineTuningJobId, true);
9999
uri.AppendPath("/checkpoints", false);
100100
if (after != null)

src/Custom/FineTuning/Internal/Pagination/FineTuningJobEventsPageEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ internal PipelineMessage CreateGetFineTuningEventsRequest(string fineTuningJobId
9494
request.Method = "GET";
9595
var uri = new ClientUriBuilder();
9696
uri.Reset(_endpoint);
97-
uri.AppendPath("/v1/fine_tuning/jobs/", false);
97+
uri.AppendPath("/fine_tuning/jobs/", false);
9898
uri.AppendPath(fineTuningJobId, true);
9999
uri.AppendPath("/events", false);
100100
if (after != null)

src/Custom/FineTuning/Internal/Pagination/FineTuningJobsPageEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ internal PipelineMessage CreateGetFineTuningJobsRequest(string after, int? limit
8888
request.Method = "GET";
8989
var uri = new ClientUriBuilder();
9090
uri.Reset(_endpoint);
91-
uri.AppendPath("/v1/fine_tuning/jobs", false);
91+
uri.AppendPath("/fine_tuning/jobs", false);
9292
if (after != null)
9393
{
9494
uri.AppendQuery("after", after, true);

src/Custom/OpenAIClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace OpenAI;
6161
[CodeGenSuppress("GetVectorStoreClientClient")]
6262
public partial class OpenAIClient
6363
{
64-
private const string OpenAIV1Endpoint = "https://api.openai.com";
64+
private const string OpenAIV1Endpoint = "https://api.openai.com/v1";
6565
private const string OpenAIBetaHeaderValue = "assistants=v2";
6666

6767
private static class KnownHeaderNames

0 commit comments

Comments
 (0)