diff --git a/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs b/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs index afba2b9e..d6a16e04 100644 --- a/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs +++ b/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs @@ -2,6 +2,7 @@ #nullable enable #pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant namespace OpenAI { diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CancelRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CancelRun.g.cs index dc41107a..030ee198 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CancelRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CancelRun.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareCancelRunArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string runId); + partial void PrepareCancelRunRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string runId); + partial void ProcessCancelRunResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCancelRunResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Cancels a run that is `in_progress`. /// @@ -17,17 +35,49 @@ public partial class AssistantsClient string runId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareCancelRunArguments( + httpClient: _httpClient, + threadId: ref threadId, + runId: ref runId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCancelRunRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + runId: runId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCancelRunResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCancelRunResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs index 5351cdd1..3596e511 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateAssistant.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareCreateAssistantArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateAssistantRequest request); + partial void PrepareCreateAssistantRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateAssistantRequest request); + partial void ProcessCreateAssistantResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateAssistantResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Create an assistant with a model and instructions. /// @@ -17,6 +33,12 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateAssistantArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateAssistantRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateAssistantResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateAssistantResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs index aad19cd7..d6ab3b3c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateMessage.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareCreateMessageArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + global::OpenAI.CreateMessageRequest request); + partial void PrepareCreateMessageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + global::OpenAI.CreateMessageRequest request); + partial void ProcessCreateMessageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateMessageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Create a message. /// @@ -19,6 +37,13 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateMessageArguments( + httpClient: _httpClient, + threadId: ref threadId, + request: request); + 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)); @@ -28,13 +53,38 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateMessageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateMessageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateMessageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs index df947c69..e02d6701 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareCreateRunArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + global::OpenAI.CreateRunRequest request); + partial void PrepareCreateRunRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + global::OpenAI.CreateRunRequest request); + partial void ProcessCreateRunResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateRunResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Create a run. /// @@ -19,6 +37,13 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateRunArguments( + httpClient: _httpClient, + threadId: ref threadId, + request: request); + 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", global::System.UriKind.RelativeOrAbsolute)); @@ -28,13 +53,38 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateRunRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateRunResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateRunResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThread.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThread.g.cs index 3eeadf02..b3702001 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThread.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThread.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareCreateThreadArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateThreadRequest request); + partial void PrepareCreateThreadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateThreadRequest request); + partial void ProcessCreateThreadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateThreadResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Create a thread. /// @@ -17,6 +33,12 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateThreadArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateThreadRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateThreadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateThreadResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs index 2e3ae55d..05dd1c92 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateThreadAndRun.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareCreateThreadAndRunArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateThreadAndRunRequest request); + partial void PrepareCreateThreadAndRunRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateThreadAndRunRequest request); + partial void ProcessCreateThreadAndRunResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateThreadAndRunResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Create a thread and run it in one request. /// @@ -17,6 +33,12 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateThreadAndRunArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateThreadAndRunRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateThreadAndRunResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateThreadAndRunResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteAssistant.g.cs index 5a0fc6f5..010ba4dd 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteAssistant.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareDeleteAssistantArguments( + global::System.Net.Http.HttpClient httpClient, + ref string assistantId); + partial void PrepareDeleteAssistantRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string assistantId); + partial void ProcessDeleteAssistantResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteAssistantResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Delete an assistant. /// @@ -15,17 +31,47 @@ public partial class AssistantsClient string assistantId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareDeleteAssistantArguments( + httpClient: _httpClient, + assistantId: ref assistantId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteAssistantRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + assistantId: assistantId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteAssistantResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteAssistantResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteMessage.g.cs index a96c0f02..46e36081 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteMessage.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareDeleteMessageArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string messageId); + partial void PrepareDeleteMessageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string messageId); + partial void ProcessDeleteMessageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteMessageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Deletes a message. /// @@ -17,17 +35,49 @@ public partial class AssistantsClient string messageId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareDeleteMessageArguments( + httpClient: _httpClient, + threadId: ref threadId, + messageId: ref messageId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteMessageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + messageId: messageId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteMessageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteMessageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteThread.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteThread.g.cs index 25b9f295..94235adc 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteThread.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.DeleteThread.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareDeleteThreadArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId); + partial void PrepareDeleteThreadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId); + partial void ProcessDeleteThreadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteThreadResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Delete a thread. /// @@ -15,17 +31,47 @@ public partial class AssistantsClient string threadId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareDeleteThreadArguments( + httpClient: _httpClient, + threadId: ref threadId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteThreadRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteThreadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteThreadResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetAssistant.g.cs index 3822dec3..73da3010 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetAssistant.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareGetAssistantArguments( + global::System.Net.Http.HttpClient httpClient, + ref string assistantId); + partial void PrepareGetAssistantRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string assistantId); + partial void ProcessGetAssistantResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetAssistantResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieves an assistant. /// @@ -15,17 +31,47 @@ public partial class AssistantsClient string assistantId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareGetAssistantArguments( + httpClient: _httpClient, + assistantId: ref assistantId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetAssistantRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + assistantId: assistantId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetAssistantResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetAssistantResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetMessage.g.cs index c469cf09..0f6e461b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetMessage.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareGetMessageArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string messageId); + partial void PrepareGetMessageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string messageId); + partial void ProcessGetMessageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetMessageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieve a message. /// @@ -17,17 +35,49 @@ public partial class AssistantsClient string messageId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareGetMessageArguments( + httpClient: _httpClient, + threadId: ref threadId, + messageId: ref messageId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetMessageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + messageId: messageId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetMessageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetMessageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRun.g.cs index 5615ff3f..0eabb01c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRun.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareGetRunArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string runId); + partial void PrepareGetRunRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string runId); + partial void ProcessGetRunResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetRunResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieves a run. /// @@ -17,17 +35,49 @@ public partial class AssistantsClient string runId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareGetRunArguments( + httpClient: _httpClient, + threadId: ref threadId, + runId: ref runId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetRunRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + runId: runId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetRunResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetRunResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRunStep.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRunStep.g.cs index 387c0a6d..db8e01b5 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRunStep.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetRunStep.g.cs @@ -5,6 +5,26 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareGetRunStepArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string runId, + ref string stepId); + partial void PrepareGetRunStepRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string runId, + string stepId); + partial void ProcessGetRunStepResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetRunStepResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieves a run step. /// @@ -19,17 +39,51 @@ public partial class AssistantsClient string stepId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareGetRunStepArguments( + httpClient: _httpClient, + threadId: ref threadId, + runId: ref runId, + stepId: ref stepId); + 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}", global::System.UriKind.RelativeOrAbsolute)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetRunStepRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + runId: runId, + stepId: stepId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetRunStepResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetRunStepResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetThread.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetThread.g.cs index 332fac22..0ecd67a2 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetThread.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.GetThread.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareGetThreadArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId); + partial void PrepareGetThreadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId); + partial void ProcessGetThreadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetThreadResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieves a thread. /// @@ -15,17 +31,47 @@ public partial class AssistantsClient string threadId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareGetThreadArguments( + httpClient: _httpClient, + threadId: ref threadId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetThreadRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetThreadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetThreadResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListAssistants.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListAssistants.g.cs index bfd747d8..803fb5ad 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListAssistants.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListAssistants.g.cs @@ -5,6 +5,28 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareListAssistantsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int limit, + ref global::OpenAI.ListAssistantsOrder order, + ref string after, + ref string before); + partial void PrepareListAssistantsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int limit, + global::OpenAI.ListAssistantsOrder order, + string after, + string before); + partial void ProcessListAssistantsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListAssistantsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns a list of assistants. /// @@ -21,17 +43,53 @@ public partial class AssistantsClient string before, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListAssistantsArguments( + httpClient: _httpClient, + limit: ref limit, + order: ref order, + after: ref after, + before: ref before); + 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={order}&after={after}&before={before}", global::System.UriKind.RelativeOrAbsolute)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListAssistantsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + limit: limit, + order: order, + after: after, + before: before); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListAssistantsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListAssistantsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListMessages.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListMessages.g.cs index e73ec7b5..4cd282eb 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListMessages.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListMessages.g.cs @@ -5,6 +5,32 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareListMessagesArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref int limit, + ref global::OpenAI.ListMessagesOrder order, + ref string after, + ref string before, + ref string runId); + partial void PrepareListMessagesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + int limit, + global::OpenAI.ListMessagesOrder order, + string after, + string before, + string runId); + partial void ProcessListMessagesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListMessagesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns a list of messages for a given thread. /// @@ -25,17 +51,57 @@ public partial class AssistantsClient string runId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListMessagesArguments( + httpClient: _httpClient, + threadId: ref threadId, + limit: ref limit, + order: ref order, + after: ref after, + before: ref before, + runId: ref runId); + 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={order}&after={after}&before={before}&run_id={runId}", global::System.UriKind.RelativeOrAbsolute)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListMessagesRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + limit: limit, + order: order, + after: after, + before: before, + runId: runId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListMessagesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListMessagesResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRunSteps.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRunSteps.g.cs index a0a93466..09c5bf05 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRunSteps.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRunSteps.g.cs @@ -5,6 +5,32 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareListRunStepsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string runId, + ref int limit, + ref global::OpenAI.ListRunStepsOrder order, + ref string after, + ref string before); + partial void PrepareListRunStepsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string runId, + int limit, + global::OpenAI.ListRunStepsOrder order, + string after, + string before); + partial void ProcessListRunStepsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListRunStepsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns a list of run steps belonging to a run. /// @@ -25,17 +51,57 @@ public partial class AssistantsClient string before, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListRunStepsArguments( + httpClient: _httpClient, + threadId: ref threadId, + runId: ref runId, + limit: ref limit, + order: ref order, + after: ref after, + before: ref before); + 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={order}&after={after}&before={before}", global::System.UriKind.RelativeOrAbsolute)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListRunStepsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + runId: runId, + limit: limit, + order: order, + after: after, + before: before); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListRunStepsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListRunStepsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRuns.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRuns.g.cs index 504b212c..b2dd2669 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRuns.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ListRuns.g.cs @@ -5,6 +5,30 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareListRunsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref int limit, + ref global::OpenAI.ListRunsOrder order, + ref string after, + ref string before); + partial void PrepareListRunsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + int limit, + global::OpenAI.ListRunsOrder order, + string after, + string before); + partial void ProcessListRunsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListRunsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns a list of runs belonging to a thread. /// @@ -23,17 +47,55 @@ public partial class AssistantsClient string before, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListRunsArguments( + httpClient: _httpClient, + threadId: ref threadId, + limit: ref limit, + order: ref order, + after: ref after, + before: ref before); + 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={order}&after={after}&before={before}", global::System.UriKind.RelativeOrAbsolute)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListRunsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + limit: limit, + order: order, + after: after, + before: before); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListRunsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListRunsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs index 576a3e7e..ce2081f3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyAssistant.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareModifyAssistantArguments( + global::System.Net.Http.HttpClient httpClient, + ref string assistantId, + global::OpenAI.ModifyAssistantRequest request); + partial void PrepareModifyAssistantRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string assistantId, + global::OpenAI.ModifyAssistantRequest request); + partial void ProcessModifyAssistantResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessModifyAssistantResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Modifies an assistant. /// @@ -19,6 +37,13 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareModifyAssistantArguments( + httpClient: _httpClient, + assistantId: ref assistantId, + request: request); + 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)); @@ -28,13 +53,38 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareModifyAssistantRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + assistantId: assistantId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessModifyAssistantResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessModifyAssistantResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyMessage.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyMessage.g.cs index 1bcb59b9..e5e19285 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyMessage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyMessage.g.cs @@ -5,6 +5,26 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareModifyMessageArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string messageId, + global::OpenAI.ModifyMessageRequest request); + partial void PrepareModifyMessageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string messageId, + global::OpenAI.ModifyMessageRequest request); + partial void ProcessModifyMessageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessModifyMessageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Modifies a message. /// @@ -21,6 +41,14 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareModifyMessageArguments( + httpClient: _httpClient, + threadId: ref threadId, + messageId: ref messageId, + request: request); + 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)); @@ -30,13 +58,39 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareModifyMessageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + messageId: messageId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessModifyMessageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessModifyMessageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyRun.g.cs index 1950bbf8..c0c477cf 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyRun.g.cs @@ -5,6 +5,26 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareModifyRunArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string runId, + global::OpenAI.ModifyRunRequest request); + partial void PrepareModifyRunRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string runId, + global::OpenAI.ModifyRunRequest request); + partial void ProcessModifyRunResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessModifyRunResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Modifies a run. /// @@ -21,6 +41,14 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareModifyRunArguments( + httpClient: _httpClient, + threadId: ref threadId, + runId: ref runId, + request: request); + 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)); @@ -30,13 +58,39 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareModifyRunRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + runId: runId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessModifyRunResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessModifyRunResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyThread.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyThread.g.cs index 98e88978..519e79bf 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyThread.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.ModifyThread.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareModifyThreadArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + global::OpenAI.ModifyThreadRequest request); + partial void PrepareModifyThreadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + global::OpenAI.ModifyThreadRequest request); + partial void ProcessModifyThreadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessModifyThreadResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Modifies a thread. /// @@ -19,6 +37,13 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareModifyThreadArguments( + httpClient: _httpClient, + threadId: ref threadId, + request: request); + 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)); @@ -28,13 +53,38 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareModifyThreadRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessModifyThreadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessModifyThreadResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs index ef9597c5..5469410e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.SubmitToolOuputsToRun.g.cs @@ -5,6 +5,26 @@ namespace OpenAI { public partial class AssistantsClient { + partial void PrepareSubmitToolOuputsToRunArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string runId, + global::OpenAI.SubmitToolOutputsRunRequest request); + partial void PrepareSubmitToolOuputsToRunRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string runId, + global::OpenAI.SubmitToolOutputsRunRequest request); + partial void ProcessSubmitToolOuputsToRunResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessSubmitToolOuputsToRunResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. /// @@ -21,6 +41,14 @@ public partial class AssistantsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareSubmitToolOuputsToRunArguments( + httpClient: _httpClient, + threadId: ref threadId, + runId: ref runId, + request: request); + 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)); @@ -30,13 +58,39 @@ public partial class AssistantsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareSubmitToolOuputsToRunRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + threadId: threadId, + runId: runId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessSubmitToolOuputsToRunResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessSubmitToolOuputsToRunResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.g.cs index c7d4d8f0..f165508b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AssistantsClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateSpeech.g.cs b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateSpeech.g.cs index b01aef6e..bf206d9c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateSpeech.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateSpeech.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AudioClient { + partial void PrepareCreateSpeechArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateSpeechRequest request); + partial void PrepareCreateSpeechRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateSpeechRequest request); + partial void ProcessCreateSpeechResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateSpeechResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Generates audio from the input text. /// @@ -17,6 +33,12 @@ public partial class AudioClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateSpeechArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class AudioClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateSpeechRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateSpeechResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateSpeechResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranscription.g.cs b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranscription.g.cs index 07aa50c4..35f7e6df 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranscription.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranscription.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AudioClient { + partial void PrepareCreateTranscriptionArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateTranscriptionRequest request); + partial void PrepareCreateTranscriptionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateTranscriptionRequest request); + partial void ProcessCreateTranscriptionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateTranscriptionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Transcribes audio into the input language. /// @@ -17,6 +33,12 @@ public partial class AudioClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateTranscriptionArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class AudioClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateTranscriptionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateTranscriptionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateTranscriptionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranslation.g.cs b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranslation.g.cs index 189f0468..d55b2377 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranslation.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AudioClient.CreateTranslation.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class AudioClient { + partial void PrepareCreateTranslationArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateTranslationRequest request); + partial void PrepareCreateTranslationRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateTranslationRequest request); + partial void ProcessCreateTranslationResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateTranslationResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Translates audio into English. /// @@ -17,6 +33,12 @@ public partial class AudioClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateTranslationArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class AudioClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateTranslationRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateTranslationResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateTranslationResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.AudioClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.AudioClient.g.cs index 8084d58d..5bd35239 100644 --- a/src/libs/OpenAI/Generated/OpenAI.AudioClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.AudioClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.BatchClient.CancelBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.BatchClient.CancelBatch.g.cs index 4e8ed499..b00ecb76 100644 --- a/src/libs/OpenAI/Generated/OpenAI.BatchClient.CancelBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.BatchClient.CancelBatch.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class BatchClient { + partial void PrepareCancelBatchArguments( + global::System.Net.Http.HttpClient httpClient, + ref string batchId); + partial void PrepareCancelBatchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string batchId); + partial void ProcessCancelBatchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCancelBatchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file. /// @@ -15,17 +31,47 @@ public partial class BatchClient string batchId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareCancelBatchArguments( + httpClient: _httpClient, + batchId: ref batchId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCancelBatchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + batchId: batchId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCancelBatchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCancelBatchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.BatchClient.CreateBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.BatchClient.CreateBatch.g.cs index eae205fa..296fd34f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.BatchClient.CreateBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.BatchClient.CreateBatch.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class BatchClient { + partial void PrepareCreateBatchArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateBatchRequest request); + partial void PrepareCreateBatchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateBatchRequest request); + partial void ProcessCreateBatchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateBatchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Creates and executes a batch from an uploaded file of requests /// @@ -17,6 +33,12 @@ public partial class BatchClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateBatchArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class BatchClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateBatchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateBatchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateBatchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.BatchClient.ListBatches.g.cs b/src/libs/OpenAI/Generated/OpenAI.BatchClient.ListBatches.g.cs index 3092eacc..9faf4dca 100644 --- a/src/libs/OpenAI/Generated/OpenAI.BatchClient.ListBatches.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.BatchClient.ListBatches.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class BatchClient { + partial void PrepareListBatchesArguments( + global::System.Net.Http.HttpClient httpClient, + ref string after, + ref int limit); + partial void PrepareListBatchesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string after, + int limit); + partial void ProcessListBatchesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListBatchesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// List your organization's batches. /// @@ -17,17 +35,49 @@ public partial class BatchClient int limit, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListBatchesArguments( + httpClient: _httpClient, + after: ref after, + limit: ref limit); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListBatchesRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + after: after, + limit: limit); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListBatchesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListBatchesResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.BatchClient.RetrieveBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.BatchClient.RetrieveBatch.g.cs index 99593030..6fbea6e6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.BatchClient.RetrieveBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.BatchClient.RetrieveBatch.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class BatchClient { + partial void PrepareRetrieveBatchArguments( + global::System.Net.Http.HttpClient httpClient, + ref string batchId); + partial void PrepareRetrieveBatchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string batchId); + partial void ProcessRetrieveBatchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRetrieveBatchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieves a batch. /// @@ -15,17 +31,47 @@ public partial class BatchClient string batchId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareRetrieveBatchArguments( + httpClient: _httpClient, + batchId: ref batchId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareRetrieveBatchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + batchId: batchId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessRetrieveBatchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessRetrieveBatchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.BatchClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.BatchClient.g.cs index e9771997..92bf21bb 100644 --- a/src/libs/OpenAI/Generated/OpenAI.BatchClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.BatchClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs b/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs index ee53ba6f..23196a92 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ChatClient.CreateChatCompletion.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class ChatClient { + partial void PrepareCreateChatCompletionArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateChatCompletionRequest request); + partial void PrepareCreateChatCompletionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateChatCompletionRequest request); + partial void ProcessCreateChatCompletionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateChatCompletionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Creates a model response for the given chat conversation. /// @@ -17,6 +33,12 @@ public partial class ChatClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateChatCompletionArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class ChatClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateChatCompletionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateChatCompletionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateChatCompletionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.ChatClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.ChatClient.g.cs index 04f5818f..cdec0032 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ChatClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ChatClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.CreateCompletion.g.cs b/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.CreateCompletion.g.cs index 8c8d43c5..6c2a5020 100644 --- a/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.CreateCompletion.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.CreateCompletion.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class CompletionsClient { + partial void PrepareCreateCompletionArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateCompletionRequest request); + partial void PrepareCreateCompletionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateCompletionRequest request); + partial void ProcessCreateCompletionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateCompletionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Creates a completion for the provided prompt and parameters. /// @@ -17,6 +33,12 @@ public partial class CompletionsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateCompletionArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class CompletionsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateCompletionRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateCompletionResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateCompletionResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.g.cs index 6d97d563..edde5ea9 100644 --- a/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.CompletionsClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.CreateEmbedding.g.cs b/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.CreateEmbedding.g.cs index 3d5c8ab5..b58f42d9 100644 --- a/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.CreateEmbedding.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.CreateEmbedding.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class EmbeddingsClient { + partial void PrepareCreateEmbeddingArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateEmbeddingRequest request); + partial void PrepareCreateEmbeddingRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateEmbeddingRequest request); + partial void ProcessCreateEmbeddingResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateEmbeddingResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Creates an embedding vector representing the input text. /// @@ -17,6 +33,12 @@ public partial class EmbeddingsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateEmbeddingArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class EmbeddingsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateEmbeddingRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateEmbeddingResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateEmbeddingResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.g.cs index f95bccec..8b3367a8 100644 --- a/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.EmbeddingsClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.CreateFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.CreateFile.g.cs index 8c489b19..0a712d38 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.CreateFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.CreateFile.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class FilesClient { + partial void PrepareCreateFileArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateFileRequest request); + partial void PrepareCreateFileRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateFileRequest request); + partial void ProcessCreateFileResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateFileResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 100 GB.
/// The Assistants API supports files up to 2 million tokens and of specific file types. See the [Assistants Tools guide](/docs/assistants/tools) for details.
@@ -21,6 +37,12 @@ public partial class FilesClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateFileArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -30,13 +52,37 @@ public partial class FilesClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateFileRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateFileResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateFileResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.DeleteFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.DeleteFile.g.cs index cebc5763..3490c350 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.DeleteFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.DeleteFile.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class FilesClient { + partial void PrepareDeleteFileArguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId); + partial void PrepareDeleteFileRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId); + partial void ProcessDeleteFileResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteFileResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Delete a file. /// @@ -15,17 +31,47 @@ public partial class FilesClient string fileId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareDeleteFileArguments( + httpClient: _httpClient, + fileId: ref fileId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteFileRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteFileResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteFileResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.DownloadFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.DownloadFile.g.cs index 5669d004..667d190b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.DownloadFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.DownloadFile.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class FilesClient { + partial void PrepareDownloadFileArguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId); + partial void PrepareDownloadFileRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId); + partial void ProcessDownloadFileResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDownloadFileResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns the contents of the specified file. /// @@ -15,17 +31,47 @@ public partial class FilesClient string fileId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareDownloadFileArguments( + httpClient: _httpClient, + fileId: ref fileId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDownloadFileRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessDownloadFileResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDownloadFileResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.ListFiles.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.ListFiles.g.cs index 67037ae4..5dfbe34a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.ListFiles.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.ListFiles.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class FilesClient { + partial void PrepareListFilesArguments( + global::System.Net.Http.HttpClient httpClient, + ref string purpose); + partial void PrepareListFilesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string purpose); + partial void ProcessListFilesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListFilesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns a list of files that belong to the user's organization. /// @@ -15,17 +31,47 @@ public partial class FilesClient string purpose, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListFilesArguments( + httpClient: _httpClient, + purpose: ref purpose); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListFilesRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + purpose: purpose); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListFilesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListFilesResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.RetrieveFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.RetrieveFile.g.cs index 48296ce3..9596f5e7 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.RetrieveFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.RetrieveFile.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class FilesClient { + partial void PrepareRetrieveFileArguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId); + partial void PrepareRetrieveFileRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId); + partial void ProcessRetrieveFileResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRetrieveFileResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns information about a specific file. /// @@ -15,17 +31,47 @@ public partial class FilesClient string fileId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareRetrieveFileArguments( + httpClient: _httpClient, + fileId: ref fileId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareRetrieveFileRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessRetrieveFileResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessRetrieveFileResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FilesClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.FilesClient.g.cs index abd4a705..ba4a8f6d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FilesClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FilesClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CancelFineTuningJob.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CancelFineTuningJob.g.cs index ec3b9912..bbe5465b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CancelFineTuningJob.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CancelFineTuningJob.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class FineTuningClient { + partial void PrepareCancelFineTuningJobArguments( + global::System.Net.Http.HttpClient httpClient, + ref string fineTuningJobId); + partial void PrepareCancelFineTuningJobRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fineTuningJobId); + partial void ProcessCancelFineTuningJobResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCancelFineTuningJobResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Immediately cancel a fine-tune job. /// @@ -15,17 +31,47 @@ public partial class FineTuningClient string fineTuningJobId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareCancelFineTuningJobArguments( + httpClient: _httpClient, + fineTuningJobId: ref fineTuningJobId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCancelFineTuningJobRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fineTuningJobId: fineTuningJobId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCancelFineTuningJobResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCancelFineTuningJobResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CreateFineTuningJob.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CreateFineTuningJob.g.cs index be049fd4..8c745d14 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CreateFineTuningJob.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.CreateFineTuningJob.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class FineTuningClient { + partial void PrepareCreateFineTuningJobArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateFineTuningJobRequest request); + partial void PrepareCreateFineTuningJobRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateFineTuningJobRequest request); + partial void ProcessCreateFineTuningJobResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateFineTuningJobResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Creates a fine-tuning job which begins the process of creating a new model from a given dataset.
/// Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.
@@ -19,6 +35,12 @@ public partial class FineTuningClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateFineTuningJobArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -28,13 +50,37 @@ public partial class FineTuningClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateFineTuningJobRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateFineTuningJobResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateFineTuningJobResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningEvents.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningEvents.g.cs index a0f8368c..e60b2961 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningEvents.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningEvents.g.cs @@ -5,6 +5,26 @@ namespace OpenAI { public partial class FineTuningClient { + partial void PrepareListFineTuningEventsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string fineTuningJobId, + ref string after, + ref int limit); + partial void PrepareListFineTuningEventsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fineTuningJobId, + string after, + int limit); + partial void ProcessListFineTuningEventsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListFineTuningEventsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Get status updates for a fine-tuning job. /// @@ -19,17 +39,51 @@ public partial class FineTuningClient int limit, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListFineTuningEventsArguments( + httpClient: _httpClient, + fineTuningJobId: ref fineTuningJobId, + after: ref after, + limit: ref limit); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListFineTuningEventsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fineTuningJobId: fineTuningJobId, + after: after, + limit: limit); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListFineTuningEventsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListFineTuningEventsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs index 2a1b1c73..9de2b7fc 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListFineTuningJobCheckpoints.g.cs @@ -5,6 +5,26 @@ namespace OpenAI { public partial class FineTuningClient { + partial void PrepareListFineTuningJobCheckpointsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string fineTuningJobId, + ref string after, + ref int limit); + partial void PrepareListFineTuningJobCheckpointsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fineTuningJobId, + string after, + int limit); + partial void ProcessListFineTuningJobCheckpointsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListFineTuningJobCheckpointsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// List checkpoints for a fine-tuning job. /// @@ -19,17 +39,51 @@ public partial class FineTuningClient int limit, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListFineTuningJobCheckpointsArguments( + httpClient: _httpClient, + fineTuningJobId: ref fineTuningJobId, + after: ref after, + limit: ref limit); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListFineTuningJobCheckpointsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fineTuningJobId: fineTuningJobId, + after: after, + limit: limit); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListFineTuningJobCheckpointsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListFineTuningJobCheckpointsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs index 9dee9d33..0e611e82 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.ListPaginatedFineTuningJobs.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class FineTuningClient { + partial void PrepareListPaginatedFineTuningJobsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string after, + ref int limit); + partial void PrepareListPaginatedFineTuningJobsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string after, + int limit); + partial void ProcessListPaginatedFineTuningJobsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListPaginatedFineTuningJobsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// List your organization's fine-tuning jobs /// @@ -17,17 +35,49 @@ public partial class FineTuningClient int limit, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListPaginatedFineTuningJobsArguments( + httpClient: _httpClient, + after: ref after, + limit: ref limit); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListPaginatedFineTuningJobsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + after: after, + limit: limit); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListPaginatedFineTuningJobsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListPaginatedFineTuningJobsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs index 103ca46a..2c11194f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class FineTuningClient { + partial void PrepareRetrieveFineTuningJobArguments( + global::System.Net.Http.HttpClient httpClient, + ref string fineTuningJobId); + partial void PrepareRetrieveFineTuningJobRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fineTuningJobId); + partial void ProcessRetrieveFineTuningJobResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRetrieveFineTuningJobResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Get info about a fine-tuning job.
/// [Learn more about fine-tuning](/docs/guides/fine-tuning) @@ -16,17 +32,47 @@ public partial class FineTuningClient string fineTuningJobId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareRetrieveFineTuningJobArguments( + httpClient: _httpClient, + fineTuningJobId: ref fineTuningJobId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareRetrieveFineTuningJobRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fineTuningJobId: fineTuningJobId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessRetrieveFineTuningJobResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessRetrieveFineTuningJobResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.g.cs index 81f88470..aa49ca1e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.FineTuningClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImage.g.cs b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImage.g.cs index 05310a5a..f50cbd2e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImage.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImage.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class ImagesClient { + partial void PrepareCreateImageArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateImageRequest request); + partial void PrepareCreateImageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateImageRequest request); + partial void ProcessCreateImageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateImageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Creates an image given a prompt. /// @@ -17,6 +33,12 @@ public partial class ImagesClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateImageArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class ImagesClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateImageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateImageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateImageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageEdit.g.cs b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageEdit.g.cs index d9a8ea0a..3471bd65 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageEdit.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageEdit.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class ImagesClient { + partial void PrepareCreateImageEditArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateImageEditRequest request); + partial void PrepareCreateImageEditRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateImageEditRequest request); + partial void ProcessCreateImageEditResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateImageEditResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Creates an edited or extended image given an original image and a prompt. /// @@ -17,6 +33,12 @@ public partial class ImagesClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateImageEditArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class ImagesClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateImageEditRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateImageEditResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateImageEditResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageVariation.g.cs b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageVariation.g.cs index 8cc1a48e..b4a1170f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageVariation.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.CreateImageVariation.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class ImagesClient { + partial void PrepareCreateImageVariationArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateImageVariationRequest request); + partial void PrepareCreateImageVariationRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateImageVariationRequest request); + partial void ProcessCreateImageVariationResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateImageVariationResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Creates a variation of a given image. /// @@ -17,6 +33,12 @@ public partial class ImagesClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateImageVariationArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class ImagesClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateImageVariationRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateImageVariationResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateImageVariationResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.g.cs index b8a6416b..2f6ef048 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ImagesClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ImagesClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.DeleteModel.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.DeleteModel.g.cs index a58c3ada..b61f2dc4 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.DeleteModel.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.DeleteModel.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class ModelsClient { + partial void PrepareDeleteModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string model); + partial void PrepareDeleteModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string model); + partial void ProcessDeleteModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. /// @@ -15,17 +31,47 @@ public partial class ModelsClient string model, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareDeleteModelArguments( + httpClient: _httpClient, + model: ref model); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.ListModels.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.ListModels.g.cs index 2a013173..bbcb5b5c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.ListModels.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.ListModels.g.cs @@ -5,6 +5,20 @@ namespace OpenAI { public partial class ModelsClient { + partial void PrepareListModelsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareListModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessListModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Lists the currently available models, and provides basic information about each one such as the owner and availability. /// @@ -13,17 +27,45 @@ public partial class ModelsClient public async global::System.Threading.Tasks.Task ListModelsAsync( global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListModelsArguments( + httpClient: _httpClient); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListModelsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListModelsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListModelsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.RetrieveModel.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.RetrieveModel.g.cs index 932c52eb..9ab7726e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.RetrieveModel.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.RetrieveModel.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class ModelsClient { + partial void PrepareRetrieveModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string model); + partial void PrepareRetrieveModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string model); + partial void ProcessRetrieveModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRetrieveModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieves a model instance, providing basic information about the model such as the owner and permissioning. /// @@ -15,17 +31,47 @@ public partial class ModelsClient string model, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareRetrieveModelArguments( + httpClient: _httpClient, + model: ref model); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareRetrieveModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessRetrieveModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessRetrieveModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.g.cs index 9f35adc4..1b70feaa 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModelsClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModelsClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs index 976c0c8a..62ae5d78 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.CreateModeration.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class ModerationsClient { + partial void PrepareCreateModerationArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateModerationRequest request); + partial void PrepareCreateModerationRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateModerationRequest request); + partial void ProcessCreateModerationResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateModerationResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Classifies if text is potentially harmful. /// @@ -17,6 +33,12 @@ public partial class ModerationsClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateModerationArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class ModerationsClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateModerationRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateModerationResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateModerationResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.g.cs index 0954f009..18a7e6ee 100644 --- a/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.ModerationsClient.g.cs @@ -39,5 +39,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.OpenAiApi.g.cs b/src/libs/OpenAI/Generated/OpenAI.OpenAiApi.g.cs index 47ada0e7..a5935aaa 100644 --- a/src/libs/OpenAI/Generated/OpenAI.OpenAiApi.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.OpenAiApi.g.cs @@ -99,5 +99,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs index ad41f372..1a2ed800 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CancelVectorStoreFileBatch.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareCancelVectorStoreFileBatchArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId, + ref string batchId); + partial void PrepareCancelVectorStoreFileBatchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId, + string batchId); + partial void ProcessCancelVectorStoreFileBatchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCancelVectorStoreFileBatchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. /// @@ -17,17 +35,49 @@ public partial class VectorStoresClient string batchId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareCancelVectorStoreFileBatchArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId, + batchId: ref batchId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCancelVectorStoreFileBatchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId, + batchId: batchId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCancelVectorStoreFileBatchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCancelVectorStoreFileBatchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs index 8db55d75..e9afec2b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStore.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareCreateVectorStoreArguments( + global::System.Net.Http.HttpClient httpClient, + global::OpenAI.CreateVectorStoreRequest request); + partial void PrepareCreateVectorStoreRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::OpenAI.CreateVectorStoreRequest request); + partial void ProcessCreateVectorStoreResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateVectorStoreResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Create a vector store. /// @@ -17,6 +33,12 @@ public partial class VectorStoresClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateVectorStoreArguments( + httpClient: _httpClient, + request: request); + 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)); @@ -26,13 +48,37 @@ public partial class VectorStoresClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateVectorStoreRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateVectorStoreResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateVectorStoreResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs index a94ea263..2b535986 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFile.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareCreateVectorStoreFileArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId, + global::OpenAI.CreateVectorStoreFileRequest request); + partial void PrepareCreateVectorStoreFileRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId, + global::OpenAI.CreateVectorStoreFileRequest request); + partial void ProcessCreateVectorStoreFileResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateVectorStoreFileResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object). /// @@ -19,6 +37,13 @@ public partial class VectorStoresClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateVectorStoreFileArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId, + request: request); + 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)); @@ -28,13 +53,38 @@ public partial class VectorStoresClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateVectorStoreFileRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateVectorStoreFileResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateVectorStoreFileResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs index c9e81cd3..c515b0e3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.CreateVectorStoreFileBatch.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareCreateVectorStoreFileBatchArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId, + global::OpenAI.CreateVectorStoreFileBatchRequest request); + partial void PrepareCreateVectorStoreFileBatchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId, + global::OpenAI.CreateVectorStoreFileBatchRequest request); + partial void ProcessCreateVectorStoreFileBatchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateVectorStoreFileBatchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Create a vector store file batch. /// @@ -19,6 +37,13 @@ public partial class VectorStoresClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareCreateVectorStoreFileBatchArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId, + request: request); + 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)); @@ -28,13 +53,38 @@ public partial class VectorStoresClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateVectorStoreFileBatchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateVectorStoreFileBatchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateVectorStoreFileBatchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStore.g.cs index a33e02cd..1eb69d3b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStore.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareDeleteVectorStoreArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId); + partial void PrepareDeleteVectorStoreRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId); + partial void ProcessDeleteVectorStoreResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteVectorStoreResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Delete a vector store. /// @@ -15,17 +31,47 @@ public partial class VectorStoresClient string vectorStoreId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareDeleteVectorStoreArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteVectorStoreRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteVectorStoreResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteVectorStoreResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs index 1daea82d..1ac84b37 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.DeleteVectorStoreFile.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareDeleteVectorStoreFileArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId, + ref string fileId); + partial void PrepareDeleteVectorStoreFileRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId, + string fileId); + partial void ProcessDeleteVectorStoreFileResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteVectorStoreFileResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint. /// @@ -17,17 +35,49 @@ public partial class VectorStoresClient string fileId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareDeleteVectorStoreFileArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId, + fileId: ref fileId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteVectorStoreFileRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId, + fileId: fileId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteVectorStoreFileResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteVectorStoreFileResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStore.g.cs index 7558b44d..f08fc053 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStore.g.cs @@ -5,6 +5,22 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareGetVectorStoreArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId); + partial void PrepareGetVectorStoreRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId); + partial void ProcessGetVectorStoreResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetVectorStoreResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieves a vector store. /// @@ -15,17 +31,47 @@ public partial class VectorStoresClient string vectorStoreId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareGetVectorStoreArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetVectorStoreRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetVectorStoreResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetVectorStoreResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs index ce24bbc4..84cca09e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFile.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareGetVectorStoreFileArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId, + ref string fileId); + partial void PrepareGetVectorStoreFileRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId, + string fileId); + partial void ProcessGetVectorStoreFileResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetVectorStoreFileResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieves a vector store file. /// @@ -17,17 +35,49 @@ public partial class VectorStoresClient string fileId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareGetVectorStoreFileArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId, + fileId: ref fileId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetVectorStoreFileRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId, + fileId: fileId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetVectorStoreFileResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetVectorStoreFileResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs index 7a52306c..215484ff 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.GetVectorStoreFileBatch.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareGetVectorStoreFileBatchArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId, + ref string batchId); + partial void PrepareGetVectorStoreFileBatchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId, + string batchId); + partial void ProcessGetVectorStoreFileBatchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetVectorStoreFileBatchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Retrieves a vector store file batch. /// @@ -17,17 +35,49 @@ public partial class VectorStoresClient string batchId, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareGetVectorStoreFileBatchArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId, + batchId: ref batchId); + 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)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetVectorStoreFileBatchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId, + batchId: batchId); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetVectorStoreFileBatchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetVectorStoreFileBatchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs index acee37ae..c746886c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListFilesInVectorStoreBatch.g.cs @@ -5,6 +5,34 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareListFilesInVectorStoreBatchArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId, + ref string batchId, + ref int limit, + ref global::OpenAI.ListFilesInVectorStoreBatchOrder order, + ref string after, + ref string before, + ref global::OpenAI.ListFilesInVectorStoreBatchFilter filter); + partial void PrepareListFilesInVectorStoreBatchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId, + string batchId, + int limit, + global::OpenAI.ListFilesInVectorStoreBatchOrder order, + string after, + string before, + global::OpenAI.ListFilesInVectorStoreBatchFilter filter); + partial void ProcessListFilesInVectorStoreBatchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListFilesInVectorStoreBatchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns a list of vector store files in a batch. /// @@ -27,17 +55,59 @@ public partial class VectorStoresClient global::OpenAI.ListFilesInVectorStoreBatchFilter filter, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListFilesInVectorStoreBatchArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId, + batchId: ref batchId, + limit: ref limit, + order: ref order, + after: ref after, + before: ref before, + filter: ref filter); + 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={order}&after={after}&before={before}&filter={filter}", global::System.UriKind.RelativeOrAbsolute)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListFilesInVectorStoreBatchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId, + batchId: batchId, + limit: limit, + order: order, + after: after, + before: before, + filter: filter); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListFilesInVectorStoreBatchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListFilesInVectorStoreBatchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs index 86c89953..987b0fa9 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStoreFiles.g.cs @@ -5,6 +5,32 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareListVectorStoreFilesArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId, + ref int limit, + ref global::OpenAI.ListVectorStoreFilesOrder order, + ref string after, + ref string before, + ref global::OpenAI.ListVectorStoreFilesFilter filter); + partial void PrepareListVectorStoreFilesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId, + int limit, + global::OpenAI.ListVectorStoreFilesOrder order, + string after, + string before, + global::OpenAI.ListVectorStoreFilesFilter filter); + partial void ProcessListVectorStoreFilesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListVectorStoreFilesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns a list of vector store files. /// @@ -25,17 +51,57 @@ public partial class VectorStoresClient global::OpenAI.ListVectorStoreFilesFilter filter, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListVectorStoreFilesArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId, + limit: ref limit, + order: ref order, + after: ref after, + before: ref before, + filter: ref filter); + 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={order}&after={after}&before={before}&filter={filter}", global::System.UriKind.RelativeOrAbsolute)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListVectorStoreFilesRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId, + limit: limit, + order: order, + after: after, + before: before, + filter: filter); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListVectorStoreFilesResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListVectorStoreFilesResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStores.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStores.g.cs index b05a4956..b6bbbc6d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStores.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ListVectorStores.g.cs @@ -5,6 +5,28 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareListVectorStoresArguments( + global::System.Net.Http.HttpClient httpClient, + ref int limit, + ref global::OpenAI.ListVectorStoresOrder order, + ref string after, + ref string before); + partial void PrepareListVectorStoresRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int limit, + global::OpenAI.ListVectorStoresOrder order, + string after, + string before); + partial void ProcessListVectorStoresResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListVectorStoresResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Returns a list of vector stores. /// @@ -21,17 +43,53 @@ public partial class VectorStoresClient string before, global::System.Threading.CancellationToken cancellationToken = default) { + PrepareArguments( + client: _httpClient); + PrepareListVectorStoresArguments( + httpClient: _httpClient, + limit: ref limit, + order: ref order, + after: ref after, + before: ref before); + 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={order}&after={after}&before={before}", global::System.UriKind.RelativeOrAbsolute)); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListVectorStoresRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + limit: limit, + order: order, + after: after, + before: before); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessListVectorStoresResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListVectorStoresResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ModifyVectorStore.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ModifyVectorStore.g.cs index bd32c335..cc8460ab 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ModifyVectorStore.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.ModifyVectorStore.g.cs @@ -5,6 +5,24 @@ namespace OpenAI { public partial class VectorStoresClient { + partial void PrepareModifyVectorStoreArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId, + global::OpenAI.UpdateVectorStoreRequest request); + partial void PrepareModifyVectorStoreRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId, + global::OpenAI.UpdateVectorStoreRequest request); + partial void ProcessModifyVectorStoreResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessModifyVectorStoreResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + /// /// Modifies a vector store. /// @@ -19,6 +37,13 @@ public partial class VectorStoresClient { request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( + client: _httpClient); + PrepareModifyVectorStoreArguments( + httpClient: _httpClient, + vectorStoreId: ref vectorStoreId, + request: request); + 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)); @@ -28,13 +53,38 @@ public partial class VectorStoresClient encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareModifyVectorStoreRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + vectorStoreId: vectorStoreId, + request: request); + using var response = await _httpClient.SendAsync( request: httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); + ProcessResponse( + client: _httpClient, + response: response); + ProcessModifyVectorStoreResponse( + httpClient: _httpClient, + httpResponseMessage: response); + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessModifyVectorStoreResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + try { response.EnsureSuccessStatusCode(); diff --git a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.g.cs index cac1da23..39720f7d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.VectorStoresClient.g.cs @@ -38,5 +38,18 @@ public void Dispose() { _httpClient.Dispose(); } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); } } \ No newline at end of file