diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.CreateMessageStudioV1AssistantThreadsThreadIdMessagesPost.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.CreateMessageStudioV1AssistantThreadsThreadIdMessagesPost.g.cs new file mode 100644 index 0000000..c47bd31 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.CreateMessageStudioV1AssistantThreadsThreadIdMessagesPost.g.cs @@ -0,0 +1,140 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareCreateMessageStudioV1AssistantThreadsThreadIdMessagesPostArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + global::AI21.CreateMessageRequest request); + partial void PrepareCreateMessageStudioV1AssistantThreadsThreadIdMessagesPostRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + global::AI21.CreateMessageRequest request); + partial void ProcessCreateMessageStudioV1AssistantThreadsThreadIdMessagesPostResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateMessageStudioV1AssistantThreadsThreadIdMessagesPostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Message + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateMessageStudioV1AssistantThreadsThreadIdMessagesPostAsync( + string threadId, + global::AI21.CreateMessageRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateMessageStudioV1AssistantThreadsThreadIdMessagesPostArguments( + 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('/') + $"/studio/v1/assistant/threads/{threadId}/messages", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::AI21.SourceGenerationContext.Default.CreateMessageRequest); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateMessageStudioV1AssistantThreadsThreadIdMessagesPostRequest( + 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); + ProcessCreateMessageStudioV1AssistantThreadsThreadIdMessagesPostResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateMessageStudioV1AssistantThreadsThreadIdMessagesPostResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, global::AI21.SourceGenerationContext.Default.CreateMessageResponse) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create Message + /// + /// + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateMessageStudioV1AssistantThreadsThreadIdMessagesPostAsync( + string threadId, + string role, + string content, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::AI21.CreateMessageRequest + { + Role = role, + Content = content, + }; + + return await CreateMessageStudioV1AssistantThreadsThreadIdMessagesPostAsync( + threadId: threadId, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.CreateThreadStudioV1AssistantThreadsPost.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.CreateThreadStudioV1AssistantThreadsPost.g.cs new file mode 100644 index 0000000..bce3d12 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.CreateThreadStudioV1AssistantThreadsPost.g.cs @@ -0,0 +1,119 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareCreateThreadStudioV1AssistantThreadsPostArguments( + global::System.Net.Http.HttpClient httpClient, + global::AI21.CreateThreadRequest request); + partial void PrepareCreateThreadStudioV1AssistantThreadsPostRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::AI21.CreateThreadRequest request); + partial void ProcessCreateThreadStudioV1AssistantThreadsPostResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateThreadStudioV1AssistantThreadsPostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Thread + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateThreadStudioV1AssistantThreadsPostAsync( + global::AI21.CreateThreadRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateThreadStudioV1AssistantThreadsPostArguments( + 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('/') + "/studio/v1/assistant/threads", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::AI21.SourceGenerationContext.Default.CreateThreadRequest); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateThreadStudioV1AssistantThreadsPostRequest( + 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); + ProcessCreateThreadStudioV1AssistantThreadsPostResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateThreadStudioV1AssistantThreadsPostResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, global::AI21.SourceGenerationContext.Default.CreateThreadResponse) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create Thread + /// + /// + /// messages + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateThreadStudioV1AssistantThreadsPostAsync( + global::System.Collections.Generic.IList? messages = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::AI21.CreateThreadRequest + { + Messages = messages, + }; + + return await CreateThreadStudioV1AssistantThreadsPostAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.GetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGet.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.GetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGet.g.cs new file mode 100644 index 0000000..a4eb057 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.GetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGet.g.cs @@ -0,0 +1,95 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareGetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + ref string runId); + partial void PrepareGetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + string runId); + partial void ProcessGetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Thread Run Result + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGetAsync( + string threadId, + string runId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGetArguments( + 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('/') + $"/studio/v1/assistant/threads/{threadId}/runs/{runId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGetRequest( + 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); + ProcessGetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetThreadRunResultStudioV1AssistantThreadsThreadIdRunsRunIdGetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, global::AI21.SourceGenerationContext.Default.GetThreadRunResponse) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.GetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGet.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.GetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGet.g.cs new file mode 100644 index 0000000..fb0dcd5 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.GetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGet.g.cs @@ -0,0 +1,89 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareGetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string userId); + partial void PrepareGetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string userId); + partial void ProcessGetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get User Data Sources Info + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGetAsync( + string userId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGetArguments( + httpClient: _httpClient, + userId: ref userId); + + 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('/') + $"/studio/v1/connectors/connected-users/{userId}/data-sources", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + userId: userId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetUserDataSourcesInfoStudioV1ConnectorsConnectedUsersUserIdDataSourcesGetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, global::AI21.SourceGenerationContext.Default.ConnectorsDataSources) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.GetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPost.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.GetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPost.g.cs new file mode 100644 index 0000000..1d568c6 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.GetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPost.g.cs @@ -0,0 +1,89 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareGetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPostArguments( + global::System.Net.Http.HttpClient httpClient, + ref string userId); + partial void PrepareGetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPostRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string userId); + partial void ProcessGetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPostResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get User Token + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPostAsync( + string userId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPostArguments( + httpClient: _httpClient, + userId: ref userId); + + 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('/') + $"/studio/v1/connectors/connected-users/{userId}/tokens", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPostRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + userId: userId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPostResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetUserTokenStudioV1ConnectorsConnectedUsersUserIdTokensPostResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, global::AI21.SourceGenerationContext.Default.ConnectorsToken) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.PostThreadRunStudioV1AssistantThreadsThreadIdRunsPost.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.PostThreadRunStudioV1AssistantThreadsThreadIdRunsPost.g.cs new file mode 100644 index 0000000..5a9947c --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.PostThreadRunStudioV1AssistantThreadsThreadIdRunsPost.g.cs @@ -0,0 +1,134 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PreparePostThreadRunStudioV1AssistantThreadsThreadIdRunsPostArguments( + global::System.Net.Http.HttpClient httpClient, + ref string threadId, + global::AI21.PostThreadRunRequest request); + partial void PreparePostThreadRunStudioV1AssistantThreadsThreadIdRunsPostRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string threadId, + global::AI21.PostThreadRunRequest request); + partial void ProcessPostThreadRunStudioV1AssistantThreadsThreadIdRunsPostResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessPostThreadRunStudioV1AssistantThreadsThreadIdRunsPostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Post Thread Run + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostThreadRunStudioV1AssistantThreadsThreadIdRunsPostAsync( + string threadId, + global::AI21.PostThreadRunRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PreparePostThreadRunStudioV1AssistantThreadsThreadIdRunsPostArguments( + 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('/') + $"/studio/v1/assistant/threads/{threadId}/runs", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::AI21.SourceGenerationContext.Default.PostThreadRunRequest); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PreparePostThreadRunStudioV1AssistantThreadsThreadIdRunsPostRequest( + 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); + ProcessPostThreadRunStudioV1AssistantThreadsThreadIdRunsPostResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessPostThreadRunStudioV1AssistantThreadsThreadIdRunsPostResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, global::AI21.SourceGenerationContext.Default.PostThreadRunResponse) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Post Thread Run + /// + /// + /// + /// + /// + /// An enumeration. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PostThreadRunStudioV1AssistantThreadsThreadIdRunsPostAsync( + string threadId, + string assistantId, + string description, + global::AI21.RunOptimization optimization, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::AI21.PostThreadRunRequest + { + AssistantId = assistantId, + Description = description, + Optimization = optimization, + }; + + return await PostThreadRunStudioV1AssistantThreadsThreadIdRunsPostAsync( + threadId: threadId, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ConnectorsDataSources.g.cs b/src/libs/AI21/Generated/AI21.Models.ConnectorsDataSources.g.cs new file mode 100644 index 0000000..14520da --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.ConnectorsDataSources.g.cs @@ -0,0 +1,24 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class ConnectorsDataSources + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data_sources")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList DataSources { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ConnectorsToken.g.cs b/src/libs/AI21/Generated/AI21.Models.ConnectorsToken.g.cs new file mode 100644 index 0000000..a41dc70 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.ConnectorsToken.g.cs @@ -0,0 +1,24 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class ConnectorsToken + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Token { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CreateMessageRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateMessageRequest.g.cs new file mode 100644 index 0000000..85b6a1d --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.CreateMessageRequest.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class CreateMessageRequest + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CreateMessageResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateMessageResponse.g.cs new file mode 100644 index 0000000..b92ae90 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.CreateMessageResponse.g.cs @@ -0,0 +1,70 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class CreateMessageResponse + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { get; set; } + + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime UpdatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CreateThreadRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateThreadRequest.g.cs new file mode 100644 index 0000000..83df07e --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.CreateThreadRequest.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class CreateThreadRequest + { + /// + /// messages + /// + [global::System.Text.Json.Serialization.JsonPropertyName("messages")] + public global::System.Collections.Generic.IList? Messages { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CreateThreadResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateThreadResponse.g.cs new file mode 100644 index 0000000..e049c21 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.CreateThreadResponse.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class CreateThreadResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime UpdatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.DataSourceMetadata.g.cs b/src/libs/AI21/Generated/AI21.Models.DataSourceMetadata.g.cs new file mode 100644 index 0000000..9b853c6 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.DataSourceMetadata.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class DataSourceMetadata + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("icon")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Icon { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("connected")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Connected { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.GetThreadRunResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.GetThreadRunResponse.g.cs new file mode 100644 index 0000000..a6818de --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.GetThreadRunResponse.g.cs @@ -0,0 +1,84 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class GetThreadRunResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ThreadId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AssistantId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.RunStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AI21.RunStatus Status { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("optimization")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.RunOptimizationJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AI21.RunOptimization Optimization { get; set; } + + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime UpdatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs index f5c7818..bb0baff 100644 --- a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs @@ -35,6 +35,13 @@ public sealed partial class LibraryAnswerRequest [global::System.Text.Json.Serialization.JsonPropertyName("labels")] public global::System.Collections.Generic.IList? Labels { get; set; } + /// + /// Default Value: AND + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels_filter_mode")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.LibraryAnswerRequestLabelsFilterModeJsonConverter))] + public global::AI21.LibraryAnswerRequestLabelsFilterMode? LabelsFilterMode { get; set; } = global::AI21.LibraryAnswerRequestLabelsFilterMode.AND; + /// /// /// diff --git a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequestLabelsFilterMode.g.cs b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequestLabelsFilterMode.g.cs new file mode 100644 index 0000000..d1b9a1c --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequestLabelsFilterMode.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// Default Value: AND + /// + public enum LibraryAnswerRequestLabelsFilterMode + { + /// + /// + /// + AND, + /// + /// + /// + OR, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LibraryAnswerRequestLabelsFilterModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LibraryAnswerRequestLabelsFilterMode value) + { + return value switch + { + LibraryAnswerRequestLabelsFilterMode.AND => "AND", + LibraryAnswerRequestLabelsFilterMode.OR => "OR", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LibraryAnswerRequestLabelsFilterMode? ToEnum(string value) + { + return value switch + { + "AND" => LibraryAnswerRequestLabelsFilterMode.AND, + "OR" => LibraryAnswerRequestLabelsFilterMode.OR, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LibrarySearchRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.LibrarySearchRequest.g.cs index 1ba0148..12986f3 100644 --- a/src/libs/AI21/Generated/AI21.Models.LibrarySearchRequest.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.LibrarySearchRequest.g.cs @@ -35,6 +35,13 @@ public sealed partial class LibrarySearchRequest [global::System.Text.Json.Serialization.JsonPropertyName("labels")] public global::System.Collections.Generic.IList? Labels { get; set; } + /// + /// Default Value: AND + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels_filter_mode")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.LibrarySearchRequestLabelsFilterModeJsonConverter))] + public global::AI21.LibrarySearchRequestLabelsFilterMode? LabelsFilterMode { get; set; } = global::AI21.LibrarySearchRequestLabelsFilterMode.AND; + /// /// /// diff --git a/src/libs/AI21/Generated/AI21.Models.LibrarySearchRequestLabelsFilterMode.g.cs b/src/libs/AI21/Generated/AI21.Models.LibrarySearchRequestLabelsFilterMode.g.cs new file mode 100644 index 0000000..0982317 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LibrarySearchRequestLabelsFilterMode.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// Default Value: AND + /// + public enum LibrarySearchRequestLabelsFilterMode + { + /// + /// + /// + AND, + /// + /// + /// + OR, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LibrarySearchRequestLabelsFilterModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LibrarySearchRequestLabelsFilterMode value) + { + return value switch + { + LibrarySearchRequestLabelsFilterMode.AND => "AND", + LibrarySearchRequestLabelsFilterMode.OR => "OR", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LibrarySearchRequestLabelsFilterMode? ToEnum(string value) + { + return value switch + { + "AND" => LibrarySearchRequestLabelsFilterMode.AND, + "OR" => LibrarySearchRequestLabelsFilterMode.OR, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.PostThreadRunRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.PostThreadRunRequest.g.cs new file mode 100644 index 0000000..165cb43 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.PostThreadRunRequest.g.cs @@ -0,0 +1,39 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class PostThreadRunRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AssistantId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("optimization")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.RunOptimizationJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AI21.RunOptimization Optimization { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.PostThreadRunResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.PostThreadRunResponse.g.cs new file mode 100644 index 0000000..3a80c0e --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.PostThreadRunResponse.g.cs @@ -0,0 +1,84 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class PostThreadRunResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thread_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ThreadId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("assistant_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AssistantId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.RunStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AI21.RunStatus Status { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("optimization")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.RunOptimizationJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AI21.RunOptimization Optimization { get; set; } + + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime UpdatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Object { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.RunOptimization.g.cs b/src/libs/AI21/Generated/AI21.Models.RunOptimization.g.cs new file mode 100644 index 0000000..dda5994 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.RunOptimization.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// An enumeration. + /// + public enum RunOptimization + { + /// + /// + /// + Cost, + /// + /// + /// + Latency, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunOptimizationExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunOptimization value) + { + return value switch + { + RunOptimization.Cost => "cost", + RunOptimization.Latency => "latency", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunOptimization? ToEnum(string value) + { + return value switch + { + "cost" => RunOptimization.Cost, + "latency" => RunOptimization.Latency, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.RunStatus.g.cs b/src/libs/AI21/Generated/AI21.Models.RunStatus.g.cs new file mode 100644 index 0000000..1f84a57 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.RunStatus.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// An enumeration. + /// + public enum RunStatus + { + /// + /// + /// + Cancelled, + /// + /// + /// + Cancelling, + /// + /// + /// + Completed, + /// + /// + /// + Expired, + /// + /// + /// + Failed, + /// + /// + /// + Incomplete, + /// + /// + /// + InProgress, + /// + /// + /// + Queued, + /// + /// + /// + RequiresAction, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunStatus value) + { + return value switch + { + RunStatus.Cancelled => "cancelled", + RunStatus.Cancelling => "cancelling", + RunStatus.Completed => "completed", + RunStatus.Expired => "expired", + RunStatus.Failed => "failed", + RunStatus.Incomplete => "incomplete", + RunStatus.InProgress => "in_progress", + RunStatus.Queued => "queued", + RunStatus.RequiresAction => "requires_action", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunStatus? ToEnum(string value) + { + return value switch + { + "cancelled" => RunStatus.Cancelled, + "cancelling" => RunStatus.Cancelling, + "completed" => RunStatus.Completed, + "expired" => RunStatus.Expired, + "failed" => RunStatus.Failed, + "incomplete" => RunStatus.Incomplete, + "in_progress" => RunStatus.InProgress, + "queued" => RunStatus.Queued, + "requires_action" => RunStatus.RequiresAction, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ThreadMessage.g.cs b/src/libs/AI21/Generated/AI21.Models.ThreadMessage.g.cs new file mode 100644 index 0000000..4afe3da --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.ThreadMessage.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class ThreadMessage + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryAnswer.g.cs b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryAnswer.g.cs index f177170..da35e65 100644 --- a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryAnswer.g.cs +++ b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryAnswer.g.cs @@ -101,6 +101,9 @@ partial void ProcessV1LibraryAnswerResponseContent( /// /// /// + /// + /// Default Value: AND + /// /// /// /// An enumeration. @@ -120,6 +123,7 @@ partial void ProcessV1LibraryAnswerResponseContent( int maxSegments = default, string? path = default, global::System.Collections.Generic.IList? labels = default, + global::AI21.LibraryAnswerRequestLabelsFilterMode? labelsFilterMode = global::AI21.LibraryAnswerRequestLabelsFilterMode.AND, global::System.Collections.Generic.IList? fileIds = default, global::AI21.AnswerLength? answerLength = default, global::AI21.Mode? mode = default, @@ -134,6 +138,7 @@ partial void ProcessV1LibraryAnswerResponseContent( MaxSegments = maxSegments, Path = path, Labels = labels, + LabelsFilterMode = labelsFilterMode, FileIds = fileIds, AnswerLength = answerLength, Mode = mode, diff --git a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs index 700f6c9..11e8ca9 100644 --- a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs +++ b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs @@ -101,6 +101,9 @@ partial void ProcessV1LibrarySearchResponseContent( /// /// /// + /// + /// Default Value: AND + /// /// /// /// Default Value: default @@ -117,6 +120,7 @@ partial void ProcessV1LibrarySearchResponseContent( int maxSegments = default, string? path = default, global::System.Collections.Generic.IList? labels = default, + global::AI21.LibrarySearchRequestLabelsFilterMode? labelsFilterMode = global::AI21.LibrarySearchRequestLabelsFilterMode.AND, global::System.Collections.Generic.IList? fileIds = default, global::System.AllOf? retrievalStrategy = default, int maxNeighbors = 1, @@ -130,6 +134,7 @@ partial void ProcessV1LibrarySearchResponseContent( MaxSegments = maxSegments, Path = path, Labels = labels, + LabelsFilterMode = labelsFilterMode, FileIds = fileIds, RetrievalStrategy = retrievalStrategy, MaxNeighbors = maxNeighbors, diff --git a/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterMode.g.cs b/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterMode.g.cs new file mode 100644 index 0000000..160837f --- /dev/null +++ b/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterMode.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class LibraryAnswerRequestLabelsFilterModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.LibraryAnswerRequestLabelsFilterMode Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AI21.LibraryAnswerRequestLabelsFilterModeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.LibraryAnswerRequestLabelsFilterMode)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.LibraryAnswerRequestLabelsFilterMode value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.LibraryAnswerRequestLabelsFilterModeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterModeNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterModeNullable.g.cs new file mode 100644 index 0000000..be895d0 --- /dev/null +++ b/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterModeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class LibraryAnswerRequestLabelsFilterModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.LibraryAnswerRequestLabelsFilterMode? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AI21.LibraryAnswerRequestLabelsFilterModeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.LibraryAnswerRequestLabelsFilterMode)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.LibraryAnswerRequestLabelsFilterMode? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::AI21.LibraryAnswerRequestLabelsFilterModeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/JsonConverters.LibrarySearchRequestLabelsFilterMode.g.cs b/src/libs/AI21/Generated/JsonConverters.LibrarySearchRequestLabelsFilterMode.g.cs new file mode 100644 index 0000000..2a6aee9 --- /dev/null +++ b/src/libs/AI21/Generated/JsonConverters.LibrarySearchRequestLabelsFilterMode.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class LibrarySearchRequestLabelsFilterModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.LibrarySearchRequestLabelsFilterMode Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AI21.LibrarySearchRequestLabelsFilterModeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.LibrarySearchRequestLabelsFilterMode)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.LibrarySearchRequestLabelsFilterMode value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.LibrarySearchRequestLabelsFilterModeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/JsonConverters.LibrarySearchRequestLabelsFilterModeNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.LibrarySearchRequestLabelsFilterModeNullable.g.cs new file mode 100644 index 0000000..df1616c --- /dev/null +++ b/src/libs/AI21/Generated/JsonConverters.LibrarySearchRequestLabelsFilterModeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class LibrarySearchRequestLabelsFilterModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.LibrarySearchRequestLabelsFilterMode? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AI21.LibrarySearchRequestLabelsFilterModeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.LibrarySearchRequestLabelsFilterMode)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.LibrarySearchRequestLabelsFilterMode? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::AI21.LibrarySearchRequestLabelsFilterModeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/JsonConverters.RunOptimization.g.cs b/src/libs/AI21/Generated/JsonConverters.RunOptimization.g.cs new file mode 100644 index 0000000..050bd7b --- /dev/null +++ b/src/libs/AI21/Generated/JsonConverters.RunOptimization.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class RunOptimizationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.RunOptimization Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AI21.RunOptimizationExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.RunOptimization)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.RunOptimization value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.RunOptimizationExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/JsonConverters.RunOptimizationNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.RunOptimizationNullable.g.cs new file mode 100644 index 0000000..25f7f5c --- /dev/null +++ b/src/libs/AI21/Generated/JsonConverters.RunOptimizationNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class RunOptimizationNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.RunOptimization? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AI21.RunOptimizationExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.RunOptimization)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.RunOptimization? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::AI21.RunOptimizationExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/JsonConverters.RunStatus.g.cs b/src/libs/AI21/Generated/JsonConverters.RunStatus.g.cs new file mode 100644 index 0000000..6cc9209 --- /dev/null +++ b/src/libs/AI21/Generated/JsonConverters.RunStatus.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class RunStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.RunStatus Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AI21.RunStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.RunStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.RunStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.RunStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/JsonConverters.RunStatusNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.RunStatusNullable.g.cs new file mode 100644 index 0000000..5e3b436 --- /dev/null +++ b/src/libs/AI21/Generated/JsonConverters.RunStatusNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class RunStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.RunStatus? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::AI21.RunStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.RunStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.RunStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::AI21.RunStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/JsonSerializerContext.g.cs b/src/libs/AI21/Generated/JsonSerializerContext.g.cs index c1ea5cd..675ccfc 100644 --- a/src/libs/AI21/Generated/JsonSerializerContext.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContext.g.cs @@ -41,8 +41,16 @@ namespace AI21 typeof(global::OpenApiGenerator.JsonConverters.FileStatusNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ToolParametersTypeJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ToolParametersTypeNullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.RunStatusJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.RunStatusNullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.RunOptimizationJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.RunOptimizationNullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.LibraryAnswerRequestLabelsFilterModeJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.LibraryAnswerRequestLabelsFilterModeNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.RetrievalStrategy3JsonConverter), typeof(global::OpenApiGenerator.JsonConverters.RetrievalStrategy3NullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.LibrarySearchRequestLabelsFilterModeJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.LibrarySearchRequestLabelsFilterModeNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ModelNameJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ModelNameNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.StyleTypeJsonConverter), diff --git a/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs b/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs index 2b3c84f..2a87959 100644 --- a/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs @@ -201,474 +201,542 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::AI21.ConversationalRagFlowPublicFields? Type47 { get; set; } + public global::AI21.ConnectorsDataSources? Type47 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type48 { get; set; } + public global::System.Collections.Generic.IList? Type48 { get; set; } /// /// /// - public global::AI21.Message? Type49 { get; set; } + public global::AI21.DataSourceMetadata? Type49 { get; set; } /// /// /// - public global::AI21.MessageRole? Type50 { get; set; } + public global::AI21.ConnectorsToken? Type50 { get; set; } /// /// /// - public global::AI21.ConversationalRagFlowPublicFieldsRetrievalStrategy? Type51 { get; set; } + public global::AI21.ConversationalRagFlowPublicFields? Type51 { get; set; } /// /// /// - public global::AI21.ConversationalRagResult? Type52 { get; set; } + public global::System.Collections.Generic.IList? Type52 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type53 { get; set; } + public global::AI21.Message? Type53 { get; set; } /// /// /// - public global::AI21.ConversationalRagSource? Type54 { get; set; } + public global::AI21.MessageRole? Type54 { get; set; } /// /// /// - public global::AI21.Correction? Type55 { get; set; } + public global::AI21.ConversationalRagFlowPublicFieldsRetrievalStrategy? Type55 { get; set; } /// /// /// - public global::AI21.CorrectionType? Type56 { get; set; } + public global::AI21.ConversationalRagResult? Type56 { get; set; } /// /// /// - public global::AI21.CorrectionsBody? Type57 { get; set; } + public global::System.Collections.Generic.IList? Type57 { get; set; } /// /// /// - public global::AI21.CorrectionsResponse? Type58 { get; set; } + public global::AI21.ConversationalRagSource? Type58 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type59 { get; set; } + public global::AI21.Correction? Type59 { get; set; } /// /// /// - public global::AI21.CustomModelInput? Type60 { get; set; } + public global::AI21.CorrectionType? Type60 { get; set; } /// /// /// - public global::AI21.CustomModelType? Type61 { get; set; } + public global::AI21.CorrectionsBody? Type61 { get; set; } /// /// /// - public global::AI21.CustomModelUpdateBody? Type62 { get; set; } + public global::AI21.CorrectionsResponse? Type62 { get; set; } /// /// /// - public global::AI21.DocumentSchema? Type63 { get; set; } + public global::System.Collections.Generic.IList? Type63 { get; set; } /// /// /// - public global::AI21.DocumentSchemaMetadata? Type64 { get; set; } + public global::AI21.CreateMessageRequest? Type64 { get; set; } /// /// /// - public global::AI21.DocumentType? Type65 { get; set; } + public global::AI21.CreateMessageResponse? Type65 { get; set; } /// /// /// - public global::AI21.EmbedType? Type66 { get; set; } + public global::System.DateTime? Type66 { get; set; } /// /// /// - public global::AI21.EmbeddingsBody? Type67 { get; set; } + public global::AI21.CreateThreadRequest? Type67 { get; set; } /// /// /// - public global::System.AllOf? Type68 { get; set; } + public global::System.Collections.Generic.IList? Type68 { get; set; } /// /// /// - public global::AI21.FileDeleteResponse? Type69 { get; set; } + public global::AI21.ThreadMessage? Type69 { get; set; } /// /// /// - public global::AI21.FileResponse? Type70 { get; set; } + public global::AI21.CreateThreadResponse? Type70 { get; set; } /// /// /// - public global::System.DateTime? Type71 { get; set; } + public global::AI21.CustomModelInput? Type71 { get; set; } /// /// /// - public global::AI21.FileStatus? Type72 { get; set; } + public global::AI21.CustomModelType? Type72 { get; set; } /// /// /// - public global::AI21.FileUploadResponse? Type73 { get; set; } + public global::AI21.CustomModelUpdateBody? Type73 { get; set; } /// /// /// - public global::AI21.FilesUpdateRequest? Type74 { get; set; } + public global::AI21.DocumentSchema? Type74 { get; set; } /// /// /// - public global::AI21.FunctionToolDefinition? Type75 { get; set; } + public global::AI21.DocumentSchemaMetadata? Type75 { get; set; } /// /// /// - public global::AI21.ToolParameters? Type76 { get; set; } + public global::AI21.DocumentType? Type76 { get; set; } /// /// /// - public global::AI21.ToolParametersType? Type77 { get; set; } + public global::AI21.EmbedType? Type77 { get; set; } /// /// /// - public global::AI21.ToolParametersProperties? Type78 { get; set; } + public global::AI21.EmbeddingsBody? Type78 { get; set; } /// /// /// - public global::AI21.HTTPValidationError? Type79 { get; set; } + public global::System.AllOf? Type79 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type80 { get; set; } + public global::AI21.FileDeleteResponse? Type80 { get; set; } /// /// /// - public global::AI21.ValidationError? Type81 { get; set; } + public global::AI21.FileResponse? Type81 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type82 { get; set; } + public global::AI21.FileStatus? Type82 { get; set; } /// /// /// - public global::System.AnyOf? Type83 { get; set; } + public global::AI21.FileUploadResponse? Type83 { get; set; } /// /// /// - public global::AI21.Highlight? Type84 { get; set; } + public global::AI21.FilesUpdateRequest? Type84 { get; set; } /// /// /// - public global::AI21.LibraryAnswerRequest? Type85 { get; set; } + public global::AI21.FunctionToolDefinition? Type85 { get; set; } /// /// /// - public global::System.AllOf? Type86 { get; set; } + public global::AI21.ToolParameters? Type86 { get; set; } /// /// /// - public global::AI21.RetrievalStrategy3? Type87 { get; set; } + public global::AI21.ToolParametersType? Type87 { get; set; } /// /// /// - public global::AI21.LibraryAnswerResponse? Type88 { get; set; } + public global::AI21.ToolParametersProperties? Type88 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type89 { get; set; } + public global::AI21.GetThreadRunResponse? Type89 { get; set; } /// /// /// - public global::AI21.SourceDocument? Type90 { get; set; } + public global::AI21.RunStatus? Type90 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequest? Type91 { get; set; } + public global::AI21.RunOptimization? Type91 { get; set; } /// /// /// - public global::AI21.LibrarySearchResponse? Type92 { get; set; } + public global::AI21.HTTPValidationError? Type92 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type93 { get; set; } + public global::System.Collections.Generic.IList? Type93 { get; set; } /// /// /// - public global::AI21.LibrarySearchResult? Type94 { get; set; } + public global::AI21.ValidationError? Type94 { get; set; } /// /// /// - public global::AI21.MockResponseConfig? Type95 { get; set; } + public global::System.Collections.Generic.IList>? Type95 { get; set; } /// /// /// - public global::AI21.ModelName? Type96 { get; set; } + public global::System.AnyOf? Type96 { get; set; } /// /// /// - public global::AI21.ParaphraseBody? Type97 { get; set; } + public global::AI21.Highlight? Type97 { get; set; } /// /// /// - public global::System.AllOf? Type98 { get; set; } + public global::AI21.LibraryAnswerRequest? Type98 { get; set; } /// /// /// - public global::AI21.StyleType? Type99 { get; set; } + public global::AI21.LibraryAnswerRequestLabelsFilterMode? Type99 { get; set; } /// /// /// - public global::AI21.ResponseFormat? Type100 { get; set; } + public global::System.AllOf? Type100 { get; set; } /// /// /// - public global::AI21.ResponseFormatType? Type101 { get; set; } + public global::AI21.RetrievalStrategy3? Type101 { get; set; } /// /// /// - public global::AI21.Segment? Type102 { get; set; } + public global::AI21.LibraryAnswerResponse? Type102 { get; set; } /// /// /// - public global::AI21.SegmentSummary? Type103 { get; set; } + public global::System.Collections.Generic.IList? Type103 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type104 { get; set; } + public global::AI21.SourceDocument? Type104 { get; set; } /// /// /// - public global::AI21.SegmentationBody? Type105 { get; set; } + public global::AI21.LibrarySearchRequest? Type105 { get; set; } /// /// /// - public global::AI21.SegmentationResponse? Type106 { get; set; } + public global::AI21.LibrarySearchRequestLabelsFilterMode? Type106 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type107 { get; set; } + public global::AI21.LibrarySearchResponse? Type107 { get; set; } /// /// /// - public global::AI21.SegmentedSummaryBody? Type108 { get; set; } + public global::System.Collections.Generic.IList? Type108 { get; set; } /// /// /// - public global::AI21.SummarizationResponse? Type109 { get; set; } + public global::AI21.LibrarySearchResult? Type109 { get; set; } /// /// /// - public global::AI21.SummarizeBody? Type110 { get; set; } + public global::AI21.MockResponseConfig? Type110 { get; set; } /// /// /// - public global::AI21.SummaryMethod? Type111 { get; set; } + public global::AI21.ModelName? Type111 { get; set; } /// /// /// - public global::AI21.SummarizeBySegmentResponse? Type112 { get; set; } + public global::AI21.ParaphraseBody? Type112 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type113 { get; set; } + public global::System.AllOf? Type113 { get; set; } /// /// /// - public global::AI21.SystemMessage? Type114 { get; set; } + public global::AI21.StyleType? Type114 { get; set; } /// /// /// - public global::AI21.SystemMessageRole? Type115 { get; set; } + public global::AI21.PostThreadRunRequest? Type115 { get; set; } /// /// /// - public global::AI21.TokenizeBody? Type116 { get; set; } + public global::AI21.PostThreadRunResponse? Type116 { get; set; } /// /// /// - public global::AI21.ToolDefinition? Type117 { get; set; } + public global::AI21.ResponseFormat? Type117 { get; set; } /// /// /// - public global::AI21.ToolDefinitionType? Type118 { get; set; } + public global::AI21.ResponseFormatType? Type118 { get; set; } /// /// /// - public global::AI21.ToolMessage? Type119 { get; set; } + public global::AI21.Segment? Type119 { get; set; } /// /// /// - public global::AI21.ToolMessageRole? Type120 { get; set; } + public global::AI21.SegmentSummary? Type120 { get; set; } /// /// /// - public global::AI21.UserMessage? Type121 { get; set; } + public global::System.Collections.Generic.IList? Type121 { get; set; } /// /// /// - public global::AI21.UserMessageRole? Type122 { get; set; } + public global::AI21.SegmentationBody? Type122 { get; set; } /// /// /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequest? Type123 { get; set; } + public global::AI21.SegmentationResponse? Type123 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type124 { get; set; } + public global::System.Collections.Generic.IList? Type124 { get; set; } /// /// /// - public global::System.OneOf? Type125 { get; set; } + public global::AI21.SegmentedSummaryBody? Type125 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type126 { get; set; } + public global::AI21.SummarizationResponse? Type126 { get; set; } /// /// /// - public global::System.AnyOf>? Type127 { get; set; } + public global::AI21.SummarizeBody? Type127 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type128 { get; set; } + public global::AI21.SummaryMethod? Type128 { get; set; } /// /// /// - public global::System.AllOf? Type129 { get; set; } + public global::AI21.SummarizeBySegmentResponse? Type129 { get; set; } /// /// /// - public global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest? Type130 { get; set; } + public global::System.Collections.Generic.IList? Type130 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type131 { get; set; } + public global::AI21.SystemMessage? Type131 { get; set; } /// /// /// - public global::AI21.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse? Type132 { get; set; } + public global::AI21.SystemMessageRole? Type132 { get; set; } /// /// /// - public global::System.AnyOf>? Type133 { get; set; } + public global::AI21.TokenizeBody? Type133 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type134 { get; set; } + public global::AI21.ToolDefinition? Type134 { get; set; } /// /// /// - public global::AI21.V1J2LightCompleteResponse? Type135 { get; set; } + public global::AI21.ToolDefinitionType? Type135 { get; set; } /// /// /// - public global::AI21.V1J2LightCustomModelCompleteResponse? Type136 { get; set; } + public global::AI21.ToolMessage? Type136 { get; set; } /// /// /// - public global::AI21.V1J2MidCompleteResponse? Type137 { get; set; } + public global::AI21.ToolMessageRole? Type137 { get; set; } /// /// /// - public global::AI21.V1J2MidCustomModelCompleteResponse? Type138 { get; set; } + public global::AI21.UserMessage? Type138 { get; set; } /// /// /// - public global::AI21.V1J2UltraCompleteResponse? Type139 { get; set; } + public global::AI21.UserMessageRole? Type139 { get; set; } /// /// /// - public global::AI21.V1J2UltraCompleteResponse2? Type140 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesChatChatRequest? Type140 { get; set; } /// /// /// - public global::AI21.V1J2LargeCompleteResponse? Type141 { get; set; } + public global::System.Collections.Generic.IList>? Type141 { get; set; } /// /// /// - public global::AI21.V1J2LargeInstructCompleteResponse? Type142 { get; set; } + public global::System.OneOf? Type142 { get; set; } /// /// /// - public global::AI21.V1J2GrandeCompleteResponse? Type143 { get; set; } + public global::System.Collections.Generic.IList? Type143 { get; set; } /// /// /// - public global::AI21.V1J2GrandeInstructCompleteResponse? Type144 { get; set; } + public global::System.AnyOf>? Type144 { get; set; } /// /// /// - public global::AI21.V1J2JumboCompleteResponse? Type145 { get; set; } + public global::System.Collections.Generic.IList? Type145 { get; set; } /// /// /// - public global::AI21.V1J2JumboInstructCompleteResponse? Type146 { get; set; } + public global::System.AllOf? Type146 { get; set; } /// /// /// - public global::AI21.V1J2LargeCustomModelCompleteResponse? Type147 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest? Type147 { get; set; } /// /// /// - public global::AI21.V1J2GrandeCustomModelCompleteResponse? Type148 { get; set; } + public global::System.Collections.Generic.IList? Type148 { get; set; } /// /// /// - public global::AI21.V1J2JumboCompleteResponse2? Type149 { get; set; } + public global::AI21.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse? Type149 { get; set; } /// /// /// - public global::AI21.V1GetCustomModelsResponse? Type150 { get; set; } + public global::System.AnyOf>? Type150 { get; set; } /// /// /// - public global::AI21.V1CreateCustomModelResponse? Type151 { get; set; } + public global::System.Collections.Generic.IList? Type151 { get; set; } /// /// /// - public global::AI21.V1GetCustomModelResponse? Type152 { get; set; } + public global::AI21.V1J2LightCompleteResponse? Type152 { get; set; } /// /// /// - public global::AI21.V1UpdateCustomModelResponse? Type153 { get; set; } + public global::AI21.V1J2LightCustomModelCompleteResponse? Type153 { get; set; } /// /// /// - public global::AI21.V1GetDatasetsResponse? Type154 { get; set; } + public global::AI21.V1J2MidCompleteResponse? Type154 { get; set; } /// /// /// - public global::AI21.V1UploadDatasetResponse? Type155 { get; set; } + public global::AI21.V1J2MidCustomModelCompleteResponse? Type155 { get; set; } /// /// /// - public global::AI21.V1GetDatasetResponse? Type156 { get; set; } + public global::AI21.V1J2UltraCompleteResponse? Type156 { get; set; } /// /// /// - public global::AI21.V1DeleteDatasetResponse? Type157 { get; set; } + public global::AI21.V1J2UltraCompleteResponse2? Type157 { get; set; } /// /// /// - public global::AI21.V1GetDatasetDownloadUrlResponse? Type158 { get; set; } + public global::AI21.V1J2LargeCompleteResponse? Type158 { get; set; } /// /// /// - public global::AI21.V1ParaphrazeResponse? Type159 { get; set; } + public global::AI21.V1J2LargeInstructCompleteResponse? Type159 { get; set; } /// /// /// - public global::AI21.V1EmbedResponse? Type160 { get; set; } + public global::AI21.V1J2GrandeCompleteResponse? Type160 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type161 { get; set; } + public global::AI21.V1J2GrandeInstructCompleteResponse? Type161 { get; set; } /// /// /// - public global::AI21.V1LibraryManagementResponse? Type162 { get; set; } + public global::AI21.V1J2JumboCompleteResponse? Type162 { get; set; } /// /// /// - public global::AI21.V1AnswerResponse? Type163 { get; set; } + public global::AI21.V1J2JumboInstructCompleteResponse? Type163 { get; set; } /// /// /// - public global::AI21.V1TokenizeResponse? Type164 { get; set; } + public global::AI21.V1J2LargeCustomModelCompleteResponse? Type164 { get; set; } + /// + /// + /// + public global::AI21.V1J2GrandeCustomModelCompleteResponse? Type165 { get; set; } + /// + /// + /// + public global::AI21.V1J2JumboCompleteResponse2? Type166 { get; set; } + /// + /// + /// + public global::AI21.V1GetCustomModelsResponse? Type167 { get; set; } + /// + /// + /// + public global::AI21.V1CreateCustomModelResponse? Type168 { get; set; } + /// + /// + /// + public global::AI21.V1GetCustomModelResponse? Type169 { get; set; } + /// + /// + /// + public global::AI21.V1UpdateCustomModelResponse? Type170 { get; set; } + /// + /// + /// + public global::AI21.V1GetDatasetsResponse? Type171 { get; set; } + /// + /// + /// + public global::AI21.V1UploadDatasetResponse? Type172 { get; set; } + /// + /// + /// + public global::AI21.V1GetDatasetResponse? Type173 { get; set; } + /// + /// + /// + public global::AI21.V1DeleteDatasetResponse? Type174 { get; set; } + /// + /// + /// + public global::AI21.V1GetDatasetDownloadUrlResponse? Type175 { get; set; } + /// + /// + /// + public global::AI21.V1ParaphrazeResponse? Type176 { get; set; } + /// + /// + /// + public global::AI21.V1EmbedResponse? Type177 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type178 { get; set; } + /// + /// + /// + public global::AI21.V1LibraryManagementResponse? Type179 { get; set; } + /// + /// + /// + public global::AI21.V1AnswerResponse? Type180 { get; set; } + /// + /// + /// + public global::AI21.V1TokenizeResponse? Type181 { get; set; } } } \ No newline at end of file diff --git a/src/libs/AI21/openapi.yaml b/src/libs/AI21/openapi.yaml index 449ed37..5722925 100644 --- a/src/libs/AI21/openapi.yaml +++ b/src/libs/AI21/openapi.yaml @@ -1254,6 +1254,54 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/connectors/connected-users/{user_id}/tokens': + post: + summary: Get User Token + operationId: get_user_token_studio_v1_connectors_connected_users__user_id__tokens_post + parameters: + - name: user_id + in: path + required: true + schema: + title: User Id + type: string + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorsToken' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/connectors/connected-users/{user_id}/data-sources': + get: + summary: Get User Data Sources Info + operationId: get_user_data_sources_info_studio_v1_connectors_connected_users__user_id__data_sources_get + parameters: + - name: user_id + in: path + required: true + schema: + title: User Id + type: string + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorsDataSources' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' /studio/v1/tokenize: post: tags: @@ -1278,6 +1326,123 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/assistant/threads: + post: + summary: Create Thread + operationId: create_thread_studio_v1_assistant_threads_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateThreadRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/CreateThreadResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/assistant/threads/{thread_id}/messages': + post: + summary: Create Message + operationId: create_message_studio_v1_assistant_threads__thread_id__messages_post + parameters: + - name: thread_id + in: path + required: true + schema: + title: Thread Id + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateMessageRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/CreateMessageResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/assistant/threads/{thread_id}/runs': + post: + summary: Post Thread Run + operationId: post_thread_run_studio_v1_assistant_threads__thread_id__runs_post + parameters: + - name: thread_id + in: path + required: true + schema: + title: Thread Id + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PostThreadRunRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/PostThreadRunResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/assistant/threads/{thread_id}/runs/{run_id}': + get: + summary: Get Thread Run Result + operationId: get_thread_run_result_studio_v1_assistant_threads__thread_id__runs__run_id__get + parameters: + - name: thread_id + in: path + required: true + schema: + title: Thread Id + type: string + format: uuid + - name: run_id + in: path + required: true + schema: + title: Run Id + type: string + format: uuid + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/GetThreadRunResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' components: schemas: AnswerBody: @@ -1625,6 +1790,26 @@ components: epoch: title: Epoch type: integer + ConnectorsDataSources: + title: ConnectorsDataSources + required: + - data_sources + type: object + properties: + data_sources: + title: Data Sources + type: array + items: + $ref: '#/components/schemas/DataSourceMetadata' + ConnectorsToken: + title: ConnectorsToken + required: + - token + type: object + properties: + token: + title: Token + type: string ConversationalRagFlowPublicFields: title: ConversationalRagFlowPublicFields required: @@ -1802,6 +1987,89 @@ components: type: array items: $ref: '#/components/schemas/Correction' + CreateMessageRequest: + title: CreateMessageRequest + required: + - role + - content + type: object + properties: + role: + title: Role + type: string + description: "The role of an individual message.\n- `user`: Input provided by the user. Any instructions given here that conflict\n with instructions given in the `system` prompt take precedence over the `system`\n prompt instructions.\n- `assistant`: Response generated by the model.\n- `system`: Initial instructions provided to the system to provide general guidance\n on the tone and voice of the generated message. An initial system message is\n optional but recommended to provide guidance on the tone of the chat. For\n example, \"You are a helpful chatbot with a background in earth sciences and a\n charming French accent.\"\n" + content: + title: Content + type: string + CreateMessageResponse: + title: CreateMessageResponse + required: + - role + - content + - id + - created_at + - updated_at + - object + type: object + properties: + role: + title: Role + type: string + description: "The role of an individual message.\n- `user`: Input provided by the user. Any instructions given here that conflict\n with instructions given in the `system` prompt take precedence over the `system`\n prompt instructions.\n- `assistant`: Response generated by the model.\n- `system`: Initial instructions provided to the system to provide general guidance\n on the tone and voice of the generated message. An initial system message is\n optional but recommended to provide guidance on the tone of the chat. For\n example, \"You are a helpful chatbot with a background in earth sciences and a\n charming French accent.\"\n" + content: + title: Content + type: string + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + format: uuid + created_at: + title: Created At + type: string + format: date-time + updated_at: + title: Updated At + type: string + format: date-time + object: + title: Object + type: string + CreateThreadRequest: + title: CreateThreadRequest + type: object + properties: + messages: + title: Messages + type: array + items: + $ref: '#/components/schemas/ThreadMessage' + description: messages + CreateThreadResponse: + title: CreateThreadResponse + required: + - id + - created_at + - updated_at + - object + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + format: uuid + created_at: + title: Created At + type: string + format: date-time + updated_at: + title: Updated At + type: string + format: date-time + object: + title: Object + type: string CustomModelInput: title: CustomModelInput required: @@ -1841,6 +2109,31 @@ components: defaultEpoch: title: Defaultepoch type: integer + DataSourceMetadata: + title: DataSourceMetadata + required: + - name + - type + - description + - icon + - connected + type: object + properties: + name: + title: Name + type: string + type: + title: Type + type: string + description: + title: Description + type: string + icon: + title: Icon + type: string + connected: + title: Connected + type: boolean DocumentSchema: title: DocumentSchema required: @@ -2035,6 +2328,51 @@ components: type: string parameters: $ref: '#/components/schemas/ToolParameters' + GetThreadRunResponse: + title: GetThreadRunResponse + required: + - thread_id + - assistant_id + - description + - status + - optimization + - id + - created_at + - updated_at + - object + type: object + properties: + thread_id: + title: Thread Id + type: string + format: uuid + assistant_id: + title: Assistant Id + type: string + format: uuid + description: + title: Description + type: string + status: + $ref: '#/components/schemas/RunStatus' + optimization: + $ref: '#/components/schemas/RunOptimization' + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + format: uuid + created_at: + title: Created At + type: string + format: date-time + updated_at: + title: Updated At + type: string + format: date-time + object: + title: Object + type: string HTTPValidationError: title: HTTPValidationError type: object @@ -2081,6 +2419,13 @@ components: type: array items: type: string + labels_filter_mode: + title: Labels Filter Mode + enum: + - AND + - OR + type: string + default: AND fileIds: title: Fileids type: array @@ -2148,6 +2493,13 @@ components: type: array items: type: string + labels_filter_mode: + title: Labels Filter Mode + enum: + - AND + - OR + type: string + default: AND fileIds: title: Fileids type: array @@ -2346,6 +2698,67 @@ components: title: Applytoemojis type: boolean default: true + PostThreadRunRequest: + title: PostThreadRunRequest + required: + - assistant_id + - description + - optimization + type: object + properties: + assistant_id: + title: Assistant Id + type: string + description: + title: Description + type: string + optimization: + $ref: '#/components/schemas/RunOptimization' + PostThreadRunResponse: + title: PostThreadRunResponse + required: + - thread_id + - assistant_id + - description + - status + - optimization + - id + - created_at + - updated_at + - object + type: object + properties: + thread_id: + title: Thread Id + type: string + format: uuid + assistant_id: + title: Assistant Id + type: string + format: uuid + description: + title: Description + type: string + status: + $ref: '#/components/schemas/RunStatus' + optimization: + $ref: '#/components/schemas/RunOptimization' + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + format: uuid + created_at: + title: Created At + type: string + format: date-time + updated_at: + title: Updated At + type: string + format: date-time + object: + title: Object + type: string ResponseFormat: title: ResponseFormat required: @@ -2373,6 +2786,25 @@ components: - assistant type: string description: An enumeration. + RunOptimization: + title: RunOptimization + enum: + - cost + - latency + description: An enumeration. + RunStatus: + title: RunStatus + enum: + - cancelled + - cancelling + - completed + - expired + - failed + - incomplete + - in_progress + - queued + - requires_action + description: An enumeration. Segment: title: Segment required: @@ -2567,6 +2999,20 @@ components: content: title: Content type: string + ThreadMessage: + title: ThreadMessage + required: + - role + - content + type: object + properties: + role: + title: Role + type: string + description: "The role of an individual message.\n- `user`: Input provided by the user. Any instructions given here that conflict\n with instructions given in the `system` prompt take precedence over the `system`\n prompt instructions.\n- `assistant`: Response generated by the model.\n- `system`: Initial instructions provided to the system to provide general guidance\n on the tone and voice of the generated message. An initial system message is\n optional but recommended to provide guidance on the tone of the chat. For\n example, \"You are a helpful chatbot with a background in earth sciences and a\n charming French accent.\"\n" + content: + title: Content + type: string TokenizeBody: title: TokenizeBody required: