Skip to content

Commit

Permalink
Merge pull request #82 from tryAGI/bot/update-openapi_202409200316
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 20, 2024
2 parents 943aa36 + 1b9c711 commit 4f2f241
Show file tree
Hide file tree
Showing 95 changed files with 702 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Linq;

#nullable enable

Expand Down Expand Up @@ -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<string>())}", 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Linq;

#nullable enable

Expand Down Expand Up @@ -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<string>())}", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));

PrepareRequest(
client: _httpClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Linq;

#nullable enable

Expand Down Expand Up @@ -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<string>())}", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));

PrepareRequest(
client: _httpClient,
Expand Down
12 changes: 11 additions & 1 deletion src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRuns.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 4f2f241

Please sign in to comment.