diff --git a/src/libs/Together/Generated/Together.AudioClient.AudioSpeech.g.cs b/src/libs/Together/Generated/Together.AudioClient.AudioSpeech.g.cs
index 3875a48..1697c16 100644
--- a/src/libs/Together/Generated/Together.AudioClient.AudioSpeech.g.cs
+++ b/src/libs/Together/Generated/Together.AudioClient.AudioSpeech.g.cs
@@ -78,7 +78,7 @@ partial void ProcessAudioSpeechResponse(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -152,7 +152,7 @@ partial void ProcessAudioSpeechResponse(
yield break;
}
- var __streamedResponse = global::Together.AudioSpeechStreamResponse.FromJson(__content, JsonSerializerContext) ??
+ var __streamedResponse = global::Together.AudioSpeechStreamResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::Together.ApiException(
message: $"Response deserialization failed for \"{__content}\" ",
statusCode: __response.StatusCode)
diff --git a/src/libs/Together/Generated/Together.AudioClient.AudioTranscriptions.g.cs b/src/libs/Together/Generated/Together.AudioClient.AudioTranscriptions.g.cs
index 1f96e3d..2441389 100644
--- a/src/libs/Together/Generated/Together.AudioClient.AudioTranscriptions.g.cs
+++ b/src/libs/Together/Generated/Together.AudioClient.AudioTranscriptions.g.cs
@@ -180,13 +180,13 @@ partial void ProcessAudioTranscriptionsResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -218,13 +218,13 @@ partial void ProcessAudioTranscriptionsResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -256,13 +256,13 @@ partial void ProcessAudioTranscriptionsResponseContent(
if (ReadResponseAsString)
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
else
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -306,7 +306,7 @@ partial void ProcessAudioTranscriptionsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.AudioTranscriptionResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.AudioTranscriptionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -337,7 +337,7 @@ partial void ProcessAudioTranscriptionsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.AudioTranscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.AudioTranscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.AudioClient.AudioTranslations.g.cs b/src/libs/Together/Generated/Together.AudioClient.AudioTranslations.g.cs
index 1c64d9a..822fce5 100644
--- a/src/libs/Together/Generated/Together.AudioClient.AudioTranslations.g.cs
+++ b/src/libs/Together/Generated/Together.AudioClient.AudioTranslations.g.cs
@@ -161,13 +161,13 @@ partial void ProcessAudioTranslationsResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -199,13 +199,13 @@ partial void ProcessAudioTranslationsResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -237,13 +237,13 @@ partial void ProcessAudioTranslationsResponseContent(
if (ReadResponseAsString)
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
else
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -287,7 +287,7 @@ partial void ProcessAudioTranslationsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.AudioTranslationResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.AudioTranslationResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -318,7 +318,7 @@ partial void ProcessAudioTranslationsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.AudioTranslationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.AudioTranslationResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.AudioClient.g.cs b/src/libs/Together/Generated/Together.AudioClient.g.cs
index 519002c..e24c3b9 100644
--- a/src/libs/Together/Generated/Together.AudioClient.g.cs
+++ b/src/libs/Together/Generated/Together.AudioClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class AudioClient : global::Together.IAudioClient, global:
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.BatchesClient.CreateBatches.g.cs b/src/libs/Together/Generated/Together.BatchesClient.CreateBatches.g.cs
index aa70d03..b3ce976 100644
--- a/src/libs/Together/Generated/Together.BatchesClient.CreateBatches.g.cs
+++ b/src/libs/Together/Generated/Together.BatchesClient.CreateBatches.g.cs
@@ -78,7 +78,7 @@ partial void ProcessCreateBatchesResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -115,13 +115,13 @@ partial void ProcessCreateBatchesResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -153,13 +153,13 @@ partial void ProcessCreateBatchesResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -191,13 +191,13 @@ partial void ProcessCreateBatchesResponseContent(
if (ReadResponseAsString)
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.BatchErrorResponse.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.BatchErrorResponse.FromJson(__content_429, JsonSerializerOptions);
}
else
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.BatchErrorResponse.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.BatchErrorResponse.FromJson(__content_429, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -229,13 +229,13 @@ partial void ProcessCreateBatchesResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -279,7 +279,7 @@ partial void ProcessCreateBatchesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.BatchJobWithWarning.FromJson(__content, JsonSerializerContext) ??
+ global::Together.BatchJobWithWarning.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -310,7 +310,7 @@ partial void ProcessCreateBatchesResponseContent(
).ConfigureAwait(false);
return
- await global::Together.BatchJobWithWarning.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.BatchJobWithWarning.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.BatchesClient.CreateBatchesByIdCancel.g.cs b/src/libs/Together/Generated/Together.BatchesClient.CreateBatchesByIdCancel.g.cs
index 536a703..2f1ffaa 100644
--- a/src/libs/Together/Generated/Together.BatchesClient.CreateBatchesByIdCancel.g.cs
+++ b/src/libs/Together/Generated/Together.BatchesClient.CreateBatchesByIdCancel.g.cs
@@ -109,13 +109,13 @@ partial void ProcessCreateBatchesByIdCancelResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -147,13 +147,13 @@ partial void ProcessCreateBatchesByIdCancelResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -185,13 +185,13 @@ partial void ProcessCreateBatchesByIdCancelResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.BatchErrorResponse.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.BatchErrorResponse.FromJson(__content_403, JsonSerializerOptions);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.BatchErrorResponse.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.BatchErrorResponse.FromJson(__content_403, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -223,13 +223,13 @@ partial void ProcessCreateBatchesByIdCancelResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.BatchErrorResponse.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.BatchErrorResponse.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.BatchErrorResponse.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.BatchErrorResponse.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -261,13 +261,13 @@ partial void ProcessCreateBatchesByIdCancelResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -311,7 +311,7 @@ partial void ProcessCreateBatchesByIdCancelResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.BatchJob.FromJson(__content, JsonSerializerContext) ??
+ global::Together.BatchJob.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -342,7 +342,7 @@ partial void ProcessCreateBatchesByIdCancelResponseContent(
).ConfigureAwait(false);
return
- await global::Together.BatchJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.BatchJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.BatchesClient.GetBatches.g.cs b/src/libs/Together/Generated/Together.BatchesClient.GetBatches.g.cs
index 88785e7..8b2498d 100644
--- a/src/libs/Together/Generated/Together.BatchesClient.GetBatches.g.cs
+++ b/src/libs/Together/Generated/Together.BatchesClient.GetBatches.g.cs
@@ -101,13 +101,13 @@ partial void ProcessGetBatchesResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -139,13 +139,13 @@ partial void ProcessGetBatchesResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -189,7 +189,7 @@ partial void ProcessGetBatchesResponseContent(
__response.EnsureSuccessStatusCode();
return
- (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
+ global::System.Text.Json.JsonSerializer.Deserialize?>(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -220,7 +220,7 @@ partial void ProcessGetBatchesResponseContent(
).ConfigureAwait(false);
return
- (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
+ await global::System.Text.Json.JsonSerializer.DeserializeAsync?>(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.BatchesClient.GetBatchesById.g.cs b/src/libs/Together/Generated/Together.BatchesClient.GetBatchesById.g.cs
index 61e7180..7e099e7 100644
--- a/src/libs/Together/Generated/Together.BatchesClient.GetBatchesById.g.cs
+++ b/src/libs/Together/Generated/Together.BatchesClient.GetBatchesById.g.cs
@@ -109,13 +109,13 @@ partial void ProcessGetBatchesByIdResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.BatchErrorResponse.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -147,13 +147,13 @@ partial void ProcessGetBatchesByIdResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.BatchErrorResponse.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -185,13 +185,13 @@ partial void ProcessGetBatchesByIdResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.BatchErrorResponse.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.BatchErrorResponse.FromJson(__content_403, JsonSerializerOptions);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.BatchErrorResponse.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.BatchErrorResponse.FromJson(__content_403, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -223,13 +223,13 @@ partial void ProcessGetBatchesByIdResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.BatchErrorResponse.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.BatchErrorResponse.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.BatchErrorResponse.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.BatchErrorResponse.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -261,13 +261,13 @@ partial void ProcessGetBatchesByIdResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.BatchErrorResponse.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -311,7 +311,7 @@ partial void ProcessGetBatchesByIdResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.BatchJob.FromJson(__content, JsonSerializerContext) ??
+ global::Together.BatchJob.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -342,7 +342,7 @@ partial void ProcessGetBatchesByIdResponseContent(
).ConfigureAwait(false);
return
- await global::Together.BatchJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.BatchJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.BatchesClient.g.cs b/src/libs/Together/Generated/Together.BatchesClient.g.cs
index 5ddc264..9a120f9 100644
--- a/src/libs/Together/Generated/Together.BatchesClient.g.cs
+++ b/src/libs/Together/Generated/Together.BatchesClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class BatchesClient : global::Together.IBatchesClient, glo
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.ChatClient.ChatCompletions.g.cs b/src/libs/Together/Generated/Together.ChatClient.ChatCompletions.g.cs
index 8bee5fa..12bf153 100644
--- a/src/libs/Together/Generated/Together.ChatClient.ChatCompletions.g.cs
+++ b/src/libs/Together/Generated/Together.ChatClient.ChatCompletions.g.cs
@@ -116,7 +116,7 @@ partial void ProcessChatCompletionsResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -153,13 +153,13 @@ partial void ProcessChatCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -191,13 +191,13 @@ partial void ProcessChatCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -229,13 +229,13 @@ partial void ProcessChatCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -267,13 +267,13 @@ partial void ProcessChatCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
else
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -305,13 +305,13 @@ partial void ProcessChatCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_503 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerContext);
+ __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerOptions);
}
else
{
__content_503 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerContext);
+ __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -343,13 +343,13 @@ partial void ProcessChatCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_504 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerContext);
+ __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerOptions);
}
else
{
__content_504 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerContext);
+ __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -393,7 +393,7 @@ partial void ProcessChatCompletionsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.ChatCompletionResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.ChatCompletionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -424,7 +424,7 @@ partial void ProcessChatCompletionsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.ChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.ChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.ChatClient.ChatCompletionsAsStream.g.cs b/src/libs/Together/Generated/Together.ChatClient.ChatCompletionsAsStream.g.cs
index 6e91224..5d46edf 100644
--- a/src/libs/Together/Generated/Together.ChatClient.ChatCompletionsAsStream.g.cs
+++ b/src/libs/Together/Generated/Together.ChatClient.ChatCompletionsAsStream.g.cs
@@ -111,7 +111,7 @@ partial void ProcessChatCompletionsAsStreamResponse(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -185,7 +185,7 @@ partial void ProcessChatCompletionsAsStreamResponse(
yield break;
}
- var __streamedResponse = global::Together.ChatCompletionStream.FromJson(__content, JsonSerializerContext) ??
+ var __streamedResponse = global::Together.ChatCompletionStream.FromJson(__content, JsonSerializerOptions) ??
throw new global::Together.ApiException(
message: $"Response deserialization failed for \"{__content}\" ",
statusCode: __response.StatusCode)
diff --git a/src/libs/Together/Generated/Together.ChatClient.g.cs b/src/libs/Together/Generated/Together.ChatClient.g.cs
index 99f9706..d16f9f8 100644
--- a/src/libs/Together/Generated/Together.ChatClient.g.cs
+++ b/src/libs/Together/Generated/Together.ChatClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class ChatClient : global::Together.IChatClient, global::S
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.CodeInterpreterClient.SessionsList.g.cs b/src/libs/Together/Generated/Together.CodeInterpreterClient.SessionsList.g.cs
index 16adf38..4983dd0 100644
--- a/src/libs/Together/Generated/Together.CodeInterpreterClient.SessionsList.g.cs
+++ b/src/libs/Together/Generated/Together.CodeInterpreterClient.SessionsList.g.cs
@@ -112,7 +112,7 @@ partial void ProcessSessionsListResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.SessionListResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.SessionListResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -143,7 +143,7 @@ partial void ProcessSessionsListResponseContent(
).ConfigureAwait(false);
return
- await global::Together.SessionListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.SessionListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.CodeInterpreterClient.TciExecute.g.cs b/src/libs/Together/Generated/Together.CodeInterpreterClient.TciExecute.g.cs
index 96c18d7..2ed187d 100644
--- a/src/libs/Together/Generated/Together.CodeInterpreterClient.TciExecute.g.cs
+++ b/src/libs/Together/Generated/Together.CodeInterpreterClient.TciExecute.g.cs
@@ -81,7 +81,7 @@ partial void ProcessTciExecuteResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -130,7 +130,7 @@ partial void ProcessTciExecuteResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.ExecuteResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.ExecuteResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -161,7 +161,7 @@ partial void ProcessTciExecuteResponseContent(
).ConfigureAwait(false);
return
- await global::Together.ExecuteResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.ExecuteResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.CodeInterpreterClient.g.cs b/src/libs/Together/Generated/Together.CodeInterpreterClient.g.cs
index 1a9ebf4..ed25d80 100644
--- a/src/libs/Together/Generated/Together.CodeInterpreterClient.g.cs
+++ b/src/libs/Together/Generated/Together.CodeInterpreterClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class CodeInterpreterClient : global::Together.ICodeInterp
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.CompletionClient.Completions.g.cs b/src/libs/Together/Generated/Together.CompletionClient.Completions.g.cs
index 5d82308..e0df1d7 100644
--- a/src/libs/Together/Generated/Together.CompletionClient.Completions.g.cs
+++ b/src/libs/Together/Generated/Together.CompletionClient.Completions.g.cs
@@ -103,7 +103,7 @@ partial void ProcessCompletionsResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -140,13 +140,13 @@ partial void ProcessCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -178,13 +178,13 @@ partial void ProcessCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -216,13 +216,13 @@ partial void ProcessCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -254,13 +254,13 @@ partial void ProcessCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
else
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -292,13 +292,13 @@ partial void ProcessCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_503 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerContext);
+ __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerOptions);
}
else
{
__content_503 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerContext);
+ __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -330,13 +330,13 @@ partial void ProcessCompletionsResponseContent(
if (ReadResponseAsString)
{
__content_504 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerContext);
+ __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerOptions);
}
else
{
__content_504 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerContext);
+ __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -380,7 +380,7 @@ partial void ProcessCompletionsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.CompletionResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.CompletionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -411,7 +411,7 @@ partial void ProcessCompletionsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.CompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.CompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.CompletionClient.CompletionsAsStream.g.cs b/src/libs/Together/Generated/Together.CompletionClient.CompletionsAsStream.g.cs
index ed5d8a8..70b175f 100644
--- a/src/libs/Together/Generated/Together.CompletionClient.CompletionsAsStream.g.cs
+++ b/src/libs/Together/Generated/Together.CompletionClient.CompletionsAsStream.g.cs
@@ -98,7 +98,7 @@ partial void ProcessCompletionsAsStreamResponse(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -172,7 +172,7 @@ partial void ProcessCompletionsAsStreamResponse(
yield break;
}
- var __streamedResponse = global::Together.CompletionStream.FromJson(__content, JsonSerializerContext) ??
+ var __streamedResponse = global::Together.CompletionStream.FromJson(__content, JsonSerializerOptions) ??
throw new global::Together.ApiException(
message: $"Response deserialization failed for \"{__content}\" ",
statusCode: __response.StatusCode)
diff --git a/src/libs/Together/Generated/Together.CompletionClient.g.cs b/src/libs/Together/Generated/Together.CompletionClient.g.cs
index 0bab751..6146342 100644
--- a/src/libs/Together/Generated/Together.CompletionClient.g.cs
+++ b/src/libs/Together/Generated/Together.CompletionClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class CompletionClient : global::Together.ICompletionClien
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.DeploymentsClient.CreateDeployments.g.cs b/src/libs/Together/Generated/Together.DeploymentsClient.CreateDeployments.g.cs
index c32f776..c6aac4c 100644
--- a/src/libs/Together/Generated/Together.DeploymentsClient.CreateDeployments.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsClient.CreateDeployments.g.cs
@@ -78,7 +78,7 @@ partial void ProcessCreateDeploymentsResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -115,13 +115,13 @@ partial void ProcessCreateDeploymentsResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
+ __value_400 = global::System.Text.Json.JsonSerializer.Deserialize(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
+ __value_400 = global::System.Text.Json.JsonSerializer.Deserialize(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -153,13 +153,13 @@ partial void ProcessCreateDeploymentsResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -203,7 +203,7 @@ partial void ProcessCreateDeploymentsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.DeploymentResponseItem.FromJson(__content, JsonSerializerContext) ??
+ global::Together.DeploymentResponseItem.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -234,7 +234,7 @@ partial void ProcessCreateDeploymentsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.DeploymentResponseItem.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.DeploymentResponseItem.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.DeploymentsClient.DeleteDeploymentsById.g.cs b/src/libs/Together/Generated/Together.DeploymentsClient.DeleteDeploymentsById.g.cs
index f722bbd..2f18fe0 100644
--- a/src/libs/Together/Generated/Together.DeploymentsClient.DeleteDeploymentsById.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsClient.DeleteDeploymentsById.g.cs
@@ -104,13 +104,13 @@ partial void ProcessDeleteDeploymentsByIdResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(string), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(string), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -142,13 +142,13 @@ partial void ProcessDeleteDeploymentsByIdResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.DeploymentsClient.EditDeploymentsById.g.cs b/src/libs/Together/Generated/Together.DeploymentsClient.EditDeploymentsById.g.cs
index 5bd654d..5c8b581 100644
--- a/src/libs/Together/Generated/Together.DeploymentsClient.EditDeploymentsById.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsClient.EditDeploymentsById.g.cs
@@ -81,7 +81,7 @@ partial void ProcessEditDeploymentsByIdResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -119,13 +119,13 @@ partial void ProcessEditDeploymentsByIdResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
+ __value_400 = global::System.Text.Json.JsonSerializer.Deserialize(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
+ __value_400 = global::System.Text.Json.JsonSerializer.Deserialize(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -157,13 +157,13 @@ partial void ProcessEditDeploymentsByIdResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(string), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(string), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -195,13 +195,13 @@ partial void ProcessEditDeploymentsByIdResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -245,7 +245,7 @@ partial void ProcessEditDeploymentsByIdResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.DeploymentResponseItem.FromJson(__content, JsonSerializerContext) ??
+ global::Together.DeploymentResponseItem.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -276,7 +276,7 @@ partial void ProcessEditDeploymentsByIdResponseContent(
).ConfigureAwait(false);
return
- await global::Together.DeploymentResponseItem.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.DeploymentResponseItem.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.DeploymentsClient.GetDeployments.g.cs b/src/libs/Together/Generated/Together.DeploymentsClient.GetDeployments.g.cs
index f9169c1..84d29b4 100644
--- a/src/libs/Together/Generated/Together.DeploymentsClient.GetDeployments.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsClient.GetDeployments.g.cs
@@ -96,13 +96,13 @@ partial void ProcessGetDeploymentsResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessGetDeploymentsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.DeploymentListResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.DeploymentListResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -177,7 +177,7 @@ partial void ProcessGetDeploymentsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.DeploymentListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.DeploymentListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.DeploymentsClient.GetDeploymentsById.g.cs b/src/libs/Together/Generated/Together.DeploymentsClient.GetDeploymentsById.g.cs
index 18b8cb8..2300ff4 100644
--- a/src/libs/Together/Generated/Together.DeploymentsClient.GetDeploymentsById.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsClient.GetDeploymentsById.g.cs
@@ -104,13 +104,13 @@ partial void ProcessGetDeploymentsByIdResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(string), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(string), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -142,13 +142,13 @@ partial void ProcessGetDeploymentsByIdResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -192,7 +192,7 @@ partial void ProcessGetDeploymentsByIdResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.DeploymentResponseItem.FromJson(__content, JsonSerializerContext) ??
+ global::Together.DeploymentResponseItem.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -223,7 +223,7 @@ partial void ProcessGetDeploymentsByIdResponseContent(
).ConfigureAwait(false);
return
- await global::Together.DeploymentResponseItem.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.DeploymentResponseItem.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.DeploymentsClient.GetDeploymentsByIdLogs.g.cs b/src/libs/Together/Generated/Together.DeploymentsClient.GetDeploymentsByIdLogs.g.cs
index 5fc895e..c5890a0 100644
--- a/src/libs/Together/Generated/Together.DeploymentsClient.GetDeploymentsByIdLogs.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsClient.GetDeploymentsByIdLogs.g.cs
@@ -115,13 +115,13 @@ partial void ProcessGetDeploymentsByIdLogsResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(string), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(string), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -153,13 +153,13 @@ partial void ProcessGetDeploymentsByIdLogsResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -203,7 +203,7 @@ partial void ProcessGetDeploymentsByIdLogsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.DeploymentLogs.FromJson(__content, JsonSerializerContext) ??
+ global::Together.DeploymentLogs.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -234,7 +234,7 @@ partial void ProcessGetDeploymentsByIdLogsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.DeploymentLogs.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.DeploymentLogs.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.DeploymentsClient.g.cs b/src/libs/Together/Generated/Together.DeploymentsClient.g.cs
index bb6ea8a..0fb97e1 100644
--- a/src/libs/Together/Generated/Together.DeploymentsClient.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class DeploymentsClient : global::Together.IDeploymentsCli
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.DeploymentsStorageClient.GetDeploymentsStorageByFilename.g.cs b/src/libs/Together/Generated/Together.DeploymentsStorageClient.GetDeploymentsStorageByFilename.g.cs
index 88e3111..db412fa 100644
--- a/src/libs/Together/Generated/Together.DeploymentsStorageClient.GetDeploymentsStorageByFilename.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsStorageClient.GetDeploymentsStorageByFilename.g.cs
@@ -93,13 +93,13 @@ partial void ProcessGetDeploymentsStorageByFilenameResponse(
if (ReadResponseAsString)
{
__content_307 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ __value_307 = global::System.Text.Json.JsonSerializer.Deserialize(__content_307, JsonSerializerOptions);
}
else
{
__content_307 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_307 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_307, typeof(string), JsonSerializerContext);
+ __value_307 = global::System.Text.Json.JsonSerializer.Deserialize(__content_307, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -131,13 +131,13 @@ partial void ProcessGetDeploymentsStorageByFilenameResponse(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = (global::System.Collections.Generic.Dictionary?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(global::System.Collections.Generic.Dictionary), JsonSerializerContext);
+ __value_400 = global::System.Text.Json.JsonSerializer.Deserialize?>(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = (global::System.Collections.Generic.Dictionary?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(global::System.Collections.Generic.Dictionary), JsonSerializerContext);
+ __value_400 = global::System.Text.Json.JsonSerializer.Deserialize?>(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -169,13 +169,13 @@ partial void ProcessGetDeploymentsStorageByFilenameResponse(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (global::System.Collections.Generic.Dictionary?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(global::System.Collections.Generic.Dictionary), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize?>(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = (global::System.Collections.Generic.Dictionary?)global::System.Text.Json.JsonSerializer.Deserialize(__content_404, typeof(global::System.Collections.Generic.Dictionary), JsonSerializerContext);
+ __value_404 = global::System.Text.Json.JsonSerializer.Deserialize?>(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -207,13 +207,13 @@ partial void ProcessGetDeploymentsStorageByFilenameResponse(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (global::System.Collections.Generic.Dictionary?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(global::System.Collections.Generic.Dictionary), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize?>(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (global::System.Collections.Generic.Dictionary?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(global::System.Collections.Generic.Dictionary), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize?>(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.DeploymentsStorageClient.g.cs b/src/libs/Together/Generated/Together.DeploymentsStorageClient.g.cs
index 5cb7800..08abbb6 100644
--- a/src/libs/Together/Generated/Together.DeploymentsStorageClient.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsStorageClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class DeploymentsStorageClient : global::Together.IDeploym
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.DeploymentsVolumesClient.CreateDeploymentsStorageVolumes.g.cs b/src/libs/Together/Generated/Together.DeploymentsVolumesClient.CreateDeploymentsStorageVolumes.g.cs
index f1c1849..bfcc98a 100644
--- a/src/libs/Together/Generated/Together.DeploymentsVolumesClient.CreateDeploymentsStorageVolumes.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsVolumesClient.CreateDeploymentsStorageVolumes.g.cs
@@ -74,7 +74,7 @@ partial void ProcessCreateDeploymentsStorageVolumesResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -111,13 +111,13 @@ partial void ProcessCreateDeploymentsStorageVolumesResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
+ __value_400 = global::System.Text.Json.JsonSerializer.Deserialize(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_400, typeof(string), JsonSerializerContext);
+ __value_400 = global::System.Text.Json.JsonSerializer.Deserialize(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -149,13 +149,13 @@ partial void ProcessCreateDeploymentsStorageVolumesResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -199,7 +199,7 @@ partial void ProcessCreateDeploymentsStorageVolumesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.VolumeResponseItem.FromJson(__content, JsonSerializerContext) ??
+ global::Together.VolumeResponseItem.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -230,7 +230,7 @@ partial void ProcessCreateDeploymentsStorageVolumesResponseContent(
).ConfigureAwait(false);
return
- await global::Together.VolumeResponseItem.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.VolumeResponseItem.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.DeploymentsVolumesClient.GetDeploymentsStorageVolumes.g.cs b/src/libs/Together/Generated/Together.DeploymentsVolumesClient.GetDeploymentsStorageVolumes.g.cs
index a4296a3..29b5b16 100644
--- a/src/libs/Together/Generated/Together.DeploymentsVolumesClient.GetDeploymentsStorageVolumes.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsVolumesClient.GetDeploymentsStorageVolumes.g.cs
@@ -96,13 +96,13 @@ partial void ProcessGetDeploymentsStorageVolumesResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content_500, typeof(string), JsonSerializerContext);
+ __value_500 = global::System.Text.Json.JsonSerializer.Deserialize(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessGetDeploymentsStorageVolumesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.ListVolumesResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.ListVolumesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -177,7 +177,7 @@ partial void ProcessGetDeploymentsStorageVolumesResponseContent(
).ConfigureAwait(false);
return
- await global::Together.ListVolumesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.ListVolumesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.DeploymentsVolumesClient.g.cs b/src/libs/Together/Generated/Together.DeploymentsVolumesClient.g.cs
index f179128..5de635b 100644
--- a/src/libs/Together/Generated/Together.DeploymentsVolumesClient.g.cs
+++ b/src/libs/Together/Generated/Together.DeploymentsVolumesClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class DeploymentsVolumesClient : global::Together.IDeploym
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.EmbeddingsClient.Embeddings.g.cs b/src/libs/Together/Generated/Together.EmbeddingsClient.Embeddings.g.cs
index 46cf38e..6ca0a18 100644
--- a/src/libs/Together/Generated/Together.EmbeddingsClient.Embeddings.g.cs
+++ b/src/libs/Together/Generated/Together.EmbeddingsClient.Embeddings.g.cs
@@ -81,7 +81,7 @@ partial void ProcessEmbeddingsResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -118,13 +118,13 @@ partial void ProcessEmbeddingsResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -156,13 +156,13 @@ partial void ProcessEmbeddingsResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -194,13 +194,13 @@ partial void ProcessEmbeddingsResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -232,13 +232,13 @@ partial void ProcessEmbeddingsResponseContent(
if (ReadResponseAsString)
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
else
{
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerContext);
+ __value_429 = global::Together.ErrorData.FromJson(__content_429, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -270,13 +270,13 @@ partial void ProcessEmbeddingsResponseContent(
if (ReadResponseAsString)
{
__content_503 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerContext);
+ __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerOptions);
}
else
{
__content_503 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerContext);
+ __value_503 = global::Together.ErrorData.FromJson(__content_503, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -308,13 +308,13 @@ partial void ProcessEmbeddingsResponseContent(
if (ReadResponseAsString)
{
__content_504 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerContext);
+ __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerOptions);
}
else
{
__content_504 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerContext);
+ __value_504 = global::Together.ErrorData.FromJson(__content_504, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -358,7 +358,7 @@ partial void ProcessEmbeddingsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.EmbeddingsResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.EmbeddingsResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -389,7 +389,7 @@ partial void ProcessEmbeddingsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.EmbeddingsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.EmbeddingsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EmbeddingsClient.g.cs b/src/libs/Together/Generated/Together.EmbeddingsClient.g.cs
index dcd9321..f3fd945 100644
--- a/src/libs/Together/Generated/Together.EmbeddingsClient.g.cs
+++ b/src/libs/Together/Generated/Together.EmbeddingsClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class EmbeddingsClient : global::Together.IEmbeddingsClien
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.Endpoints2Client.AvailabilityZones.g.cs b/src/libs/Together/Generated/Together.Endpoints2Client.AvailabilityZones.g.cs
index 7860011..8b0f832 100644
--- a/src/libs/Together/Generated/Together.Endpoints2Client.AvailabilityZones.g.cs
+++ b/src/libs/Together/Generated/Together.Endpoints2Client.AvailabilityZones.g.cs
@@ -111,7 +111,7 @@ partial void ProcessAvailabilityZonesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.ListAvailibilityZonesResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.ListAvailibilityZonesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -142,7 +142,7 @@ partial void ProcessAvailabilityZonesResponseContent(
).ConfigureAwait(false);
return
- await global::Together.ListAvailibilityZonesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.ListAvailibilityZonesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.Endpoints2Client.g.cs b/src/libs/Together/Generated/Together.Endpoints2Client.g.cs
index 1296c28..4319271 100644
--- a/src/libs/Together/Generated/Together.Endpoints2Client.g.cs
+++ b/src/libs/Together/Generated/Together.Endpoints2Client.g.cs
@@ -33,7 +33,7 @@ public sealed partial class Endpoints2Client : global::Together.IEndpoints2Clien
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.EndpointsClient.CreateEndpoint.g.cs b/src/libs/Together/Generated/Together.EndpointsClient.CreateEndpoint.g.cs
index cb9c47d..47b0258 100644
--- a/src/libs/Together/Generated/Together.EndpointsClient.CreateEndpoint.g.cs
+++ b/src/libs/Together/Generated/Together.EndpointsClient.CreateEndpoint.g.cs
@@ -87,7 +87,7 @@ partial void ProcessCreateEndpointResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -124,13 +124,13 @@ partial void ProcessCreateEndpointResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -162,13 +162,13 @@ partial void ProcessCreateEndpointResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -212,7 +212,7 @@ partial void ProcessCreateEndpointResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.DedicatedEndpoint.FromJson(__content, JsonSerializerContext) ??
+ global::Together.DedicatedEndpoint.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -243,7 +243,7 @@ partial void ProcessCreateEndpointResponseContent(
).ConfigureAwait(false);
return
- await global::Together.DedicatedEndpoint.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.DedicatedEndpoint.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EndpointsClient.DeleteEndpoint.g.cs b/src/libs/Together/Generated/Together.EndpointsClient.DeleteEndpoint.g.cs
index e0e058d..d265ecd 100644
--- a/src/libs/Together/Generated/Together.EndpointsClient.DeleteEndpoint.g.cs
+++ b/src/libs/Together/Generated/Together.EndpointsClient.DeleteEndpoint.g.cs
@@ -104,13 +104,13 @@ partial void ProcessDeleteEndpointResponse(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -142,13 +142,13 @@ partial void ProcessDeleteEndpointResponse(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -180,13 +180,13 @@ partial void ProcessDeleteEndpointResponse(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EndpointsClient.GetEndpoint.g.cs b/src/libs/Together/Generated/Together.EndpointsClient.GetEndpoint.g.cs
index 18c1c2d..627f809 100644
--- a/src/libs/Together/Generated/Together.EndpointsClient.GetEndpoint.g.cs
+++ b/src/libs/Together/Generated/Together.EndpointsClient.GetEndpoint.g.cs
@@ -109,13 +109,13 @@ partial void ProcessGetEndpointResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -147,13 +147,13 @@ partial void ProcessGetEndpointResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -185,13 +185,13 @@ partial void ProcessGetEndpointResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -235,7 +235,7 @@ partial void ProcessGetEndpointResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.DedicatedEndpoint.FromJson(__content, JsonSerializerContext) ??
+ global::Together.DedicatedEndpoint.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -266,7 +266,7 @@ partial void ProcessGetEndpointResponseContent(
).ConfigureAwait(false);
return
- await global::Together.DedicatedEndpoint.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.DedicatedEndpoint.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EndpointsClient.ListEndpoints.g.cs b/src/libs/Together/Generated/Together.EndpointsClient.ListEndpoints.g.cs
index d2b8292..239c10a 100644
--- a/src/libs/Together/Generated/Together.EndpointsClient.ListEndpoints.g.cs
+++ b/src/libs/Together/Generated/Together.EndpointsClient.ListEndpoints.g.cs
@@ -130,13 +130,13 @@ partial void ProcessListEndpointsResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -168,13 +168,13 @@ partial void ProcessListEndpointsResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -218,7 +218,7 @@ partial void ProcessListEndpointsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.ListEndpointsResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.ListEndpointsResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -249,7 +249,7 @@ partial void ProcessListEndpointsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.ListEndpointsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.ListEndpointsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EndpointsClient.UpdateEndpoint.g.cs b/src/libs/Together/Generated/Together.EndpointsClient.UpdateEndpoint.g.cs
index 013ff9c..3d1a434 100644
--- a/src/libs/Together/Generated/Together.EndpointsClient.UpdateEndpoint.g.cs
+++ b/src/libs/Together/Generated/Together.EndpointsClient.UpdateEndpoint.g.cs
@@ -89,7 +89,7 @@ partial void ProcessUpdateEndpointResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -127,13 +127,13 @@ partial void ProcessUpdateEndpointResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -165,13 +165,13 @@ partial void ProcessUpdateEndpointResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -203,13 +203,13 @@ partial void ProcessUpdateEndpointResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -253,7 +253,7 @@ partial void ProcessUpdateEndpointResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.DedicatedEndpoint.FromJson(__content, JsonSerializerContext) ??
+ global::Together.DedicatedEndpoint.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -284,7 +284,7 @@ partial void ProcessUpdateEndpointResponseContent(
).ConfigureAwait(false);
return
- await global::Together.DedicatedEndpoint.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.DedicatedEndpoint.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EndpointsClient.g.cs b/src/libs/Together/Generated/Together.EndpointsClient.g.cs
index 1de07ba..222f854 100644
--- a/src/libs/Together/Generated/Together.EndpointsClient.g.cs
+++ b/src/libs/Together/Generated/Together.EndpointsClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class EndpointsClient : global::Together.IEndpointsClient,
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.EvaluationClient.CreateEvaluationJob.g.cs b/src/libs/Together/Generated/Together.EvaluationClient.CreateEvaluationJob.g.cs
index 7f96479..386d876 100644
--- a/src/libs/Together/Generated/Together.EvaluationClient.CreateEvaluationJob.g.cs
+++ b/src/libs/Together/Generated/Together.EvaluationClient.CreateEvaluationJob.g.cs
@@ -90,7 +90,7 @@ partial void ProcessCreateEvaluationJobResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -127,13 +127,13 @@ partial void ProcessCreateEvaluationJobResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -165,13 +165,13 @@ partial void ProcessCreateEvaluationJobResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -215,7 +215,7 @@ partial void ProcessCreateEvaluationJobResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.EvaluationResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.EvaluationResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -246,7 +246,7 @@ partial void ProcessCreateEvaluationJobResponseContent(
).ConfigureAwait(false);
return
- await global::Together.EvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.EvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EvaluationClient.GetAllEvaluationJobs.g.cs b/src/libs/Together/Generated/Together.EvaluationClient.GetAllEvaluationJobs.g.cs
index 9e11c4e..311b2bf 100644
--- a/src/libs/Together/Generated/Together.EvaluationClient.GetAllEvaluationJobs.g.cs
+++ b/src/libs/Together/Generated/Together.EvaluationClient.GetAllEvaluationJobs.g.cs
@@ -121,13 +121,13 @@ partial void ProcessGetAllEvaluationJobsResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -159,13 +159,13 @@ partial void ProcessGetAllEvaluationJobsResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -209,7 +209,7 @@ partial void ProcessGetAllEvaluationJobsResponseContent(
__response.EnsureSuccessStatusCode();
return
- (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
+ global::System.Text.Json.JsonSerializer.Deserialize?>(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -240,7 +240,7 @@ partial void ProcessGetAllEvaluationJobsResponseContent(
).ConfigureAwait(false);
return
- (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
+ await global::System.Text.Json.JsonSerializer.DeserializeAsync?>(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EvaluationClient.GetEvaluationJobDetails.g.cs b/src/libs/Together/Generated/Together.EvaluationClient.GetEvaluationJobDetails.g.cs
index 03e967f..a6f65cf 100644
--- a/src/libs/Together/Generated/Together.EvaluationClient.GetEvaluationJobDetails.g.cs
+++ b/src/libs/Together/Generated/Together.EvaluationClient.GetEvaluationJobDetails.g.cs
@@ -107,13 +107,13 @@ partial void ProcessGetEvaluationJobDetailsResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -145,13 +145,13 @@ partial void ProcessGetEvaluationJobDetailsResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -195,7 +195,7 @@ partial void ProcessGetEvaluationJobDetailsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.EvaluationJob.FromJson(__content, JsonSerializerContext) ??
+ global::Together.EvaluationJob.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -226,7 +226,7 @@ partial void ProcessGetEvaluationJobDetailsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.EvaluationJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.EvaluationJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EvaluationClient.GetEvaluationJobStatusAndResults.g.cs b/src/libs/Together/Generated/Together.EvaluationClient.GetEvaluationJobStatusAndResults.g.cs
index 932af57..0df1be8 100644
--- a/src/libs/Together/Generated/Together.EvaluationClient.GetEvaluationJobStatusAndResults.g.cs
+++ b/src/libs/Together/Generated/Together.EvaluationClient.GetEvaluationJobStatusAndResults.g.cs
@@ -108,13 +108,13 @@ partial void ProcessGetEvaluationJobStatusAndResultsResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -146,13 +146,13 @@ partial void ProcessGetEvaluationJobStatusAndResultsResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -196,7 +196,7 @@ partial void ProcessGetEvaluationJobStatusAndResultsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.GetEvaluationJobStatusAndResultsResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.GetEvaluationJobStatusAndResultsResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -227,7 +227,7 @@ partial void ProcessGetEvaluationJobStatusAndResultsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.GetEvaluationJobStatusAndResultsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.GetEvaluationJobStatusAndResultsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EvaluationClient.GetModelList.g.cs b/src/libs/Together/Generated/Together.EvaluationClient.GetModelList.g.cs
index f752f77..6eafab9 100644
--- a/src/libs/Together/Generated/Together.EvaluationClient.GetModelList.g.cs
+++ b/src/libs/Together/Generated/Together.EvaluationClient.GetModelList.g.cs
@@ -101,13 +101,13 @@ partial void ProcessGetModelListResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -139,13 +139,13 @@ partial void ProcessGetModelListResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -189,7 +189,7 @@ partial void ProcessGetModelListResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.GetModelListResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.GetModelListResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -220,7 +220,7 @@ partial void ProcessGetModelListResponseContent(
).ConfigureAwait(false);
return
- await global::Together.GetModelListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.GetModelListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.EvaluationClient.g.cs b/src/libs/Together/Generated/Together.EvaluationClient.g.cs
index 1e49dee..ea12f12 100644
--- a/src/libs/Together/Generated/Together.EvaluationClient.g.cs
+++ b/src/libs/Together/Generated/Together.EvaluationClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class EvaluationClient : global::Together.IEvaluationClien
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.FilesClient.CreateFilesUpload.g.cs b/src/libs/Together/Generated/Together.FilesClient.CreateFilesUpload.g.cs
index eacf334..2f75923 100644
--- a/src/libs/Together/Generated/Together.FilesClient.CreateFilesUpload.g.cs
+++ b/src/libs/Together/Generated/Together.FilesClient.CreateFilesUpload.g.cs
@@ -135,13 +135,13 @@ partial void ProcessCreateFilesUploadResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -173,13 +173,13 @@ partial void ProcessCreateFilesUploadResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -211,13 +211,13 @@ partial void ProcessCreateFilesUploadResponseContent(
if (ReadResponseAsString)
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
else
{
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerContext);
+ __value_401 = global::Together.ErrorData.FromJson(__content_401, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -261,7 +261,7 @@ partial void ProcessCreateFilesUploadResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FileResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FileResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -292,7 +292,7 @@ partial void ProcessCreateFilesUploadResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FileResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FilesClient.DeleteFilesById.g.cs b/src/libs/Together/Generated/Together.FilesClient.DeleteFilesById.g.cs
index 120ad1e..5a7cd73 100644
--- a/src/libs/Together/Generated/Together.FilesClient.DeleteFilesById.g.cs
+++ b/src/libs/Together/Generated/Together.FilesClient.DeleteFilesById.g.cs
@@ -120,7 +120,7 @@ partial void ProcessDeleteFilesByIdResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FileDeleteResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FileDeleteResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -151,7 +151,7 @@ partial void ProcessDeleteFilesByIdResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FileDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FileDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FilesClient.GetFiles.g.cs b/src/libs/Together/Generated/Together.FilesClient.GetFiles.g.cs
index fc0d9b2..08bfeda 100644
--- a/src/libs/Together/Generated/Together.FilesClient.GetFiles.g.cs
+++ b/src/libs/Together/Generated/Together.FilesClient.GetFiles.g.cs
@@ -113,7 +113,7 @@ partial void ProcessGetFilesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FileList.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FileList.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessGetFilesResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FileList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FileList.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FilesClient.GetFilesById.g.cs b/src/libs/Together/Generated/Together.FilesClient.GetFilesById.g.cs
index 1c35fd8..7f8c52e 100644
--- a/src/libs/Together/Generated/Together.FilesClient.GetFilesById.g.cs
+++ b/src/libs/Together/Generated/Together.FilesClient.GetFilesById.g.cs
@@ -120,7 +120,7 @@ partial void ProcessGetFilesByIdResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FileResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FileResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -151,7 +151,7 @@ partial void ProcessGetFilesByIdResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FileResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FilesClient.GetFilesByIdContent.g.cs b/src/libs/Together/Generated/Together.FilesClient.GetFilesByIdContent.g.cs
index 0099ebb..5ea7a78 100644
--- a/src/libs/Together/Generated/Together.FilesClient.GetFilesByIdContent.g.cs
+++ b/src/libs/Together/Generated/Together.FilesClient.GetFilesByIdContent.g.cs
@@ -109,13 +109,13 @@ partial void ProcessGetFilesByIdContentResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FilesClient.g.cs b/src/libs/Together/Generated/Together.FilesClient.g.cs
index 21dd3c5..a7e3133 100644
--- a/src/libs/Together/Generated/Together.FilesClient.g.cs
+++ b/src/libs/Together/Generated/Together.FilesClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class FilesClient : global::Together.IFilesClient, global:
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunes.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunes.g.cs
index 3321ea1..a526bb5 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunes.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunes.g.cs
@@ -83,7 +83,7 @@ partial void ProcessCreateFineTunesResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -132,7 +132,7 @@ partial void ProcessCreateFineTunesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FinetuneResponseTruncated.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FinetuneResponseTruncated.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -163,7 +163,7 @@ partial void ProcessCreateFineTunesResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FinetuneResponseTruncated.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FinetuneResponseTruncated.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunesByIdCancel.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunesByIdCancel.g.cs
index 8493b8f..f7f595c 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunesByIdCancel.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunesByIdCancel.g.cs
@@ -186,7 +186,7 @@ partial void ProcessCreateFineTunesByIdCancelResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FinetuneResponseTruncated.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FinetuneResponseTruncated.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -217,7 +217,7 @@ partial void ProcessCreateFineTunesByIdCancelResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FinetuneResponseTruncated.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FinetuneResponseTruncated.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunesEstimatePrice.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunesEstimatePrice.g.cs
index a95ae95..ee9adce 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunesEstimatePrice.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.CreateFineTunesEstimatePrice.g.cs
@@ -68,7 +68,7 @@ partial void ProcessCreateFineTunesEstimatePriceResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -105,13 +105,13 @@ partial void ProcessCreateFineTunesEstimatePriceResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -155,7 +155,7 @@ partial void ProcessCreateFineTunesEstimatePriceResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.CreateFineTunesEstimatePriceResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.CreateFineTunesEstimatePriceResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -186,7 +186,7 @@ partial void ProcessCreateFineTunesEstimatePriceResponseContent(
).ConfigureAwait(false);
return
- await global::Together.CreateFineTunesEstimatePriceResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.CreateFineTunesEstimatePriceResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.DeleteFineTunesById.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.DeleteFineTunesById.g.cs
index aef604e..c081edc 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.DeleteFineTunesById.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.DeleteFineTunesById.g.cs
@@ -120,13 +120,13 @@ partial void ProcessDeleteFineTunesByIdResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -158,13 +158,13 @@ partial void ProcessDeleteFineTunesByIdResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -208,7 +208,7 @@ partial void ProcessDeleteFineTunesByIdResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FinetuneDeleteResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FinetuneDeleteResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -239,7 +239,7 @@ partial void ProcessDeleteFineTunesByIdResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FinetuneDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FinetuneDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunes.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunes.g.cs
index 2dea65b..5c50877 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunes.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunes.g.cs
@@ -113,7 +113,7 @@ partial void ProcessGetFineTunesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FinetuneTruncatedList.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FinetuneTruncatedList.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessGetFineTunesResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FinetuneTruncatedList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FinetuneTruncatedList.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesById.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesById.g.cs
index beda3c4..8d0ef3f 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesById.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesById.g.cs
@@ -120,7 +120,7 @@ partial void ProcessGetFineTunesByIdResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FinetuneResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FinetuneResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -151,7 +151,7 @@ partial void ProcessGetFineTunesByIdResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FinetuneResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FinetuneResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesByIdCheckpoints.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesByIdCheckpoints.g.cs
index 64f894b..917a808 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesByIdCheckpoints.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesByIdCheckpoints.g.cs
@@ -120,7 +120,7 @@ partial void ProcessGetFineTunesByIdCheckpointsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FinetuneListCheckpoints.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FinetuneListCheckpoints.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -151,7 +151,7 @@ partial void ProcessGetFineTunesByIdCheckpointsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FinetuneListCheckpoints.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FinetuneListCheckpoints.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesByIdEvents.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesByIdEvents.g.cs
index c8e016d..181d40b 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesByIdEvents.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesByIdEvents.g.cs
@@ -121,7 +121,7 @@ partial void ProcessGetFineTunesByIdEventsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FinetuneListEvents.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FinetuneListEvents.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessGetFineTunesByIdEventsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FinetuneListEvents.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FinetuneListEvents.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesModelsLimits.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesModelsLimits.g.cs
index 848059a..43f4737 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesModelsLimits.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesModelsLimits.g.cs
@@ -105,13 +105,13 @@ partial void ProcessGetFineTunesModelsLimitsResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.GetFineTunesModelsLimitsResponse.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.GetFineTunesModelsLimitsResponse.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::Together.GetFineTunesModelsLimitsResponse.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::Together.GetFineTunesModelsLimitsResponse.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -155,7 +155,7 @@ partial void ProcessGetFineTunesModelsLimitsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.FineTuneModelLimits.FromJson(__content, JsonSerializerContext) ??
+ global::Together.FineTuneModelLimits.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -186,7 +186,7 @@ partial void ProcessGetFineTunesModelsLimitsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.FineTuneModelLimits.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.FineTuneModelLimits.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesModelsSupported.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesModelsSupported.g.cs
index e408286..2c5b739 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesModelsSupported.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.GetFineTunesModelsSupported.g.cs
@@ -106,7 +106,7 @@ partial void ProcessGetFineTunesModelsSupportedResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.GetFineTunesModelsSupportedResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.GetFineTunesModelsSupportedResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessGetFineTunesModelsSupportedResponseContent(
).ConfigureAwait(false);
return
- await global::Together.GetFineTunesModelsSupportedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.GetFineTunesModelsSupportedResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.FineTuningClient.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.g.cs
index dfbf5c9..a4ecb8e 100644
--- a/src/libs/Together/Generated/Together.FineTuningClient.g.cs
+++ b/src/libs/Together/Generated/Together.FineTuningClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class FineTuningClient : global::Together.IFineTuningClien
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceCreate.g.cs b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceCreate.g.cs
index 428cb74..f777ff2 100644
--- a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceCreate.g.cs
+++ b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceCreate.g.cs
@@ -84,7 +84,7 @@ partial void ProcessGPUClusterServiceCreateResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -133,7 +133,7 @@ partial void ProcessGPUClusterServiceCreateResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.GPUClusterInfo.FromJson(__content, JsonSerializerContext) ??
+ global::Together.GPUClusterInfo.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -164,7 +164,7 @@ partial void ProcessGPUClusterServiceCreateResponseContent(
).ConfigureAwait(false);
return
- await global::Together.GPUClusterInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.GPUClusterInfo.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceDelete.g.cs b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceDelete.g.cs
index a150994..df142b3 100644
--- a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceDelete.g.cs
+++ b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceDelete.g.cs
@@ -116,7 +116,7 @@ partial void ProcessGPUClusterServiceDeleteResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.GPUClusterServiceDeleteResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.GPUClusterServiceDeleteResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessGPUClusterServiceDeleteResponseContent(
).ConfigureAwait(false);
return
- await global::Together.GPUClusterServiceDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.GPUClusterServiceDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceGet.g.cs b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceGet.g.cs
index 3f18f92..904ceb1 100644
--- a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceGet.g.cs
+++ b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceGet.g.cs
@@ -116,7 +116,7 @@ partial void ProcessGPUClusterServiceGetResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.GPUClusterInfo.FromJson(__content, JsonSerializerContext) ??
+ global::Together.GPUClusterInfo.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessGPUClusterServiceGetResponseContent(
).ConfigureAwait(false);
return
- await global::Together.GPUClusterInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.GPUClusterInfo.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceList.g.cs b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceList.g.cs
index 2e6a782..838f29d 100644
--- a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceList.g.cs
+++ b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceList.g.cs
@@ -111,7 +111,7 @@ partial void ProcessGPUClusterServiceListResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.GPUClusters.FromJson(__content, JsonSerializerContext) ??
+ global::Together.GPUClusters.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -142,7 +142,7 @@ partial void ProcessGPUClusterServiceListResponseContent(
).ConfigureAwait(false);
return
- await global::Together.GPUClusters.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.GPUClusters.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceUpdate.g.cs b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceUpdate.g.cs
index 53836ba..eb47ea0 100644
--- a/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceUpdate.g.cs
+++ b/src/libs/Together/Generated/Together.GPUClusterServiceClient.GPUClusterServiceUpdate.g.cs
@@ -81,7 +81,7 @@ partial void ProcessGPUClusterServiceUpdateResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -131,7 +131,7 @@ partial void ProcessGPUClusterServiceUpdateResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.GPUClusterInfo.FromJson(__content, JsonSerializerContext) ??
+ global::Together.GPUClusterInfo.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -162,7 +162,7 @@ partial void ProcessGPUClusterServiceUpdateResponseContent(
).ConfigureAwait(false);
return
- await global::Together.GPUClusterInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.GPUClusterInfo.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.GPUClusterServiceClient.g.cs b/src/libs/Together/Generated/Together.GPUClusterServiceClient.g.cs
index 865ed4f..e7b50c5 100644
--- a/src/libs/Together/Generated/Together.GPUClusterServiceClient.g.cs
+++ b/src/libs/Together/Generated/Together.GPUClusterServiceClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class GPUClusterServiceClient : global::Together.IGPUClust
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.HardwareClient.ListHardware.g.cs b/src/libs/Together/Generated/Together.HardwareClient.ListHardware.g.cs
index 1d1f474..f864a9d 100644
--- a/src/libs/Together/Generated/Together.HardwareClient.ListHardware.g.cs
+++ b/src/libs/Together/Generated/Together.HardwareClient.ListHardware.g.cs
@@ -115,13 +115,13 @@ partial void ProcessListHardwareResponseContent(
if (ReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerContext);
+ __value_403 = global::Together.ErrorData.FromJson(__content_403, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -153,13 +153,13 @@ partial void ProcessListHardwareResponseContent(
if (ReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext);
+ __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -203,7 +203,7 @@ partial void ProcessListHardwareResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.ListHardwareResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.ListHardwareResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -234,7 +234,7 @@ partial void ProcessListHardwareResponseContent(
).ConfigureAwait(false);
return
- await global::Together.ListHardwareResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.ListHardwareResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.HardwareClient.g.cs b/src/libs/Together/Generated/Together.HardwareClient.g.cs
index c789a82..8e7249a 100644
--- a/src/libs/Together/Generated/Together.HardwareClient.g.cs
+++ b/src/libs/Together/Generated/Together.HardwareClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class HardwareClient : global::Together.IHardwareClient, g
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.IAudioClient.g.cs b/src/libs/Together/Generated/Together.IAudioClient.g.cs
index 44ac098..6e31b7e 100644
--- a/src/libs/Together/Generated/Together.IAudioClient.g.cs
+++ b/src/libs/Together/Generated/Together.IAudioClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IAudioClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IBatchesClient.g.cs b/src/libs/Together/Generated/Together.IBatchesClient.g.cs
index 47236ac..d88fffb 100644
--- a/src/libs/Together/Generated/Together.IBatchesClient.g.cs
+++ b/src/libs/Together/Generated/Together.IBatchesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IBatchesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IChatClient.g.cs b/src/libs/Together/Generated/Together.IChatClient.g.cs
index abac585..6401c8e 100644
--- a/src/libs/Together/Generated/Together.IChatClient.g.cs
+++ b/src/libs/Together/Generated/Together.IChatClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IChatClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.ICodeInterpreterClient.g.cs b/src/libs/Together/Generated/Together.ICodeInterpreterClient.g.cs
index fe5dfe8..1c87f83 100644
--- a/src/libs/Together/Generated/Together.ICodeInterpreterClient.g.cs
+++ b/src/libs/Together/Generated/Together.ICodeInterpreterClient.g.cs
@@ -36,7 +36,7 @@ public partial interface ICodeInterpreterClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.ICompletionClient.g.cs b/src/libs/Together/Generated/Together.ICompletionClient.g.cs
index 0c7d868..4a4159c 100644
--- a/src/libs/Together/Generated/Together.ICompletionClient.g.cs
+++ b/src/libs/Together/Generated/Together.ICompletionClient.g.cs
@@ -36,7 +36,7 @@ public partial interface ICompletionClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IDeploymentsClient.g.cs b/src/libs/Together/Generated/Together.IDeploymentsClient.g.cs
index 15d1941..91356a7 100644
--- a/src/libs/Together/Generated/Together.IDeploymentsClient.g.cs
+++ b/src/libs/Together/Generated/Together.IDeploymentsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IDeploymentsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IDeploymentsStorageClient.g.cs b/src/libs/Together/Generated/Together.IDeploymentsStorageClient.g.cs
index 60ba240..bae36d8 100644
--- a/src/libs/Together/Generated/Together.IDeploymentsStorageClient.g.cs
+++ b/src/libs/Together/Generated/Together.IDeploymentsStorageClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IDeploymentsStorageClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IDeploymentsVolumesClient.g.cs b/src/libs/Together/Generated/Together.IDeploymentsVolumesClient.g.cs
index 49021d4..fd0219e 100644
--- a/src/libs/Together/Generated/Together.IDeploymentsVolumesClient.g.cs
+++ b/src/libs/Together/Generated/Together.IDeploymentsVolumesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IDeploymentsVolumesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IEmbeddingsClient.g.cs b/src/libs/Together/Generated/Together.IEmbeddingsClient.g.cs
index 02a892e..19d1ae4 100644
--- a/src/libs/Together/Generated/Together.IEmbeddingsClient.g.cs
+++ b/src/libs/Together/Generated/Together.IEmbeddingsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IEmbeddingsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IEndpoints2Client.g.cs b/src/libs/Together/Generated/Together.IEndpoints2Client.g.cs
index 774e483..feb9e36 100644
--- a/src/libs/Together/Generated/Together.IEndpoints2Client.g.cs
+++ b/src/libs/Together/Generated/Together.IEndpoints2Client.g.cs
@@ -36,7 +36,7 @@ public partial interface IEndpoints2Client : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IEndpointsClient.g.cs b/src/libs/Together/Generated/Together.IEndpointsClient.g.cs
index 6033494..b3ffc46 100644
--- a/src/libs/Together/Generated/Together.IEndpointsClient.g.cs
+++ b/src/libs/Together/Generated/Together.IEndpointsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IEndpointsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IEvaluationClient.g.cs b/src/libs/Together/Generated/Together.IEvaluationClient.g.cs
index 09dd888..50affc6 100644
--- a/src/libs/Together/Generated/Together.IEvaluationClient.g.cs
+++ b/src/libs/Together/Generated/Together.IEvaluationClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IEvaluationClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IFilesClient.g.cs b/src/libs/Together/Generated/Together.IFilesClient.g.cs
index 629d69e..d7a66ee 100644
--- a/src/libs/Together/Generated/Together.IFilesClient.g.cs
+++ b/src/libs/Together/Generated/Together.IFilesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IFilesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IFineTuningClient.g.cs b/src/libs/Together/Generated/Together.IFineTuningClient.g.cs
index fd04bf2..d8b56ce 100644
--- a/src/libs/Together/Generated/Together.IFineTuningClient.g.cs
+++ b/src/libs/Together/Generated/Together.IFineTuningClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IFineTuningClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IGPUClusterServiceClient.g.cs b/src/libs/Together/Generated/Together.IGPUClusterServiceClient.g.cs
index 4f7985a..7e0d2b9 100644
--- a/src/libs/Together/Generated/Together.IGPUClusterServiceClient.g.cs
+++ b/src/libs/Together/Generated/Together.IGPUClusterServiceClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IGPUClusterServiceClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IHardwareClient.g.cs b/src/libs/Together/Generated/Together.IHardwareClient.g.cs
index 18c2976..f55451b 100644
--- a/src/libs/Together/Generated/Together.IHardwareClient.g.cs
+++ b/src/libs/Together/Generated/Together.IHardwareClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IHardwareClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IImagesClient.g.cs b/src/libs/Together/Generated/Together.IImagesClient.g.cs
index 8133f1f..123b818 100644
--- a/src/libs/Together/Generated/Together.IImagesClient.g.cs
+++ b/src/libs/Together/Generated/Together.IImagesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IImagesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IJobsClient.g.cs b/src/libs/Together/Generated/Together.IJobsClient.g.cs
index c009370..5e0a084 100644
--- a/src/libs/Together/Generated/Together.IJobsClient.g.cs
+++ b/src/libs/Together/Generated/Together.IJobsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IJobsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IModelsClient.g.cs b/src/libs/Together/Generated/Together.IModelsClient.g.cs
index 4b7a906..11eac1e 100644
--- a/src/libs/Together/Generated/Together.IModelsClient.g.cs
+++ b/src/libs/Together/Generated/Together.IModelsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IModelsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IQueueClient.g.cs b/src/libs/Together/Generated/Together.IQueueClient.g.cs
index 02163ab..f316998 100644
--- a/src/libs/Together/Generated/Together.IQueueClient.g.cs
+++ b/src/libs/Together/Generated/Together.IQueueClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IQueueClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IRegionServiceClient.g.cs b/src/libs/Together/Generated/Together.IRegionServiceClient.g.cs
index d77ce28..baad3b5 100644
--- a/src/libs/Together/Generated/Together.IRegionServiceClient.g.cs
+++ b/src/libs/Together/Generated/Together.IRegionServiceClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IRegionServiceClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IRerankClient.g.cs b/src/libs/Together/Generated/Together.IRerankClient.g.cs
index 647950a..95b3116 100644
--- a/src/libs/Together/Generated/Together.IRerankClient.g.cs
+++ b/src/libs/Together/Generated/Together.IRerankClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IRerankClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IRlClient.g.cs b/src/libs/Together/Generated/Together.IRlClient.g.cs
index 51fc1e1..36b0878 100644
--- a/src/libs/Together/Generated/Together.IRlClient.g.cs
+++ b/src/libs/Together/Generated/Together.IRlClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IRlClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.ISecretsClient.g.cs b/src/libs/Together/Generated/Together.ISecretsClient.g.cs
index 0d2f61f..ded7d68 100644
--- a/src/libs/Together/Generated/Together.ISecretsClient.g.cs
+++ b/src/libs/Together/Generated/Together.ISecretsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface ISecretsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.ISharedVolumeServiceClient.g.cs b/src/libs/Together/Generated/Together.ISharedVolumeServiceClient.g.cs
index 15188d2..5855a93 100644
--- a/src/libs/Together/Generated/Together.ISharedVolumeServiceClient.g.cs
+++ b/src/libs/Together/Generated/Together.ISharedVolumeServiceClient.g.cs
@@ -36,7 +36,7 @@ public partial interface ISharedVolumeServiceClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.ITogetherClient.g.cs b/src/libs/Together/Generated/Together.ITogetherClient.g.cs
index 19632bb..91d3e63 100644
--- a/src/libs/Together/Generated/Together.ITogetherClient.g.cs
+++ b/src/libs/Together/Generated/Together.ITogetherClient.g.cs
@@ -37,7 +37,7 @@ public partial interface ITogetherClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
///
diff --git a/src/libs/Together/Generated/Together.IVideoClient.g.cs b/src/libs/Together/Generated/Together.IVideoClient.g.cs
index f38e1a5..61216ad 100644
--- a/src/libs/Together/Generated/Together.IVideoClient.g.cs
+++ b/src/libs/Together/Generated/Together.IVideoClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IVideoClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IVoicesClient.g.cs b/src/libs/Together/Generated/Together.IVoicesClient.g.cs
index 7c96abe..cad72e8 100644
--- a/src/libs/Together/Generated/Together.IVoicesClient.g.cs
+++ b/src/libs/Together/Generated/Together.IVoicesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IVoicesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.IVolumesClient.g.cs b/src/libs/Together/Generated/Together.IVolumesClient.g.cs
index 76431ab..27f4fbd 100644
--- a/src/libs/Together/Generated/Together.IVolumesClient.g.cs
+++ b/src/libs/Together/Generated/Together.IVolumesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IVolumesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
}
diff --git a/src/libs/Together/Generated/Together.ImagesClient.CreateImagesGenerations.g.cs b/src/libs/Together/Generated/Together.ImagesClient.CreateImagesGenerations.g.cs
index 1a24835..22bfb36 100644
--- a/src/libs/Together/Generated/Together.ImagesClient.CreateImagesGenerations.g.cs
+++ b/src/libs/Together/Generated/Together.ImagesClient.CreateImagesGenerations.g.cs
@@ -82,7 +82,7 @@ partial void ProcessCreateImagesGenerationsResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -131,7 +131,7 @@ partial void ProcessCreateImagesGenerationsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.ImageResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.ImageResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -162,7 +162,7 @@ partial void ProcessCreateImagesGenerationsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.ImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.ImageResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.ImagesClient.g.cs b/src/libs/Together/Generated/Together.ImagesClient.g.cs
index 8f9f431..dec1315 100644
--- a/src/libs/Together/Generated/Together.ImagesClient.g.cs
+++ b/src/libs/Together/Generated/Together.ImagesClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class ImagesClient : global::Together.IImagesClient, globa
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.JobsClient.GetJob.g.cs b/src/libs/Together/Generated/Together.JobsClient.GetJob.g.cs
index e539428..eeb941d 100644
--- a/src/libs/Together/Generated/Together.JobsClient.GetJob.g.cs
+++ b/src/libs/Together/Generated/Together.JobsClient.GetJob.g.cs
@@ -111,7 +111,7 @@ partial void ProcessGetJobResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.JobInfoSuccessResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.JobInfoSuccessResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -142,7 +142,7 @@ partial void ProcessGetJobResponseContent(
).ConfigureAwait(false);
return
- await global::Together.JobInfoSuccessResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.JobInfoSuccessResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.JobsClient.ListJobs.g.cs b/src/libs/Together/Generated/Together.JobsClient.ListJobs.g.cs
index 3a64d98..1d76279 100644
--- a/src/libs/Together/Generated/Together.JobsClient.ListJobs.g.cs
+++ b/src/libs/Together/Generated/Together.JobsClient.ListJobs.g.cs
@@ -102,7 +102,7 @@ partial void ProcessListJobsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::Together.JobsInfoSuccessResponse.FromJson(__content, JsonSerializerContext) ??
+ global::Together.JobsInfoSuccessResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -133,7 +133,7 @@ partial void ProcessListJobsResponseContent(
).ConfigureAwait(false);
return
- await global::Together.JobsInfoSuccessResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::Together.JobsInfoSuccessResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/Together/Generated/Together.JobsClient.g.cs b/src/libs/Together/Generated/Together.JobsClient.g.cs
index b7d5b65..778ece6 100644
--- a/src/libs/Together/Generated/Together.JobsClient.g.cs
+++ b/src/libs/Together/Generated/Together.JobsClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class JobsClient : global::Together.IJobsClient, global::S
///
///
///
- public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Together.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
diff --git a/src/libs/Together/Generated/Together.JsonConverters.AllOf2.g.cs b/src/libs/Together/Generated/Together.JsonConverters.AllOf2.g.cs
index bb83e91..e28071d 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.AllOf2.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.AllOf2.g.cs
@@ -11,8 +11,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -27,27 +26,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
}
var __score0 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score0++;
- }
- }
- }
var __score1 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score1++;
- }
- }
- }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -62,9 +41,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -79,9 +56,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -97,9 +72,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -111,9 +84,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -138,20 +109,15 @@ public override void Write(
global::Together.AllOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsValue1)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
}
else if (value.IsValue2)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.AnyOf2.g.cs b/src/libs/Together/Generated/Together.JsonConverters.AnyOf2.g.cs
index 4c1a208..5ee31db 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.AnyOf2.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.AnyOf2.g.cs
@@ -11,8 +11,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -27,27 +26,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
}
var __score0 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score0++;
- }
- }
- }
var __score1 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score1++;
- }
- }
- }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -62,9 +41,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -79,9 +56,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -97,9 +72,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -111,9 +84,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -138,20 +109,15 @@ public override void Write(
global::Together.AnyOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsValue1)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
}
else if (value.IsValue2)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.AudioSpeechStreamResponse.g.cs b/src/libs/Together/Generated/Together.JsonConverters.AudioSpeechStreamResponse.g.cs
index e2af3bb..a0c24a1 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.AudioSpeechStreamResponse.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.AudioSpeechStreamResponse.g.cs
@@ -12,8 +12,7 @@ public class AudioSpeechStreamResponseJsonConverter : global::System.Text.Json.S
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -43,9 +42,7 @@ public class AudioSpeechStreamResponseJsonConverter : global::System.Text.Json.S
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioSpeechStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioSpeechStreamEvent).Name}");
- @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -58,9 +55,7 @@ public class AudioSpeechStreamResponseJsonConverter : global::System.Text.Json.S
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.StreamSentinel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.StreamSentinel).Name}");
- sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -75,9 +70,7 @@ public class AudioSpeechStreamResponseJsonConverter : global::System.Text.Json.S
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioSpeechStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioSpeechStreamEvent).Name}");
- @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -88,9 +81,7 @@ public class AudioSpeechStreamResponseJsonConverter : global::System.Text.Json.S
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.StreamSentinel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.StreamSentinel).Name}");
- sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -115,20 +106,15 @@ public override void Write(
global::Together.AudioSpeechStreamResponse value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsEvent)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioSpeechStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioSpeechStreamEvent).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Event!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Event, typeof(global::Together.AudioSpeechStreamEvent), options);
}
else if (value.IsSentinel)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.StreamSentinel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.StreamSentinel).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentinel!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentinel, typeof(global::Together.StreamSentinel), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.AudioTranscriptionResponse.g.cs b/src/libs/Together/Generated/Together.JsonConverters.AudioTranscriptionResponse.g.cs
index 4d74235..f3d23bf 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.AudioTranscriptionResponse.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.AudioTranscriptionResponse.g.cs
@@ -12,8 +12,7 @@ public class AudioTranscriptionResponseJsonConverter : global::System.Text.Json.
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -49,9 +48,7 @@ public class AudioTranscriptionResponseJsonConverter : global::System.Text.Json.
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranscriptionJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranscriptionJsonResponse).Name}");
- json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -64,9 +61,7 @@ public class AudioTranscriptionResponseJsonConverter : global::System.Text.Json.
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranscriptionVerboseJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranscriptionVerboseJsonResponse).Name}");
- verboseJson = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ verboseJson = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -81,9 +76,7 @@ public class AudioTranscriptionResponseJsonConverter : global::System.Text.Json.
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranscriptionJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranscriptionJsonResponse).Name}");
- json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -94,9 +87,7 @@ public class AudioTranscriptionResponseJsonConverter : global::System.Text.Json.
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranscriptionVerboseJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranscriptionVerboseJsonResponse).Name}");
- verboseJson = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ verboseJson = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -121,20 +112,15 @@ public override void Write(
global::Together.AudioTranscriptionResponse value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsJson)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranscriptionJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranscriptionJsonResponse).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Json!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Json, typeof(global::Together.AudioTranscriptionJsonResponse), options);
}
else if (value.IsVerboseJson)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranscriptionVerboseJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranscriptionVerboseJsonResponse).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.VerboseJson!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.VerboseJson, typeof(global::Together.AudioTranscriptionVerboseJsonResponse), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.AudioTranslationResponse.g.cs b/src/libs/Together/Generated/Together.JsonConverters.AudioTranslationResponse.g.cs
index 7f597ae..4fafd46 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.AudioTranslationResponse.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.AudioTranslationResponse.g.cs
@@ -12,8 +12,7 @@ public class AudioTranslationResponseJsonConverter : global::System.Text.Json.Se
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -48,9 +47,7 @@ public class AudioTranslationResponseJsonConverter : global::System.Text.Json.Se
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranslationJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranslationJsonResponse).Name}");
- json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -63,9 +60,7 @@ public class AudioTranslationResponseJsonConverter : global::System.Text.Json.Se
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranslationVerboseJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranslationVerboseJsonResponse).Name}");
- verboseJson = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ verboseJson = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -80,9 +75,7 @@ public class AudioTranslationResponseJsonConverter : global::System.Text.Json.Se
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranslationJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranslationJsonResponse).Name}");
- json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -93,9 +86,7 @@ public class AudioTranslationResponseJsonConverter : global::System.Text.Json.Se
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranslationVerboseJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranslationVerboseJsonResponse).Name}");
- verboseJson = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ verboseJson = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -120,20 +111,15 @@ public override void Write(
global::Together.AudioTranslationResponse value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsJson)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranslationJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranslationJsonResponse).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Json!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Json, typeof(global::Together.AudioTranslationJsonResponse), options);
}
else if (value.IsVerboseJson)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.AudioTranslationVerboseJsonResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.AudioTranslationVerboseJsonResponse).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.VerboseJson!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.VerboseJson, typeof(global::Together.AudioTranslationVerboseJsonResponse), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionMessageParam.g.cs b/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionMessageParam.g.cs
index a6b0136..b6ef085 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionMessageParam.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionMessageParam.g.cs
@@ -12,8 +12,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -68,9 +67,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionSystemMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionSystemMessageParam).Name}");
- system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -83,9 +80,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionUserMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionUserMessageParam).Name}");
- user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -98,9 +93,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionAssistantMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionAssistantMessageParam).Name}");
- assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -113,9 +106,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionToolMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionToolMessageParam).Name}");
- tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -128,9 +119,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionFunctionMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionFunctionMessageParam).Name}");
- function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -145,9 +134,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionSystemMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionSystemMessageParam).Name}");
- system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -158,9 +145,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionUserMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionUserMessageParam).Name}");
- user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -171,9 +156,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionAssistantMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionAssistantMessageParam).Name}");
- assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -184,9 +167,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionToolMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionToolMessageParam).Name}");
- tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -197,9 +178,7 @@ public class ChatCompletionMessageParamJsonConverter : global::System.Text.Json.
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionFunctionMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionFunctionMessageParam).Name}");
- function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -230,38 +209,27 @@ public override void Write(
global::Together.ChatCompletionMessageParam value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsSystem)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionSystemMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionSystemMessageParam).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.System!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.System, typeof(global::Together.ChatCompletionSystemMessageParam), options);
}
else if (value.IsUser)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionUserMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionUserMessageParam).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.User!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.User, typeof(global::Together.ChatCompletionUserMessageParam), options);
}
else if (value.IsAssistant)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionAssistantMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionAssistantMessageParam).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Assistant!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Assistant, typeof(global::Together.ChatCompletionAssistantMessageParam), options);
}
else if (value.IsTool)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionToolMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionToolMessageParam).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool, typeof(global::Together.ChatCompletionToolMessageParam), options);
}
else if (value.IsFunction)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionFunctionMessageParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionFunctionMessageParam).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeof(global::Together.ChatCompletionFunctionMessageParam), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionStream.g.cs b/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionStream.g.cs
index 817cee3..41ea792 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionStream.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionStream.g.cs
@@ -12,8 +12,7 @@ public class ChatCompletionStreamJsonConverter : global::System.Text.Json.Serial
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -43,9 +42,7 @@ public class ChatCompletionStreamJsonConverter : global::System.Text.Json.Serial
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionEvent).Name}");
- @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -58,9 +55,7 @@ public class ChatCompletionStreamJsonConverter : global::System.Text.Json.Serial
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.StreamSentinel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.StreamSentinel).Name}");
- sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -75,9 +70,7 @@ public class ChatCompletionStreamJsonConverter : global::System.Text.Json.Serial
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionEvent).Name}");
- @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -88,9 +81,7 @@ public class ChatCompletionStreamJsonConverter : global::System.Text.Json.Serial
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.StreamSentinel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.StreamSentinel).Name}");
- sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -115,20 +106,15 @@ public override void Write(
global::Together.ChatCompletionStream value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsEvent)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ChatCompletionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ChatCompletionEvent).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Event!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Event, typeof(global::Together.ChatCompletionEvent), options);
}
else if (value.IsSentinel)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.StreamSentinel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.StreamSentinel).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentinel!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentinel, typeof(global::Together.StreamSentinel), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionUserMessageContent.g.cs b/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionUserMessageContent.g.cs
index f2e5609..2760a9f 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionUserMessageContent.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.ChatCompletionUserMessageContent.g.cs
@@ -12,8 +12,7 @@ public class ChatCompletionUserMessageContentJsonConverter : global::System.Text
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -28,27 +27,7 @@ public class ChatCompletionUserMessageContentJsonConverter : global::System.Text
}
var __score0 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(string), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score0++;
- }
- }
- }
var __score1 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList>), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score1++;
- }
- }
- }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -63,9 +42,7 @@ public class ChatCompletionUserMessageContentJsonConverter : global::System.Text
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
- @string = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ @string = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -80,9 +57,7 @@ public class ChatCompletionUserMessageContentJsonConverter : global::System.Text
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList>), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo>> ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList>).Name}");
- multimodal = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ multimodal = global::System.Text.Json.JsonSerializer.Deserialize>>(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -98,9 +73,7 @@ public class ChatCompletionUserMessageContentJsonConverter : global::System.Text
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
- @string = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ @string = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -112,9 +85,7 @@ public class ChatCompletionUserMessageContentJsonConverter : global::System.Text
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList>), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo>> ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList>).Name}");
- multimodal = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ multimodal = global::System.Text.Json.JsonSerializer.Deserialize>>(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -139,20 +110,15 @@ public override void Write(
global::Together.ChatCompletionUserMessageContent value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsString)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.String!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.String, typeof(string), options);
}
else if (value.IsMultimodal)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList>), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo>?> ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList>).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Multimodal!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Multimodal, typeof(global::System.Collections.Generic.IList>), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.CompletionStream.g.cs b/src/libs/Together/Generated/Together.JsonConverters.CompletionStream.g.cs
index 2e0c7ab..f00531b 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.CompletionStream.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.CompletionStream.g.cs
@@ -12,8 +12,7 @@ public class CompletionStreamJsonConverter : global::System.Text.Json.Serializat
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -43,9 +42,7 @@ public class CompletionStreamJsonConverter : global::System.Text.Json.Serializat
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.CompletionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.CompletionEvent).Name}");
- @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -58,9 +55,7 @@ public class CompletionStreamJsonConverter : global::System.Text.Json.Serializat
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.StreamSentinel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.StreamSentinel).Name}");
- sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -75,9 +70,7 @@ public class CompletionStreamJsonConverter : global::System.Text.Json.Serializat
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.CompletionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.CompletionEvent).Name}");
- @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ @event = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -88,9 +81,7 @@ public class CompletionStreamJsonConverter : global::System.Text.Json.Serializat
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.StreamSentinel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.StreamSentinel).Name}");
- sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ sentinel = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -115,20 +106,15 @@ public override void Write(
global::Together.CompletionStream value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsEvent)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.CompletionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.CompletionEvent).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Event!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Event, typeof(global::Together.CompletionEvent), options);
}
else if (value.IsSentinel)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.StreamSentinel), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.StreamSentinel).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentinel!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentinel, typeof(global::Together.StreamSentinel), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.DataItem3.g.cs b/src/libs/Together/Generated/Together.JsonConverters.DataItem3.g.cs
index 2a4d514..6d8f80b 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.DataItem3.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.DataItem3.g.cs
@@ -12,8 +12,7 @@ public class DataItem3JsonConverter : global::System.Text.Json.Serialization.Jso
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -47,9 +46,7 @@ public class DataItem3JsonConverter : global::System.Text.Json.Serialization.Jso
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ImageResponseDataB64), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ImageResponseDataB64).Name}");
- b64Json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ b64Json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -62,9 +59,7 @@ public class DataItem3JsonConverter : global::System.Text.Json.Serialization.Jso
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ImageResponseDataUrl), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ImageResponseDataUrl).Name}");
- url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -79,9 +74,7 @@ public class DataItem3JsonConverter : global::System.Text.Json.Serialization.Jso
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ImageResponseDataB64), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ImageResponseDataB64).Name}");
- b64Json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ b64Json = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -92,9 +85,7 @@ public class DataItem3JsonConverter : global::System.Text.Json.Serialization.Jso
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ImageResponseDataUrl), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ImageResponseDataUrl).Name}");
- url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -119,20 +110,15 @@ public override void Write(
global::Together.DataItem3 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsB64Json)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ImageResponseDataB64), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ImageResponseDataB64).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.B64Json!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.B64Json, typeof(global::Together.ImageResponseDataB64), options);
}
else if (value.IsUrl)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Together.ImageResponseDataUrl), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Together.ImageResponseDataUrl).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Url!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Url, typeof(global::Together.ImageResponseDataUrl), options);
}
}
}
diff --git a/src/libs/Together/Generated/Together.JsonConverters.Error.g.cs b/src/libs/Together/Generated/Together.JsonConverters.Error.g.cs
index 25cb652..398d146 100644
--- a/src/libs/Together/Generated/Together.JsonConverters.Error.g.cs
+++ b/src/libs/Together/Generated/Together.JsonConverters.Error.g.cs
@@ -12,8 +12,7 @@ public class ErrorJsonConverter : global::System.Text.Json.Serialization.JsonCon
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -28,27 +27,7 @@ public class ErrorJsonConverter : global::System.Text.Json.Serialization.JsonCon
}
var __score0 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(string), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score0++;
- }
- }
- }
var __score1 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(object), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score1++;
- }
- }
- }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -63,9 +42,7 @@ public class ErrorJsonConverter : global::System.Text.Json.Serialization.JsonCon
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
- errorVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ errorVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -80,9 +57,7 @@ public class ErrorJsonConverter : global::System.Text.Json.Serialization.JsonCon
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo