From 2611de22dfed643a2cc2c92575d081d6fec4be36 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Nov 2024 18:28:32 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...umentFileStudioV1ChatFilesConvertPost.g.cs | 10 +++----- ...onnectedUsersOrganizationIdTokensPost.g.cs | 6 ++--- ...ationIdDataSourcesDataSourceStatusGet.g.cs | 6 ++--- ...ctedUsersOrganizationIdDataSourcesGet.g.cs | 6 ++--- .../AI21.Ai21Api.V1ConversationalRag.g.cs | 6 ++--- .../AI21.ChatClient.V1J2UltraChat.g.cs | 6 ++--- ...1.CompletionClient.V1J2GrandeComplete.g.cs | 10 +++----- ...nClient.V1J2GrandeCustomModelComplete.g.cs | 10 +++----- ...tionClient.V1J2GrandeInstructComplete.g.cs | 10 +++----- ...21.CompletionClient.V1J2JumboComplete.g.cs | 10 +++----- ...1.CompletionClient.V1J2JumboComplete2.g.cs | 10 +++----- ...etionClient.V1J2JumboInstructComplete.g.cs | 10 +++----- ...21.CompletionClient.V1J2LargeComplete.g.cs | 10 +++----- ...onClient.V1J2LargeCustomModelComplete.g.cs | 10 +++----- ...etionClient.V1J2LargeInstructComplete.g.cs | 10 +++----- ...21.CompletionClient.V1J2LightComplete.g.cs | 10 +++----- ...onClient.V1J2LightCustomModelComplete.g.cs | 10 +++----- ...AI21.CompletionClient.V1J2MidComplete.g.cs | 10 +++----- ...tionClient.V1J2MidCustomModelComplete.g.cs | 10 +++----- ...21.CompletionClient.V1J2UltraComplete.g.cs | 10 +++----- ...1.CompletionClient.V1J2UltraComplete2.g.cs | 10 +++----- ...ustomModelsClient.V1CreateCustomModel.g.cs | 10 +++----- ...ustomModelsClient.V1DeleteCustomModel.g.cs | 10 +++----- ...1.CustomModelsClient.V1GetCustomModel.g.cs | 10 +++----- ....CustomModelsClient.V1GetCustomModels.g.cs | 10 +++----- ...ustomModelsClient.V1UpdateCustomModel.g.cs | 10 +++----- ...21.JambaCompleteClient.V1ChatComplete.g.cs | 6 ++--- ...braryManagementClient.V1LibraryDelete.g.cs | 10 +++----- ...yManagementClient.V1LibraryManagement.g.cs | 6 ++--- ...ManagementClient.V1LibraryManagement2.g.cs | 6 ++--- ...ManagementClient.V1LibraryManagement3.g.cs | 10 +++----- ...braryManagementClient.V1LibraryUpload.g.cs | 10 +++----- ...els.ChatCompletionResponseDeltaChoice.g.cs | 2 +- ...udioApiServerDataTypesChatChatRequest.g.cs | 2 +- .../AI21.ParaphraseClient.V1Paraphraze.g.cs | 10 +++----- ...1.RAGEngineClient.V1LibraryManagement.g.cs | 10 +++----- .../AI21.RAGEngineClient.V1LibrarySearch.g.cs | 10 +++----- ...I21.SegmentationClient.V1Segmentation.g.cs | 6 ++--- .../AI21.SummarizeClient.V1Summarize.g.cs | 6 ++--- ....SummarizeClient.V1SummarizeBySegment.g.cs | 6 ++--- .../JsonConverters.AnyOfFactory2.g.cs | 25 ------------------- .../AI21/Generated/JsonSerializerContext.g.cs | 5 +++- 42 files changed, 109 insertions(+), 261 deletions(-) delete mode 100644 src/libs/AI21/Generated/JsonConverters.AnyOfFactory2.g.cs diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.cs index 6234203..fcdfd6b 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.cs @@ -165,7 +165,7 @@ partial void ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponseConte }; } - return __content; + return __content; } else { @@ -187,13 +187,9 @@ partial void ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponseConte }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.GenerateOrgTokenStudioV1ConnectorsConnectedUsersOrganizationIdTokensPost.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.GenerateOrgTokenStudioV1ConnectorsConnectedUsersOrganizationIdTokensPost.g.cs index 1b6d0b5..0549c7f 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.GenerateOrgTokenStudioV1ConnectorsConnectedUsersOrganizationIdTokensPost.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.GenerateOrgTokenStudioV1ConnectorsConnectedUsersOrganizationIdTokensPost.g.cs @@ -176,12 +176,10 @@ partial void ProcessGenerateOrgTokenStudioV1ConnectorsConnectedUsersOrganization }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.ConnectorsToken.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.ConnectorsToken.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.GetDataSourceStatusStudioV1ConnectorsConnectedUsersOrganizationIdDataSourcesDataSourceStatusGet.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.GetDataSourceStatusStudioV1ConnectorsConnectedUsersOrganizationIdDataSourcesDataSourceStatusGet.g.cs index 5200bd8..b3d0b32 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.GetDataSourceStatusStudioV1ConnectorsConnectedUsersOrganizationIdDataSourcesDataSourceStatusGet.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.GetDataSourceStatusStudioV1ConnectorsConnectedUsersOrganizationIdDataSourcesDataSourceStatusGet.g.cs @@ -182,12 +182,10 @@ partial void ProcessGetDataSourceStatusStudioV1ConnectorsConnectedUsersOrganizat }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.ConnectorsStatus.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.ConnectorsStatus.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.GetOrgDataSourcesInfoStudioV1ConnectorsConnectedUsersOrganizationIdDataSourcesGet.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.GetOrgDataSourcesInfoStudioV1ConnectorsConnectedUsersOrganizationIdDataSourcesGet.g.cs index ac6ce84..a2d2042 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.GetOrgDataSourcesInfoStudioV1ConnectorsConnectedUsersOrganizationIdDataSourcesGet.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.GetOrgDataSourcesInfoStudioV1ConnectorsConnectedUsersOrganizationIdDataSourcesGet.g.cs @@ -176,12 +176,10 @@ partial void ProcessGetOrgDataSourcesInfoStudioV1ConnectorsConnectedUsersOrganiz }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.ConnectorsDataSources.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.ConnectorsDataSources.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs index e2da186..eae606d 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs @@ -184,12 +184,10 @@ partial void ProcessV1ConversationalRagResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.ConversationalRagResult.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.ConversationalRagResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.ChatClient.V1J2UltraChat.g.cs b/src/libs/AI21/Generated/AI21.ChatClient.V1J2UltraChat.g.cs index 87342a3..2f10cd5 100644 --- a/src/libs/AI21/Generated/AI21.ChatClient.V1J2UltraChat.g.cs +++ b/src/libs/AI21/Generated/AI21.ChatClient.V1J2UltraChat.g.cs @@ -193,12 +193,10 @@ partial void ProcessV1J2UltraChatResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.ChatResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.ChatResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeComplete.g.cs index 3795fa0..41b10dc 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeComplete.g.cs @@ -169,7 +169,7 @@ partial void ProcessV1J2GrandeCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -191,13 +191,9 @@ partial void ProcessV1J2GrandeCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeCustomModelComplete.g.cs index 9ecab81..7924e82 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeCustomModelComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeCustomModelComplete.g.cs @@ -175,7 +175,7 @@ partial void ProcessV1J2GrandeCustomModelCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -197,13 +197,9 @@ partial void ProcessV1J2GrandeCustomModelCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeInstructComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeInstructComplete.g.cs index 9ba04cd..2119115 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeInstructComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeInstructComplete.g.cs @@ -169,7 +169,7 @@ partial void ProcessV1J2GrandeInstructCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -191,13 +191,9 @@ partial void ProcessV1J2GrandeInstructCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs index cd716b2..4bcaa9f 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs @@ -169,7 +169,7 @@ partial void ProcessV1J2JumboCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -191,13 +191,9 @@ partial void ProcessV1J2JumboCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete2.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete2.g.cs index 06fec88..4cd1d10 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete2.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete2.g.cs @@ -175,7 +175,7 @@ partial void ProcessV1J2JumboComplete2ResponseContent( }; } - return __content; + return __content; } else { @@ -197,13 +197,9 @@ partial void ProcessV1J2JumboComplete2ResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboInstructComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboInstructComplete.g.cs index a311432..1307397 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboInstructComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboInstructComplete.g.cs @@ -169,7 +169,7 @@ partial void ProcessV1J2JumboInstructCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -191,13 +191,9 @@ partial void ProcessV1J2JumboInstructCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeComplete.g.cs index d62f696..7711396 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeComplete.g.cs @@ -169,7 +169,7 @@ partial void ProcessV1J2LargeCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -191,13 +191,9 @@ partial void ProcessV1J2LargeCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeCustomModelComplete.g.cs index e88f48f..8368608 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeCustomModelComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeCustomModelComplete.g.cs @@ -175,7 +175,7 @@ partial void ProcessV1J2LargeCustomModelCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -197,13 +197,9 @@ partial void ProcessV1J2LargeCustomModelCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeInstructComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeInstructComplete.g.cs index e27daa5..4f0f4bd 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeInstructComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeInstructComplete.g.cs @@ -169,7 +169,7 @@ partial void ProcessV1J2LargeInstructCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -191,13 +191,9 @@ partial void ProcessV1J2LargeInstructCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightComplete.g.cs index 42842a3..3dbffaa 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightComplete.g.cs @@ -169,7 +169,7 @@ partial void ProcessV1J2LightCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -191,13 +191,9 @@ partial void ProcessV1J2LightCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightCustomModelComplete.g.cs index b00c57b..cf20635 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightCustomModelComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightCustomModelComplete.g.cs @@ -175,7 +175,7 @@ partial void ProcessV1J2LightCustomModelCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -197,13 +197,9 @@ partial void ProcessV1J2LightCustomModelCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidComplete.g.cs index 10d6af8..667d110 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidComplete.g.cs @@ -169,7 +169,7 @@ partial void ProcessV1J2MidCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -191,13 +191,9 @@ partial void ProcessV1J2MidCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidCustomModelComplete.g.cs index 82f159b..798d9aa 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidCustomModelComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidCustomModelComplete.g.cs @@ -175,7 +175,7 @@ partial void ProcessV1J2MidCustomModelCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -197,13 +197,9 @@ partial void ProcessV1J2MidCustomModelCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs index 3cb1524..7b03a08 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs @@ -169,7 +169,7 @@ partial void ProcessV1J2UltraCompleteResponseContent( }; } - return __content; + return __content; } else { @@ -191,13 +191,9 @@ partial void ProcessV1J2UltraCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete2.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete2.g.cs index c1f73b4..0256ef7 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete2.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete2.g.cs @@ -175,7 +175,7 @@ partial void ProcessV1J2UltraComplete2ResponseContent( }; } - return __content; + return __content; } else { @@ -197,13 +197,9 @@ partial void ProcessV1J2UltraComplete2ResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1CreateCustomModel.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1CreateCustomModel.g.cs index 412bd1b..5162c00 100644 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1CreateCustomModel.g.cs +++ b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1CreateCustomModel.g.cs @@ -160,7 +160,7 @@ partial void ProcessV1CreateCustomModelResponseContent( }; } - return __content; + return __content; } else { @@ -182,13 +182,9 @@ partial void ProcessV1CreateCustomModelResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1DeleteCustomModel.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1DeleteCustomModel.g.cs index 68f916a..3c9d456 100644 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1DeleteCustomModel.g.cs +++ b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1DeleteCustomModel.g.cs @@ -152,7 +152,7 @@ partial void ProcessV1DeleteCustomModelResponseContent( }; } - return __content; + return __content; } else { @@ -174,13 +174,9 @@ partial void ProcessV1DeleteCustomModelResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } } diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModel.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModel.g.cs index 97d0d71..fa414a6 100644 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModel.g.cs +++ b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModel.g.cs @@ -152,7 +152,7 @@ partial void ProcessV1GetCustomModelResponseContent( }; } - return __content; + return __content; } else { @@ -174,13 +174,9 @@ partial void ProcessV1GetCustomModelResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } } diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModels.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModels.g.cs index 41c746e..ac3c8a6 100644 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModels.g.cs +++ b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModels.g.cs @@ -155,7 +155,7 @@ partial void ProcessV1GetCustomModelsResponseContent( }; } - return __content; + return __content; } else { @@ -177,13 +177,9 @@ partial void ProcessV1GetCustomModelsResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } } diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1UpdateCustomModel.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1UpdateCustomModel.g.cs index 49bbf95..9e84cd8 100644 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1UpdateCustomModel.g.cs +++ b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1UpdateCustomModel.g.cs @@ -166,7 +166,7 @@ partial void ProcessV1UpdateCustomModelResponseContent( }; } - return __content; + return __content; } else { @@ -188,13 +188,9 @@ partial void ProcessV1UpdateCustomModelResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs b/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs index 4aab6f2..aff4628 100644 --- a/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs @@ -198,12 +198,10 @@ partial void ProcessV1ChatCompleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.AnyOf>.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.AnyOf>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryDelete.g.cs b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryDelete.g.cs index 93160ea..c6a7909 100644 --- a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryDelete.g.cs +++ b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryDelete.g.cs @@ -155,7 +155,7 @@ partial void ProcessV1LibraryDeleteResponseContent( }; } - return __content; + return __content; } else { @@ -177,13 +177,9 @@ partial void ProcessV1LibraryDeleteResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } } diff --git a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement.g.cs b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement.g.cs index 6466a8f..1511000 100644 --- a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement.g.cs +++ b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement.g.cs @@ -218,12 +218,10 @@ partial void ProcessV1LibraryManagementResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList; + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement2.g.cs b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement2.g.cs index fc13eea..0c18c21 100644 --- a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement2.g.cs +++ b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement2.g.cs @@ -184,12 +184,10 @@ partial void ProcessV1LibraryManagement2ResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.FileResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.FileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement3.g.cs b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement3.g.cs index e7bcf1b..d02e691 100644 --- a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement3.g.cs +++ b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryManagement3.g.cs @@ -174,7 +174,7 @@ partial void ProcessV1LibraryManagement3ResponseContent( }; } - return __content; + return __content; } else { @@ -196,13 +196,9 @@ partial void ProcessV1LibraryManagement3ResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryUpload.g.cs b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryUpload.g.cs index b63e3d3..9a3f2b0 100644 --- a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryUpload.g.cs +++ b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryUpload.g.cs @@ -196,7 +196,7 @@ partial void ProcessV1LibraryUploadResponseContent( }; } - return __content; + return __content; } else { @@ -218,13 +218,9 @@ partial void ProcessV1LibraryUploadResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.Models.ChatCompletionResponseDeltaChoice.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatCompletionResponseDeltaChoice.g.cs index c224d0e..bd5422d 100644 --- a/src/libs/AI21/Generated/AI21.Models.ChatCompletionResponseDeltaChoice.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ChatCompletionResponseDeltaChoice.g.cs @@ -22,7 +22,7 @@ public sealed partial class ChatCompletionResponseDeltaChoice /// - **Subsequent messages** will have an object `{"content": __token__}` with the generated token. /// [global::System.Text.Json.Serialization.JsonPropertyName("delta")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.AnyOfJsonConverterFactory2))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.AnyOfJsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] public required global::AI21.AnyOf Delta { get; set; } diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.cs index ba4ba2c..4aacce5 100644 --- a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.cs @@ -59,7 +59,7 @@ public sealed partial class LanguageStudioApiServerDataTypesChatChatRequest /// /// [global::System.Text.Json.Serialization.JsonPropertyName("stop")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.AnyOfJsonConverterFactory2))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.AnyOfJsonConverter>))] public global::AI21.AnyOf>? Stop { get; set; } /// diff --git a/src/libs/AI21/Generated/AI21.ParaphraseClient.V1Paraphraze.g.cs b/src/libs/AI21/Generated/AI21.ParaphraseClient.V1Paraphraze.g.cs index 2bb0367..0e9104d 100644 --- a/src/libs/AI21/Generated/AI21.ParaphraseClient.V1Paraphraze.g.cs +++ b/src/libs/AI21/Generated/AI21.ParaphraseClient.V1Paraphraze.g.cs @@ -160,7 +160,7 @@ partial void ProcessV1ParaphrazeResponseContent( }; } - return __content; + return __content; } else { @@ -182,13 +182,9 @@ partial void ProcessV1ParaphrazeResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryManagement.g.cs b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryManagement.g.cs index e252fe0..a2a473f 100644 --- a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryManagement.g.cs +++ b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryManagement.g.cs @@ -152,7 +152,7 @@ partial void ProcessV1LibraryManagementResponseContent( }; } - return __content; + return __content; } else { @@ -174,13 +174,9 @@ partial void ProcessV1LibraryManagementResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } } diff --git a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs index 1a54cf2..67c6c4c 100644 --- a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs +++ b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs @@ -160,7 +160,7 @@ partial void ProcessV1LibrarySearchResponseContent( }; } - return __content; + return __content; } else { @@ -182,13 +182,9 @@ partial void ProcessV1LibrarySearchResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); + return __content; } } diff --git a/src/libs/AI21/Generated/AI21.SegmentationClient.V1Segmentation.g.cs b/src/libs/AI21/Generated/AI21.SegmentationClient.V1Segmentation.g.cs index 50b2c40..1681121 100644 --- a/src/libs/AI21/Generated/AI21.SegmentationClient.V1Segmentation.g.cs +++ b/src/libs/AI21/Generated/AI21.SegmentationClient.V1Segmentation.g.cs @@ -184,12 +184,10 @@ partial void ProcessV1SegmentationResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.SegmentationResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.SegmentationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.SummarizeClient.V1Summarize.g.cs b/src/libs/AI21/Generated/AI21.SummarizeClient.V1Summarize.g.cs index f753fb9..1ecc8a0 100644 --- a/src/libs/AI21/Generated/AI21.SummarizeClient.V1Summarize.g.cs +++ b/src/libs/AI21/Generated/AI21.SummarizeClient.V1Summarize.g.cs @@ -184,12 +184,10 @@ partial void ProcessV1SummarizeResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.SummarizationResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.SummarizationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/AI21.SummarizeClient.V1SummarizeBySegment.g.cs b/src/libs/AI21/Generated/AI21.SummarizeClient.V1SummarizeBySegment.g.cs index 0608df4..5dc373c 100644 --- a/src/libs/AI21/Generated/AI21.SummarizeClient.V1SummarizeBySegment.g.cs +++ b/src/libs/AI21/Generated/AI21.SummarizeClient.V1SummarizeBySegment.g.cs @@ -184,12 +184,10 @@ partial void ProcessV1SummarizeBySegmentResponseContent( }; } - using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.SummarizeBySegmentResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); return - __responseValue ?? + await global::AI21.SummarizeBySegmentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } } diff --git a/src/libs/AI21/Generated/JsonConverters.AnyOfFactory2.g.cs b/src/libs/AI21/Generated/JsonConverters.AnyOfFactory2.g.cs deleted file mode 100644 index f4247df..0000000 --- a/src/libs/AI21/Generated/JsonConverters.AnyOfFactory2.g.cs +++ /dev/null @@ -1,25 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class AnyOfJsonConverterFactory2 : global::System.Text.Json.Serialization.JsonConverterFactory - { - /// - public override bool CanConvert(global::System.Type? typeToConvert) - { - return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::AI21.AnyOf<,>); - } - - /// - public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert)); - - return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance( - typeof(AnyOfJsonConverter<,>).MakeGenericType(typeToConvert.GenericTypeArguments))!; - } - } -} diff --git a/src/libs/AI21/Generated/JsonSerializerContext.g.cs b/src/libs/AI21/Generated/JsonSerializerContext.g.cs index fbce70f..04d8718 100644 --- a/src/libs/AI21/Generated/JsonSerializerContext.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContext.g.cs @@ -57,9 +57,12 @@ namespace AI21 typeof(global::AI21.JsonConverters.UserMessageRoleNullableJsonConverter), typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleJsonConverter), typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleNullableJsonConverter), - typeof(global::AI21.JsonConverters.AnyOfJsonConverterFactory2), typeof(global::AI21.JsonConverters.QueryFilterJsonConverter), typeof(global::AI21.JsonConverters.MessagesItemJsonConverter), + typeof(global::AI21.JsonConverters.AnyOfJsonConverter), + typeof(global::AI21.JsonConverters.AnyOfJsonConverter), + typeof(global::AI21.JsonConverters.AnyOfJsonConverter>), + typeof(global::AI21.JsonConverters.AnyOfJsonConverter>), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AI21.JsonSerializerContextTypes))]