diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AllOf.2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AllOf.2.g.cs
index 7a432782..ee226658 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AllOf.2.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AllOf.2.g.cs
@@ -6,7 +6,7 @@ namespace tryAGI.OpenAI
///
///
///
- public readonly partial struct AllOf : global::System.IEquatable>
+ public readonly partial struct AllOf<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2> : global::System.IEquatable>
{
///
///
@@ -105,9 +105,9 @@ Value1 as object
Value2?.ToString()
;
- private static bool RequiresValue() => RequirementCache.Value;
+ private static bool RequiresValue<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] TValue>() => RequirementCache.Value;
- private static bool DetermineRequiresValue(global::System.Type type)
+ private static bool DetermineRequiresValue([global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] global::System.Type type)
{
if (global::System.Nullable.GetUnderlyingType(type) != null)
{
@@ -138,7 +138,7 @@ private static bool DetermineRequiresValue(global::System.Type type)
return false;
}
- private static class RequirementCache
+ private static class RequirementCache<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] TValue>
{
public static readonly bool Value = DetermineRequiresValue(typeof(TValue));
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CancelARun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CancelARun.g.cs
index 0576647e..81b9da77 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CancelARun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CancelARun.g.cs
@@ -113,7 +113,7 @@ partial void ProcessCancelARunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -143,7 +143,7 @@ partial void ProcessCancelARunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateMessage.g.cs
index 69b964fb..03a48693 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateMessage.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateMessage.g.cs
@@ -72,7 +72,7 @@ partial void ProcessCreateMessageResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -122,7 +122,7 @@ partial void ProcessCreateMessageResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessCreateMessageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateRun.g.cs
index f2fae007..e2b58216 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateRun.g.cs
@@ -80,7 +80,7 @@ partial void ProcessCreateRunResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -131,7 +131,7 @@ partial void ProcessCreateRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -161,7 +161,7 @@ partial void ProcessCreateRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThread.g.cs
index 95ea9919..af0cc00c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThread.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThread.g.cs
@@ -67,7 +67,7 @@ partial void ProcessCreateThreadResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,7 +116,7 @@ partial void ProcessCreateThreadResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessCreateThreadResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThreadAndRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThreadAndRun.g.cs
index 9d276d71..ed1d5d9e 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThreadAndRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.CreateThreadAndRun.g.cs
@@ -67,7 +67,7 @@ partial void ProcessCreateThreadAndRunResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,7 +116,7 @@ partial void ProcessCreateThreadAndRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessCreateThreadAndRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteMessage.g.cs
index 48b21ecf..b4c1b5b0 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteMessage.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteMessage.g.cs
@@ -113,7 +113,7 @@ partial void ProcessDeleteMessageResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeleteMessageResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.DeleteMessageResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -143,7 +143,7 @@ partial void ProcessDeleteMessageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteMessageResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteMessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteThread.g.cs
index 8d8c1a12..7ea7d5cd 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteThread.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.DeleteThread.g.cs
@@ -107,7 +107,7 @@ partial void ProcessDeleteThreadResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeleteThreadResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.DeleteThreadResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessDeleteThreadResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteThreadResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteThreadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListMessages.g.cs
index a4abeac6..71150281 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListMessages.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListMessages.g.cs
@@ -148,7 +148,7 @@ partial void ProcessListMessagesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListMessagesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListMessagesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -178,7 +178,7 @@ partial void ProcessListMessagesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListMessagesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListMessagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRunSteps.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRunSteps.g.cs
index 7a716e59..a549dbd0 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRunSteps.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRunSteps.g.cs
@@ -154,7 +154,7 @@ partial void ProcessListRunStepsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListRunStepsResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListRunStepsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -184,7 +184,7 @@ partial void ProcessListRunStepsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListRunStepsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListRunStepsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRuns.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRuns.g.cs
index 0b93edf5..e232953e 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRuns.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ListRuns.g.cs
@@ -141,7 +141,7 @@ partial void ProcessListRunsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListRunsResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListRunsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -171,7 +171,7 @@ partial void ProcessListRunsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListRunsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListRunsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyMessage.g.cs
index b6f65fd2..4bd99142 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyMessage.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyMessage.g.cs
@@ -77,7 +77,7 @@ partial void ProcessModifyMessageResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -128,7 +128,7 @@ partial void ProcessModifyMessageResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -158,7 +158,7 @@ partial void ProcessModifyMessageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyRun.g.cs
index a8c024a4..14d7f144 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyRun.g.cs
@@ -77,7 +77,7 @@ partial void ProcessModifyRunResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -128,7 +128,7 @@ partial void ProcessModifyRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -158,7 +158,7 @@ partial void ProcessModifyRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyThread.g.cs
index fa0089e6..251ef825 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyThread.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.ModifyThread.g.cs
@@ -72,7 +72,7 @@ partial void ProcessModifyThreadResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -122,7 +122,7 @@ partial void ProcessModifyThreadResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessModifyThreadResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveMessage.g.cs
index 51afa83f..982c3362 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveMessage.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveMessage.g.cs
@@ -113,7 +113,7 @@ partial void ProcessRetrieveMessageResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -143,7 +143,7 @@ partial void ProcessRetrieveMessageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveRun.g.cs
index 2e83e3f0..41de1927 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveRun.g.cs
@@ -113,7 +113,7 @@ partial void ProcessRetrieveRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -143,7 +143,7 @@ partial void ProcessRetrieveRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveRunStep.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveRunStep.g.cs
index 02808420..5a0b3ddb 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveRunStep.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveRunStep.g.cs
@@ -128,7 +128,7 @@ partial void ProcessRetrieveRunStepResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RunStepObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.RunStepObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -158,7 +158,7 @@ partial void ProcessRetrieveRunStepResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunStepObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunStepObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveThread.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveThread.g.cs
index 49d72197..05cb1af0 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveThread.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.RetrieveThread.g.cs
@@ -107,7 +107,7 @@ partial void ProcessRetrieveThreadResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessRetrieveThreadResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.SubmitToolOutputsToRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.SubmitToolOutputsToRun.g.cs
index 3199079f..ded65c00 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.SubmitToolOutputsToRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.SubmitToolOutputsToRun.g.cs
@@ -77,7 +77,7 @@ partial void ProcessSubmitToolOutputsToRunResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -128,7 +128,7 @@ partial void ProcessSubmitToolOutputsToRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -158,7 +158,7 @@ partial void ProcessSubmitToolOutputsToRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.g.cs
index 2c5a65ae..35952340 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AssistantsClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class AssistantsClient : global::tryAGI.OpenAI.IAssistants
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeech.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeech.g.cs
index 0e0722d7..7ba53ce0 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeech.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateSpeech.g.cs
@@ -63,7 +63,7 @@ partial void ProcessCreateSpeechResponse(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -137,7 +137,7 @@ partial void ProcessCreateSpeechResponse(
yield break;
}
- var __streamedResponse = global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent.FromJson(__content, JsonSerializerOptions) ??
+ var __streamedResponse = global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent.FromJson(__content, JsonSerializerContext) ??
throw new global::tryAGI.OpenAI.ApiException(
message: $"Response deserialization failed for \"{__content}\" ",
statusCode: __response.StatusCode)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscription.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscription.g.cs
index 36b0e48c..6630b944 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscription.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscription.g.cs
@@ -212,7 +212,7 @@ partial void ProcessCreateTranscriptionResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.OneOf.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.OneOf.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -242,7 +242,7 @@ partial void ProcessCreateTranscriptionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscriptionAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscriptionAsStream.g.cs
index 23442070..c2610081 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscriptionAsStream.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranscriptionAsStream.g.cs
@@ -232,7 +232,7 @@ partial void ProcessCreateTranscriptionAsStreamResponse(
yield break;
}
- var __streamedResponse = global::tryAGI.OpenAI.CreateTranscriptionResponseStreamEvent.FromJson(__content, JsonSerializerOptions) ??
+ var __streamedResponse = global::tryAGI.OpenAI.CreateTranscriptionResponseStreamEvent.FromJson(__content, JsonSerializerContext) ??
throw new global::tryAGI.OpenAI.ApiException(
message: $"Response deserialization failed for \"{__content}\" ",
statusCode: __response.StatusCode)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranslation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranslation.g.cs
index 8e759fc8..0eb34ecd 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranslation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateTranslation.g.cs
@@ -145,7 +145,7 @@ partial void ProcessCreateTranslationResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.OneOf.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.OneOf.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -175,7 +175,7 @@ partial void ProcessCreateTranslationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoice.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoice.g.cs
index c8d7a022..11482e3c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoice.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoice.g.cs
@@ -129,7 +129,7 @@ partial void ProcessCreateVoiceResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.VoiceResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.VoiceResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessCreateVoiceResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoiceConsent.g.cs
index 63a062f1..3319c3c3 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoiceConsent.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.CreateVoiceConsent.g.cs
@@ -129,7 +129,7 @@ partial void ProcessCreateVoiceConsentResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessCreateVoiceConsentResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.DeleteVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.DeleteVoiceConsent.g.cs
index afbd49e8..24810a8b 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.DeleteVoiceConsent.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.DeleteVoiceConsent.g.cs
@@ -109,7 +109,7 @@ partial void ProcessDeleteVoiceConsentResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.VoiceConsentDeletedResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.VoiceConsentDeletedResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessDeleteVoiceConsentResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentDeletedResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.ListVoiceConsents.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.ListVoiceConsents.g.cs
index c34d170e..bd642e22 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.ListVoiceConsents.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.ListVoiceConsents.g.cs
@@ -121,7 +121,7 @@ partial void ProcessListVoiceConsentsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.VoiceConsentListResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.VoiceConsentListResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -151,7 +151,7 @@ partial void ProcessListVoiceConsentsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentListResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.RetrieveVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.RetrieveVoiceConsent.g.cs
index 610a5a34..fc696f5c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.RetrieveVoiceConsent.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.RetrieveVoiceConsent.g.cs
@@ -109,7 +109,7 @@ partial void ProcessRetrieveVoiceConsentResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessRetrieveVoiceConsentResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.UpdateVoiceConsent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.UpdateVoiceConsent.g.cs
index b0f25b9d..da60fced 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.UpdateVoiceConsent.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.UpdateVoiceConsent.g.cs
@@ -74,7 +74,7 @@ partial void ProcessUpdateVoiceConsentResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -124,7 +124,7 @@ partial void ProcessUpdateVoiceConsentResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -154,7 +154,7 @@ partial void ProcessUpdateVoiceConsentResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.g.cs
index 0eeeb1c3..eda5a4ad 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AudioClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class AudioClient : global::tryAGI.OpenAI.IAudioClient, gl
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.ListAuditLogs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.ListAuditLogs.g.cs
index 86cc2c88..44cefa6a 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.ListAuditLogs.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.ListAuditLogs.g.cs
@@ -171,7 +171,7 @@ partial void ProcessListAuditLogsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListAuditLogsResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListAuditLogsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -201,7 +201,7 @@ partial void ProcessListAuditLogsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListAuditLogsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListAuditLogsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.g.cs
index 948afba2..0cc23501 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AuditLogsClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class AuditLogsClient : global::tryAGI.OpenAI.IAuditLogsCl
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CancelBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CancelBatch.g.cs
index 0a53a20c..aa1ec067 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CancelBatch.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CancelBatch.g.cs
@@ -107,7 +107,7 @@ partial void ProcessCancelBatchResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Batch.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Batch.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessCancelBatchResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CreateBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CreateBatch.g.cs
index 2219a41b..98a2004f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CreateBatch.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.CreateBatch.g.cs
@@ -67,7 +67,7 @@ partial void ProcessCreateBatchResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,7 +116,7 @@ partial void ProcessCreateBatchResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Batch.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Batch.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessCreateBatchResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.ListBatches.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.ListBatches.g.cs
index eac80c86..3d55fda3 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.ListBatches.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.ListBatches.g.cs
@@ -119,7 +119,7 @@ partial void ProcessListBatchesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListBatchesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListBatchesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -149,7 +149,7 @@ partial void ProcessListBatchesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListBatchesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListBatchesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.RetrieveBatch.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.RetrieveBatch.g.cs
index 8470a74a..24df9933 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.RetrieveBatch.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.RetrieveBatch.g.cs
@@ -107,7 +107,7 @@ partial void ProcessRetrieveBatchResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Batch.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Batch.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessRetrieveBatchResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.g.cs
index c5a798dc..94d76307 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.BatchClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class BatchClient : global::tryAGI.OpenAI.IBatchClient, gl
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateCertificatesForOrganization.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateCertificatesForOrganization.g.cs
index df97d7ed..c1674258 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateCertificatesForOrganization.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateCertificatesForOrganization.g.cs
@@ -68,7 +68,7 @@ partial void ProcessActivateCertificatesForOrganizationResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -117,7 +117,7 @@ partial void ProcessActivateCertificatesForOrganizationResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessActivateCertificatesForOrganizationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateCertificatesForProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateCertificatesForProject.g.cs
index e9e7aa82..01094792 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateCertificatesForProject.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ActivateCertificatesForProject.g.cs
@@ -73,7 +73,7 @@ partial void ProcessActivateCertificatesForProjectResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -123,7 +123,7 @@ partial void ProcessActivateCertificatesForProjectResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessActivateCertificatesForProjectResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateCertificatesForOrganization.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateCertificatesForOrganization.g.cs
index 27461577..48a1a445 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateCertificatesForOrganization.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateCertificatesForOrganization.g.cs
@@ -68,7 +68,7 @@ partial void ProcessDeactivateCertificatesForOrganizationResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -117,7 +117,7 @@ partial void ProcessDeactivateCertificatesForOrganizationResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessDeactivateCertificatesForOrganizationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateCertificatesForProject.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateCertificatesForProject.g.cs
index c5728003..33366ec8 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateCertificatesForProject.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeactivateCertificatesForProject.g.cs
@@ -73,7 +73,7 @@ partial void ProcessDeactivateCertificatesForProjectResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -123,7 +123,7 @@ partial void ProcessDeactivateCertificatesForProjectResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessDeactivateCertificatesForProjectResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeleteCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeleteCertificate.g.cs
index 44fbd66b..062c3397 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeleteCertificate.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.DeleteCertificate.g.cs
@@ -108,7 +108,7 @@ partial void ProcessDeleteCertificateResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeleteCertificateResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.DeleteCertificateResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessDeleteCertificateResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteCertificateResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteCertificateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.GetCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.GetCertificate.g.cs
index ae26b5d4..550e96da 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.GetCertificate.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.GetCertificate.g.cs
@@ -117,7 +117,7 @@ partial void ProcessGetCertificateResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Certificate.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Certificate.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessGetCertificateResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListOrganizationCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListOrganizationCertificates.g.cs
index eadb73b4..7ba1402c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListOrganizationCertificates.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListOrganizationCertificates.g.cs
@@ -128,7 +128,7 @@ partial void ProcessListOrganizationCertificatesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -158,7 +158,7 @@ partial void ProcessListOrganizationCertificatesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListProjectCertificates.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListProjectCertificates.g.cs
index 9176ed0e..dd339511 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListProjectCertificates.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ListProjectCertificates.g.cs
@@ -134,7 +134,7 @@ partial void ProcessListProjectCertificatesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -164,7 +164,7 @@ partial void ProcessListProjectCertificatesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ModifyCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ModifyCertificate.g.cs
index d3a89e27..0f231878 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ModifyCertificate.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.ModifyCertificate.g.cs
@@ -72,7 +72,7 @@ partial void ProcessModifyCertificateResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -122,7 +122,7 @@ partial void ProcessModifyCertificateResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Certificate.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Certificate.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessModifyCertificateResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.UploadCertificate.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.UploadCertificate.g.cs
index d4688500..dac273df 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.UploadCertificate.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.UploadCertificate.g.cs
@@ -68,7 +68,7 @@ partial void ProcessUploadCertificateResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -117,7 +117,7 @@ partial void ProcessUploadCertificateResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Certificate.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Certificate.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessUploadCertificateResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.g.cs
index c7b29a1b..ec9262f9 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CertificatesClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class CertificatesClient : global::tryAGI.OpenAI.ICertific
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletion.g.cs
index 512f186c..31bb6fc5 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletion.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletion.g.cs
@@ -78,7 +78,7 @@ partial void ProcessCreateChatCompletionResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -127,7 +127,7 @@ partial void ProcessCreateChatCompletionResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -157,7 +157,7 @@ partial void ProcessCreateChatCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletionAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletionAsStream.g.cs
index 753d0523..f4854ed0 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletionAsStream.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.CreateChatCompletionAsStream.g.cs
@@ -73,7 +73,7 @@ partial void ProcessCreateChatCompletionAsStreamResponse(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -147,7 +147,7 @@ partial void ProcessCreateChatCompletionAsStreamResponse(
yield break;
}
- var __streamedResponse = global::tryAGI.OpenAI.CreateChatCompletionStreamResponse.FromJson(__content, JsonSerializerOptions) ??
+ var __streamedResponse = global::tryAGI.OpenAI.CreateChatCompletionStreamResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::tryAGI.OpenAI.ApiException(
message: $"Response deserialization failed for \"{__content}\" ",
statusCode: __response.StatusCode)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.DeleteChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.DeleteChatCompletion.g.cs
index d181e736..57895fb2 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.DeleteChatCompletion.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.DeleteChatCompletion.g.cs
@@ -108,7 +108,7 @@ partial void ProcessDeleteChatCompletionResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ChatCompletionDeleted.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ChatCompletionDeleted.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessDeleteChatCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ChatCompletionDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ChatCompletionDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletion.g.cs
index 7b644d62..adfd922a 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletion.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatCompletion.g.cs
@@ -108,7 +108,7 @@ partial void ProcessGetChatCompletionResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessGetChatCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatMessages.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatMessages.g.cs
index f305dc2e..9780cf83 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatMessages.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.GetChatMessages.g.cs
@@ -136,7 +136,7 @@ partial void ProcessGetChatMessagesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ChatCompletionMessageList.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ChatCompletionMessageList.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -166,7 +166,7 @@ partial void ProcessGetChatMessagesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ChatCompletionMessageList.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ChatCompletionMessageList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.ListChatCompletions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.ListChatCompletions.g.cs
index 42418ee6..1c400363 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.ListChatCompletions.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.ListChatCompletions.g.cs
@@ -143,7 +143,7 @@ partial void ProcessListChatCompletionsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ChatCompletionList.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ChatCompletionList.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -173,7 +173,7 @@ partial void ProcessListChatCompletionsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ChatCompletionList.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ChatCompletionList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.UpdateChatCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.UpdateChatCompletion.g.cs
index 5c2b0f14..fe57d53c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.UpdateChatCompletion.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.UpdateChatCompletion.g.cs
@@ -74,7 +74,7 @@ partial void ProcessUpdateChatCompletionResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -124,7 +124,7 @@ partial void ProcessUpdateChatCompletionResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -154,7 +154,7 @@ partial void ProcessUpdateChatCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.g.cs
index 258bc9be..ade1fbfe 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ChatClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class ChatClient : global::tryAGI.OpenAI.IChatClient, glob
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.CreateCompletion.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.CreateCompletion.g.cs
index cc814a51..755e6263 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.CreateCompletion.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.CreateCompletion.g.cs
@@ -68,7 +68,7 @@ partial void ProcessCreateCompletionResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -117,7 +117,7 @@ partial void ProcessCreateCompletionResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.CreateCompletionResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.CreateCompletionResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessCreateCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.g.cs
index 0d17501f..c0e74566 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.CompletionsClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class CompletionsClient : global::tryAGI.OpenAI.ICompletio
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateAConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateAConversation.g.cs
index c06cff96..4e112323 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateAConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateAConversation.g.cs
@@ -67,7 +67,7 @@ partial void ProcessCreateAConversationResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,7 +116,7 @@ partial void ProcessCreateAConversationResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessCreateAConversationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateItems.g.cs
index 958238fd..4bd1a20f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateItems.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateItems.g.cs
@@ -82,7 +82,7 @@ partial void ProcessCreateItemsResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -133,7 +133,7 @@ partial void ProcessCreateItemsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ConversationItemList.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ConversationItemList.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -163,7 +163,7 @@ partial void ProcessCreateItemsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationItemList.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationItemList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteAConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteAConversation.g.cs
index 75f155dc..db1bff46 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteAConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteAConversation.g.cs
@@ -109,7 +109,7 @@ partial void ProcessDeleteAConversationResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeletedConversationResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.DeletedConversationResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessDeleteAConversationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeletedConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeletedConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteAnItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteAnItem.g.cs
index 532fa1bf..597c9c5c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteAnItem.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteAnItem.g.cs
@@ -117,7 +117,7 @@ partial void ProcessDeleteAnItemResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessDeleteAnItemResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.ListItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.ListItems.g.cs
index a7810543..1a80d229 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.ListItems.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.ListItems.g.cs
@@ -141,7 +141,7 @@ partial void ProcessListItemsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ConversationItemList.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ConversationItemList.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -171,7 +171,7 @@ partial void ProcessListItemsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationItemList.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationItemList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.RetrieveAConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.RetrieveAConversation.g.cs
index 800554ab..ef7c512f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.RetrieveAConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.RetrieveAConversation.g.cs
@@ -109,7 +109,7 @@ partial void ProcessRetrieveAConversationResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessRetrieveAConversationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.RetrieveAnItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.RetrieveAnItem.g.cs
index 85596983..6ccdc8e8 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.RetrieveAnItem.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.RetrieveAnItem.g.cs
@@ -126,7 +126,7 @@ partial void ProcessRetrieveAnItemResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ConversationItem.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ConversationItem.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -156,7 +156,7 @@ partial void ProcessRetrieveAnItemResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationItem.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationItem.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateAConversation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateAConversation.g.cs
index 50e59d33..bf97ca38 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateAConversation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateAConversation.g.cs
@@ -74,7 +74,7 @@ partial void ProcessUpdateAConversationResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -124,7 +124,7 @@ partial void ProcessUpdateAConversationResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -154,7 +154,7 @@ partial void ProcessUpdateAConversationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.g.cs
index 8a765a19..ee4daf8b 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class ConversationsClient : global::tryAGI.OpenAI.IConvers
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.CreateEmbeddings.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.CreateEmbeddings.g.cs
index 3abc2971..67d6692e 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.CreateEmbeddings.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.CreateEmbeddings.g.cs
@@ -67,7 +67,7 @@ partial void ProcessCreateEmbeddingsResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,7 +116,7 @@ partial void ProcessCreateEmbeddingsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.CreateEmbeddingResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.CreateEmbeddingResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessCreateEmbeddingsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateEmbeddingResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateEmbeddingResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.g.cs
index 01d4c1cd..c407fc55 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EmbeddingsClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class EmbeddingsClient : global::tryAGI.OpenAI.IEmbeddings
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CancelEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CancelEvalRun.g.cs
index c3b7f3be..f145d47e 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CancelEvalRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CancelEvalRun.g.cs
@@ -113,7 +113,7 @@ partial void ProcessCancelEvalRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -143,7 +143,7 @@ partial void ProcessCancelEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEval.g.cs
index 9a5f29fb..f554900b 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEval.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEval.g.cs
@@ -71,7 +71,7 @@ partial void ProcessCreateEvalResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -120,7 +120,7 @@ partial void ProcessCreateEvalResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Eval.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Eval.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -150,7 +150,7 @@ partial void ProcessCreateEvalResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEvalRun.g.cs
index 898c1fc6..2380b553 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEvalRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.CreateEvalRun.g.cs
@@ -72,7 +72,7 @@ partial void ProcessCreateEvalRunResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -110,13 +110,13 @@ partial void ProcessCreateEvalRunResponseContent(
if (ReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::tryAGI.OpenAI.Error.FromJson(__content_400, JsonSerializerOptions);
+ __value_400 = global::tryAGI.OpenAI.Error.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::tryAGI.OpenAI.Error.FromJson(__content_400, JsonSerializerOptions);
+ __value_400 = global::tryAGI.OpenAI.Error.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -160,7 +160,7 @@ partial void ProcessCreateEvalRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -190,7 +190,7 @@ partial void ProcessCreateEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteAnEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteAnEval.g.cs
index 3aaaf755..f09497fa 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteAnEval.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteAnEval.g.cs
@@ -95,13 +95,13 @@ partial void ProcessDeleteAnEvalResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerOptions);
+ __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerOptions);
+ __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -145,7 +145,7 @@ partial void ProcessDeleteAnEvalResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeleteEvalResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.DeleteEvalResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -175,7 +175,7 @@ partial void ProcessDeleteAnEvalResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteEvalResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteEvalResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEvalRun.g.cs
index 566ede50..a4473895 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEvalRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.DeleteEvalRun.g.cs
@@ -101,13 +101,13 @@ partial void ProcessDeleteEvalRunResponseContent(
if (ReadResponseAsString)
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerOptions);
+ __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerContext);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerOptions);
+ __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
@@ -151,7 +151,7 @@ partial void ProcessDeleteEvalRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeleteEvalRunResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.DeleteEvalRunResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -181,7 +181,7 @@ partial void ProcessDeleteEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteEvalRunResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteEvalRunResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnEval.g.cs
index 0581c85f..7ca7bb3a 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnEval.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnEval.g.cs
@@ -107,7 +107,7 @@ partial void ProcessGetAnEvalResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Eval.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Eval.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessGetAnEvalResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnEvalRun.g.cs
index 60bf4370..8067c5ba 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnEvalRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnEvalRun.g.cs
@@ -113,7 +113,7 @@ partial void ProcessGetAnEvalRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -143,7 +143,7 @@ partial void ProcessGetAnEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnOutputItemOfAnEvalRun.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnOutputItemOfAnEvalRun.g.cs
index fb03b415..766f7cfc 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnOutputItemOfAnEvalRun.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetAnOutputItemOfAnEvalRun.g.cs
@@ -119,7 +119,7 @@ partial void ProcessGetAnOutputItemOfAnEvalRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.EvalRunOutputItem.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.EvalRunOutputItem.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -149,7 +149,7 @@ partial void ProcessGetAnOutputItemOfAnEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRunOutputItem.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRunOutputItem.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItems.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItems.g.cs
index dcd62888..62d249a9 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItems.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRunOutputItems.g.cs
@@ -147,7 +147,7 @@ partial void ProcessGetEvalRunOutputItemsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.EvalRunOutputItemList.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.EvalRunOutputItemList.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -177,7 +177,7 @@ partial void ProcessGetEvalRunOutputItemsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRunOutputItemList.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRunOutputItemList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRuns.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRuns.g.cs
index 6cbdd4f2..f8cdb148 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRuns.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.GetEvalRuns.g.cs
@@ -141,7 +141,7 @@ partial void ProcessGetEvalRunsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.EvalRunList.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.EvalRunList.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -171,7 +171,7 @@ partial void ProcessGetEvalRunsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRunList.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRunList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.ListEvals.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.ListEvals.g.cs
index 8789523c..4017e611 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.ListEvals.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.ListEvals.g.cs
@@ -137,7 +137,7 @@ partial void ProcessListEvalsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.EvalList.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.EvalList.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -167,7 +167,7 @@ partial void ProcessListEvalsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalList.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.UpdateAnEval.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.UpdateAnEval.g.cs
index dc45ea95..82afe30f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.UpdateAnEval.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.UpdateAnEval.g.cs
@@ -72,7 +72,7 @@ partial void ProcessUpdateAnEvalResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -122,7 +122,7 @@ partial void ProcessUpdateAnEvalResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Eval.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Eval.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessUpdateAnEvalResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.g.cs
index cea32ee8..dbb44bf2 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.EvalsClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class EvalsClient : global::tryAGI.OpenAI.IEvalsClient, gl
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DeleteFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DeleteFile.g.cs
index 2cdcf39e..7ff5a466 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DeleteFile.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.DeleteFile.g.cs
@@ -107,7 +107,7 @@ partial void ProcessDeleteFileResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeleteFileResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.DeleteFileResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessDeleteFileResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteFileResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteFileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.ListFiles.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.ListFiles.g.cs
index f17c3e63..47491f0f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.ListFiles.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.ListFiles.g.cs
@@ -135,7 +135,7 @@ partial void ProcessListFilesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListFilesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListFilesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -165,7 +165,7 @@ partial void ProcessListFilesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFilesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFilesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.RetrieveFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.RetrieveFile.g.cs
index ab799535..518dffe8 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.RetrieveFile.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.RetrieveFile.g.cs
@@ -107,7 +107,7 @@ partial void ProcessRetrieveFileResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.OpenAIFile.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.OpenAIFile.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessRetrieveFileResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.OpenAIFile.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.OpenAIFile.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.UploadFile.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.UploadFile.g.cs
index 89d8c8a3..3ae04f15 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.UploadFile.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.UploadFile.g.cs
@@ -145,7 +145,7 @@ partial void ProcessUploadFileResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.OpenAIFile.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.OpenAIFile.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -175,7 +175,7 @@ partial void ProcessUploadFileResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.OpenAIFile.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.OpenAIFile.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.g.cs
index 0941f6f6..e5d8828f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FilesClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class FilesClient : global::tryAGI.OpenAI.IFilesClient, gl
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CancelFineTuning.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CancelFineTuning.g.cs
index dfcaf6a7..a645093e 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CancelFineTuning.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CancelFineTuning.g.cs
@@ -109,7 +109,7 @@ partial void ProcessCancelFineTuningResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessCancelFineTuningResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateCheckpointPermissions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateCheckpointPermissions.g.cs
index f276d8b4..f5d3910b 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateCheckpointPermissions.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateCheckpointPermissions.g.cs
@@ -75,7 +75,7 @@ partial void ProcessCreateCheckpointPermissionsResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -125,7 +125,7 @@ partial void ProcessCreateCheckpointPermissionsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -155,7 +155,7 @@ partial void ProcessCreateCheckpointPermissionsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningJob.g.cs
index 44eae4e5..2b035003 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningJob.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.CreateFineTuningJob.g.cs
@@ -71,7 +71,7 @@ partial void ProcessCreateFineTuningJobResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -120,7 +120,7 @@ partial void ProcessCreateFineTuningJobResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -150,7 +150,7 @@ partial void ProcessCreateFineTuningJobResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.DeleteCheckpointPermission.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.DeleteCheckpointPermission.g.cs
index 0c7db079..92d83ecc 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.DeleteCheckpointPermission.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.DeleteCheckpointPermission.g.cs
@@ -118,7 +118,7 @@ partial void ProcessDeleteCheckpointPermissionResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessDeleteCheckpointPermissionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListCheckpointPermissions.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListCheckpointPermissions.g.cs
index 1850b8ef..517d3443 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListCheckpointPermissions.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListCheckpointPermissions.g.cs
@@ -144,7 +144,7 @@ partial void ProcessListCheckpointPermissionsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -174,7 +174,7 @@ partial void ProcessListCheckpointPermissionsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningCheckpoints.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningCheckpoints.g.cs
index a4c231c1..85bfc2b4 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningCheckpoints.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningCheckpoints.g.cs
@@ -127,7 +127,7 @@ partial void ProcessListFineTuningCheckpointsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -157,7 +157,7 @@ partial void ProcessListFineTuningCheckpointsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningEvents.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningEvents.g.cs
index 2cd35b85..d4635fdd 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningEvents.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningEvents.g.cs
@@ -127,7 +127,7 @@ partial void ProcessListFineTuningEventsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListFineTuningJobEventsResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListFineTuningJobEventsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -157,7 +157,7 @@ partial void ProcessListFineTuningEventsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFineTuningJobEventsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFineTuningJobEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningJobs.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningJobs.g.cs
index 4de95ba7..b8b35665 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningJobs.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ListFineTuningJobs.g.cs
@@ -126,7 +126,7 @@ partial void ProcessListFineTuningJobsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -156,7 +156,7 @@ partial void ProcessListFineTuningJobsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.PauseFineTuning.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.PauseFineTuning.g.cs
index f0ac19ef..1b012683 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.PauseFineTuning.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.PauseFineTuning.g.cs
@@ -109,7 +109,7 @@ partial void ProcessPauseFineTuningResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessPauseFineTuningResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ResumeFineTuning.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ResumeFineTuning.g.cs
index f7c610c5..249af772 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ResumeFineTuning.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ResumeFineTuning.g.cs
@@ -109,7 +109,7 @@ partial void ProcessResumeFineTuningResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessResumeFineTuningResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs
index b5b04d7a..226b712b 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RetrieveFineTuningJob.g.cs
@@ -110,7 +110,7 @@ partial void ProcessRetrieveFineTuningJobResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -140,7 +140,7 @@ partial void ProcessRetrieveFineTuningJobResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RunGrader.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RunGrader.g.cs
index e44fa7c4..9d1eb207 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RunGrader.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.RunGrader.g.cs
@@ -67,7 +67,7 @@ partial void ProcessRunGraderResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,7 +116,7 @@ partial void ProcessRunGraderResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RunGraderResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.RunGraderResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessRunGraderResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunGraderResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunGraderResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ValidateGrader.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ValidateGrader.g.cs
index f0ef3de8..9224ed6b 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ValidateGrader.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.ValidateGrader.g.cs
@@ -67,7 +67,7 @@ partial void ProcessValidateGraderResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,7 +116,7 @@ partial void ProcessValidateGraderResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ValidateGraderResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ValidateGraderResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessValidateGraderResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ValidateGraderResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ValidateGraderResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.g.cs
index 462859f9..30b27ddd 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.FineTuningClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class FineTuningClient : global::tryAGI.OpenAI.IFineTuning
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.AssignOrganizationRoleToGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.AssignOrganizationRoleToGroup.g.cs
index f74a8a45..9e4544bb 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.AssignOrganizationRoleToGroup.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.AssignOrganizationRoleToGroup.g.cs
@@ -72,7 +72,7 @@ partial void ProcessAssignOrganizationRoleToGroupResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -122,7 +122,7 @@ partial void ProcessAssignOrganizationRoleToGroupResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.GroupRoleAssignment.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.GroupRoleAssignment.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessAssignOrganizationRoleToGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupRoleAssignment.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupRoleAssignment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.ListGroupOrganizationRoleAssignments.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.ListGroupOrganizationRoleAssignments.g.cs
index aaf33abb..b16816f4 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.ListGroupOrganizationRoleAssignments.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.ListGroupOrganizationRoleAssignments.g.cs
@@ -130,7 +130,7 @@ partial void ProcessListGroupOrganizationRoleAssignmentsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RoleListResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.RoleListResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -160,7 +160,7 @@ partial void ProcessListGroupOrganizationRoleAssignmentsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RoleListResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RoleListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.UnassignOrganizationRoleFromGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.UnassignOrganizationRoleFromGroup.g.cs
index bd323dc8..f1f710e9 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.UnassignOrganizationRoleFromGroup.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.UnassignOrganizationRoleFromGroup.g.cs
@@ -113,7 +113,7 @@ partial void ProcessUnassignOrganizationRoleFromGroupResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -143,7 +143,7 @@ partial void ProcessUnassignOrganizationRoleFromGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.g.cs
index e0757a9f..e8a4c196 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupOrganizationRoleAssignmentsClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class GroupOrganizationRoleAssignmentsClient : global::try
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.AddGroupUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.AddGroupUser.g.cs
index c896b849..14163b74 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.AddGroupUser.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.AddGroupUser.g.cs
@@ -72,7 +72,7 @@ partial void ProcessAddGroupUserResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -122,7 +122,7 @@ partial void ProcessAddGroupUserResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.GroupUserAssignment.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.GroupUserAssignment.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessAddGroupUserResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupUserAssignment.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupUserAssignment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.ListGroupUsers.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.ListGroupUsers.g.cs
index 644fe8fb..85a75dc7 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.ListGroupUsers.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.ListGroupUsers.g.cs
@@ -134,7 +134,7 @@ partial void ProcessListGroupUsersResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.UserListResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.UserListResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -164,7 +164,7 @@ partial void ProcessListGroupUsersResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.UserListResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.UserListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.RemoveGroupUser.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.RemoveGroupUser.g.cs
index 1efe10c6..0550097f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.RemoveGroupUser.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.RemoveGroupUser.g.cs
@@ -113,7 +113,7 @@ partial void ProcessRemoveGroupUserResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.GroupUserDeletedResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.GroupUserDeletedResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -143,7 +143,7 @@ partial void ProcessRemoveGroupUserResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupUserDeletedResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupUserDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.g.cs
index 48e75c24..c636edde 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupUsersClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class GroupUsersClient : global::tryAGI.OpenAI.IGroupUsers
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.CreateGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.CreateGroup.g.cs
index 1aa3adc1..94c290d5 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.CreateGroup.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.CreateGroup.g.cs
@@ -67,7 +67,7 @@ partial void ProcessCreateGroupResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,7 +116,7 @@ partial void ProcessCreateGroupResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.GroupResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.GroupResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessCreateGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.DeleteGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.DeleteGroup.g.cs
index fe00be90..d9a77873 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.DeleteGroup.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.DeleteGroup.g.cs
@@ -107,7 +107,7 @@ partial void ProcessDeleteGroupResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.GroupDeletedResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.GroupDeletedResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessDeleteGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupDeletedResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.ListGroups.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.ListGroups.g.cs
index e996759c..49303374 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.ListGroups.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.ListGroups.g.cs
@@ -128,7 +128,7 @@ partial void ProcessListGroupsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.GroupListResource.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.GroupListResource.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -158,7 +158,7 @@ partial void ProcessListGroupsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupListResource.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.UpdateGroup.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.UpdateGroup.g.cs
index 0db07ef3..ba544ed4 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.UpdateGroup.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.UpdateGroup.g.cs
@@ -72,7 +72,7 @@ partial void ProcessUpdateGroupResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -122,7 +122,7 @@ partial void ProcessUpdateGroupResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.GroupResourceWithSuccess.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.GroupResourceWithSuccess.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessUpdateGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupResourceWithSuccess.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupResourceWithSuccess.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.g.cs
index b95fb924..be6e34e7 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.GroupsClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class GroupsClient : global::tryAGI.OpenAI.IGroupsClient,
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.g.cs
index 0eb84f76..fd59cb8d 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAssistantsClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IAssistantsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.g.cs
index 77faa7ee..4fd6c507 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAudioClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IAudioClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAuditLogsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAuditLogsClient.g.cs
index 53e78568..f5bb2439 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAuditLogsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IAuditLogsClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IAuditLogsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.g.cs
index 3e07f5b1..78e8675c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IBatchClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IBatchClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.g.cs
index 7f47da44..58665df0 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICertificatesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface ICertificatesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.g.cs
index d5f236ac..9b9e64f4 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IChatClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IChatClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICompletionsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICompletionsClient.g.cs
index 548bd1d0..f657ebaa 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICompletionsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ICompletionsClient.g.cs
@@ -37,7 +37,7 @@ public partial interface ICompletionsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.g.cs
index 40715284..833a97f5 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IConversationsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEmbeddingsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEmbeddingsClient.g.cs
index 211bf8de..599f4d96 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEmbeddingsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEmbeddingsClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IEmbeddingsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.g.cs
index 781968fa..dff056f9 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IEvalsClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IEvalsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.g.cs
index 81e1012e..9d41cc7c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFilesClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IFilesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.g.cs
index bb669d2c..c1e9e70d 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IFineTuningClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IFineTuningClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.g.cs
index e83cd4d1..1e926c20 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupOrganizationRoleAssignmentsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IGroupOrganizationRoleAssignmentsClient : global::Syste
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.g.cs
index cf439f48..01d49619 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupUsersClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IGroupUsersClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.g.cs
index d288957e..089922fc 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IGroupsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IGroupsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.g.cs
index 82a8ecc8..9930dcb0 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IImagesClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IImagesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.g.cs
index cbe4c689..b0d6c04b 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IInvitesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IInvitesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.g.cs
index 78f31f73..c77e2ace 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModelsClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IModelsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModerationsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModerationsClient.g.cs
index 30cf5665..0b8ed4c1 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModerationsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IModerationsClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IModerationsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.g.cs
index 0c31675e..942bcc7a 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IOpenAiClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IOpenAiClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.g.cs
index b365ee68..9ab126cd 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupRoleAssignmentsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IProjectGroupRoleAssignmentsClient : global::System.IDi
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.g.cs
index 7adeb7af..b7fef149 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectGroupsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IProjectGroupsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.g.cs
index e3725fbe..21522e23 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectUserRoleAssignmentsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IProjectUserRoleAssignmentsClient : global::System.IDis
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.g.cs
index ccd5ae70..e15480ee 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IProjectsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IProjectsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.g.cs
index 6870be21..1954db82 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRealtimeClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IRealtimeClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.g.cs
index fceef960..2eed6a2c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IResponsesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IResponsesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.g.cs
index b0b70be2..977bd1de 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IRolesClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IRolesClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.g.cs
index 2e3275c8..feaa9bcd 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ISkillsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface ISkillsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.g.cs
index 02e3f4b2..2caaf94b 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUploadsClient.g.cs
@@ -37,7 +37,7 @@ public partial interface IUploadsClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.g.cs
index fa87a6c8..11f6cf3e 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsageClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IUsageClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.g.cs
index 01107c9f..ad791362 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUserOrganizationRoleAssignmentsClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IUserOrganizationRoleAssignmentsClient : global::System
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.g.cs
index 693a3405..b26ec274 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IUsersClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IUsersClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.g.cs
index 7a485618..bc29852f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVectorStoresClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IVectorStoresClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.g.cs
index fd636bcc..7e63b1ed 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IVideosClient.g.cs
@@ -36,7 +36,7 @@ public partial interface IVideosClient : global::System.IDisposable
///
///
///
- global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; }
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImage.g.cs
index 3a72edc2..cc2fbbf2 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImage.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImage.g.cs
@@ -84,7 +84,7 @@ partial void ProcessCreateImageResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -133,7 +133,7 @@ partial void ProcessCreateImageResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -163,7 +163,7 @@ partial void ProcessCreateImageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageAsStream.g.cs
index c5d26833..a5775f60 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageAsStream.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageAsStream.g.cs
@@ -79,7 +79,7 @@ partial void ProcessCreateImageAsStreamResponse(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -153,7 +153,7 @@ partial void ProcessCreateImageAsStreamResponse(
yield break;
}
- var __streamedResponse = global::tryAGI.OpenAI.ImageGenStreamEvent.FromJson(__content, JsonSerializerOptions) ??
+ var __streamedResponse = global::tryAGI.OpenAI.ImageGenStreamEvent.FromJson(__content, JsonSerializerContext) ??
throw new global::tryAGI.OpenAI.ApiException(
message: $"Response deserialization failed for \"{__content}\" ",
statusCode: __response.StatusCode)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs
index 6c2bf253..b0ca87e4 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEdit.g.cs
@@ -238,7 +238,7 @@ partial void ProcessCreateImageEditResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -268,7 +268,7 @@ partial void ProcessCreateImageEditResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs
index d1c9c4d5..81c9c2fa 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageEditAsStream.g.cs
@@ -258,7 +258,7 @@ partial void ProcessCreateImageEditAsStreamResponse(
yield break;
}
- var __streamedResponse = global::tryAGI.OpenAI.ImageEditStreamEvent.FromJson(__content, JsonSerializerOptions) ??
+ var __streamedResponse = global::tryAGI.OpenAI.ImageEditStreamEvent.FromJson(__content, JsonSerializerContext) ??
throw new global::tryAGI.OpenAI.ApiException(
message: $"Response deserialization failed for \"{__content}\" ",
statusCode: __response.StatusCode)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageVariation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageVariation.g.cs
index cf80fd82..82760b64 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageVariation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.CreateImageVariation.g.cs
@@ -156,7 +156,7 @@ partial void ProcessCreateImageVariationResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -186,7 +186,7 @@ partial void ProcessCreateImageVariationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.g.cs
index 149e752e..2988a02e 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ImagesClient.g.cs
@@ -34,7 +34,7 @@ public sealed partial class ImagesClient : global::tryAGI.OpenAI.IImagesClient,
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.CreateInvite.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.CreateInvite.g.cs
index b2f34870..d32cc529 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.CreateInvite.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.CreateInvite.g.cs
@@ -67,7 +67,7 @@ partial void ProcessCreateInviteResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
- var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -116,7 +116,7 @@ partial void ProcessCreateInviteResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Invite.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Invite.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessCreateInviteResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Invite.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Invite.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.DeleteInvite.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.DeleteInvite.g.cs
index 84bdc9d4..f0098348 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.DeleteInvite.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.DeleteInvite.g.cs
@@ -107,7 +107,7 @@ partial void ProcessDeleteInviteResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.InviteDeleteResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.InviteDeleteResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessDeleteInviteResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.InviteDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.InviteDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.ListInvites.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.ListInvites.g.cs
index 55074d55..3993455a 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.ListInvites.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.ListInvites.g.cs
@@ -119,7 +119,7 @@ partial void ProcessListInvitesResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.InviteListResponse.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.InviteListResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -149,7 +149,7 @@ partial void ProcessListInvitesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.InviteListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.InviteListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.RetrieveInvite.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.RetrieveInvite.g.cs
index 9274ad2a..4dd72e14 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.RetrieveInvite.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.RetrieveInvite.g.cs
@@ -107,7 +107,7 @@ partial void ProcessRetrieveInviteResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.Invite.FromJson(__content, JsonSerializerOptions) ??
+ global::tryAGI.OpenAI.Invite.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -137,7 +137,7 @@ partial void ProcessRetrieveInviteResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Invite.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Invite.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.g.cs
index dab32686..67c7c47c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.InvitesClient.g.cs
@@ -33,7 +33,7 @@ public sealed partial class InvitesClient : global::tryAGI.OpenAI.IInvitesClient
///
///
///
- public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
///
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AllOf2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AllOf2.g.cs
index 65c51da1..799f1ca4 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AllOf2.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AllOf2.g.cs
@@ -3,7 +3,7 @@
namespace tryAGI.OpenAI.JsonConverters
{
///
- public class AllOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter>
+ public class AllOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2> : global::System.Text.Json.Serialization.JsonConverter>
{
///
public override global::tryAGI.OpenAI.AllOf Read(
@@ -11,7 +11,8 @@ 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));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -26,7 +27,27 @@ 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; }
@@ -41,7 +62,9 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -56,7 +79,9 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -72,7 +97,9 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -84,7 +111,9 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -109,15 +138,20 @@ public override void Write(
global::tryAGI.OpenAI.AllOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsValue1)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
+ 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);
}
else if (value.IsValue2)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
+ 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);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs
index 37dcf8d6..92e1eee0 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs
@@ -12,7 +12,8 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -64,7 +65,9 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitationBody).Name}");
+ fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -77,7 +80,9 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- urlCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitationBody).Name}");
+ urlCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -90,7 +95,9 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- containerFileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerFileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerFileCitationBody).Name}");
+ containerFileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -103,7 +110,9 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- filePath = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FilePath), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FilePath).Name}");
+ filePath = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -118,7 +127,9 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitationBody).Name}");
+ fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -129,7 +140,9 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
try
{
- urlCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitationBody).Name}");
+ urlCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -140,7 +153,9 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
try
{
- containerFileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerFileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerFileCitationBody).Name}");
+ containerFileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -151,7 +166,9 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
try
{
- filePath = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FilePath), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FilePath).Name}");
+ filePath = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -180,23 +197,32 @@ public override void Write(
global::tryAGI.OpenAI.Annotation value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsFileCitation)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation, typeof(global::tryAGI.OpenAI.FileCitationBody), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitationBody).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation!, typeInfo);
}
else if (value.IsUrlCitation)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.UrlCitation, typeof(global::tryAGI.OpenAI.UrlCitationBody), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitationBody).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.UrlCitation!, typeInfo);
}
else if (value.IsContainerFileCitation)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerFileCitation, typeof(global::tryAGI.OpenAI.ContainerFileCitationBody), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ContainerFileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ContainerFileCitationBody).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerFileCitation!, typeInfo);
}
else if (value.IsFilePath)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilePath, typeof(global::tryAGI.OpenAI.FilePath), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FilePath), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FilePath).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilePath!, typeInfo);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnnotationsItem3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnnotationsItem3.g.cs
index d3607c6e..9cd768c0 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnnotationsItem3.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnnotationsItem3.g.cs
@@ -12,7 +12,8 @@ public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serializat
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -44,7 +45,9 @@ public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serializat
{
try
{
- file = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileAnnotation).Name}");
+ file = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -57,7 +60,9 @@ public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serializat
{
try
{
- url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlAnnotation).Name}");
+ url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -72,7 +77,9 @@ public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serializat
{
try
{
- file = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileAnnotation).Name}");
+ file = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -83,7 +90,9 @@ public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serializat
try
{
- url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlAnnotation).Name}");
+ url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -108,15 +117,20 @@ public override void Write(
global::tryAGI.OpenAI.AnnotationsItem3 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsFile)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.File, typeof(global::tryAGI.OpenAI.FileAnnotation), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileAnnotation).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.File!, typeInfo);
}
else if (value.IsUrl)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Url, typeof(global::tryAGI.OpenAI.UrlAnnotation), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlAnnotation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlAnnotation).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Url!, typeInfo);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf2.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf2.g.cs
index 46cac4a3..e372fa11 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf2.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf2.g.cs
@@ -3,7 +3,7 @@
namespace tryAGI.OpenAI.JsonConverters
{
///
- public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter>
+ public class AnyOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2> : global::System.Text.Json.Serialization.JsonConverter>
{
///
public override global::tryAGI.OpenAI.AnyOf Read(
@@ -11,7 +11,8 @@ 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));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -26,7 +27,27 @@ 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; }
@@ -41,7 +62,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -56,7 +79,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -72,7 +97,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -84,7 +111,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -109,15 +138,20 @@ public override void Write(
global::tryAGI.OpenAI.AnyOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsValue1)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
+ 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);
}
else if (value.IsValue2)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
+ 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);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf3.g.cs
index 907fea92..05789cfd 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf3.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf3.g.cs
@@ -3,7 +3,7 @@
namespace tryAGI.OpenAI.JsonConverters
{
///
- public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter>
+ public class AnyOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T3> : global::System.Text.Json.Serialization.JsonConverter>
{
///
public override global::tryAGI.OpenAI.AnyOf Read(
@@ -11,7 +11,8 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -26,8 +27,38 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
}
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 __score2 = 0;
+ {
+ var __ti = typeInfoResolver.GetTypeInfo(typeof(T3), 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)) __score2++;
+ }
+ }
+ }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -44,7 +75,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -59,7 +92,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -74,7 +109,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -90,7 +127,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -102,7 +141,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ 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);
}
catch (global::System.Text.Json.JsonException)
{
@@ -114,7 +155,9 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -141,19 +184,26 @@ public override void Write(
global::tryAGI.OpenAI.AnyOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsValue1)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
+ 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);
}
else if (value.IsValue2)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
+ 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);
}
else if (value.IsValue3)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeof(T3), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchOperationParam.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchOperationParam.g.cs
index 4c59e791..b8c5a071 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchOperationParam.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ApplyPatchOperationParam.g.cs
@@ -12,7 +12,8 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -51,7 +52,9 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
{
try
{
- createFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam).Name}");
+ createFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -64,7 +67,9 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
{
try
{
- deleteFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam).Name}");
+ deleteFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -77,7 +82,9 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
{
try
{
- updateFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam).Name}");
+ updateFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -92,7 +99,9 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
{
try
{
- createFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam).Name}");
+ createFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -103,7 +112,9 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
try
{
- deleteFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam).Name}");
+ deleteFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -114,7 +125,9 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
try
{
- updateFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam).Name}");
+ updateFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -141,19 +154,26 @@ public override void Write(
global::tryAGI.OpenAI.ApplyPatchOperationParam value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsCreateFile)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateFile, typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateFile!, typeInfo);
}
else if (value.IsDeleteFile)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.DeleteFile, typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.DeleteFile!, typeInfo);
}
else if (value.IsUpdateFile)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.UpdateFile, typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.UpdateFile!, typeInfo);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantStreamEvent.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantStreamEvent.g.cs
index d6f6c241..8f58f7fa 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantStreamEvent.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantStreamEvent.g.cs
@@ -12,7 +12,8 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -56,7 +57,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- thread = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ThreadStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ThreadStreamEvent).Name}");
+ thread = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -69,7 +72,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- run = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStreamEvent).Name}");
+ run = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -82,7 +87,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- runStep = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepStreamEvent).Name}");
+ runStep = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -95,7 +102,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- message = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageStreamEvent).Name}");
+ message = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -108,7 +117,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- error = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ErrorEvent).Name}");
+ error = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -121,7 +132,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- done = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoneEvent).Name}");
+ done = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -136,7 +149,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- thread = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ThreadStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ThreadStreamEvent).Name}");
+ thread = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -147,7 +162,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- run = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStreamEvent).Name}");
+ run = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -158,7 +175,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- runStep = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepStreamEvent).Name}");
+ runStep = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -169,7 +188,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- message = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageStreamEvent).Name}");
+ message = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -180,7 +201,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- error = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ErrorEvent).Name}");
+ error = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -191,7 +214,9 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- done = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoneEvent).Name}");
+ done = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -224,31 +249,44 @@ public override void Write(
global::tryAGI.OpenAI.AssistantStreamEvent value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsThread)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Thread, typeof(global::tryAGI.OpenAI.ThreadStreamEvent), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ThreadStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ThreadStreamEvent).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Thread!.Value, typeInfo);
}
else if (value.IsRun)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Run, typeof(global::tryAGI.OpenAI.RunStreamEvent), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStreamEvent).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Run!.Value, typeInfo);
}
else if (value.IsRunStep)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStep, typeof(global::tryAGI.OpenAI.RunStepStreamEvent), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.RunStepStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.RunStepStreamEvent).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStep!.Value, typeInfo);
}
else if (value.IsMessage)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message, typeof(global::tryAGI.OpenAI.MessageStreamEvent), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.MessageStreamEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.MessageStreamEvent).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message!.Value, typeInfo);
}
else if (value.IsError)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Error, typeof(global::tryAGI.OpenAI.ErrorEvent), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ErrorEvent).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Error!, typeInfo);
}
else if (value.IsDone)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Done, typeof(global::tryAGI.OpenAI.DoneEvent), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.DoneEvent).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Done!, typeInfo);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOption.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOption.g.cs
index 87de0ca4..6f25b14d 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOption.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiResponseFormatOption.g.cs
@@ -12,7 +12,8 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -50,7 +51,9 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum).Name}");
+ @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -63,7 +66,9 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -76,7 +81,9 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}");
+ jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -89,7 +96,9 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- jsonSchema = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema).Name}");
+ jsonSchema = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -104,7 +113,9 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum).Name}");
+ @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -115,7 +126,9 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
try
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -126,7 +139,9 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
try
{
- jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}");
+ jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -137,7 +152,9 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
try
{
- jsonSchema = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema).Name}");
+ jsonSchema = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -166,23 +183,32 @@ public override void Write(
global::tryAGI.OpenAI.AssistantsApiResponseFormatOption value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsEnum)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Enum, typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Enum!.Value, typeInfo);
}
else if (value.IsText)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::tryAGI.OpenAI.ResponseFormatText), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatText).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo);
}
else if (value.IsJsonObject)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonObject, typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonObject!, typeInfo);
}
else if (value.IsJsonSchema)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonSchema, typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonSchema!, typeInfo);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOption.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOption.g.cs
index 1a9f2460..18fd6235 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOption.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AssistantsApiToolChoiceOption.g.cs
@@ -12,7 +12,8 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -42,7 +43,9 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
{
try
{
- @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum).Name}");
+ @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -55,7 +58,9 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
{
try
{
- named = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantsNamedToolChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsNamedToolChoice).Name}");
+ named = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -70,7 +75,9 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
{
try
{
- @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum).Name}");
+ @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -81,7 +88,9 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
try
{
- named = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantsNamedToolChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsNamedToolChoice).Name}");
+ named = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -106,15 +115,20 @@ public override void Write(
global::tryAGI.OpenAI.AssistantsApiToolChoiceOption value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsEnum)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Enum, typeof(global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Enum!.Value, typeInfo);
}
else if (value.IsNamed)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Named, typeof(global::tryAGI.OpenAI.AssistantsNamedToolChoice), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.AssistantsNamedToolChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.AssistantsNamedToolChoice).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Named!, typeInfo);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallsItem.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallsItem.g.cs
index e4e7bd47..dc450a0f 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallsItem.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionMessageToolCallsItem.g.cs
@@ -12,7 +12,8 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -46,7 +47,9 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te
{
try
{
- function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall).Name}");
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -59,7 +62,9 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te
{
try
{
- custom = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall).Name}");
+ custom = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -74,7 +79,9 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te
{
try
{
- function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall).Name}");
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -85,7 +92,9 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te
try
{
- custom = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall).Name}");
+ custom = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -110,15 +119,20 @@ public override void Write(
global::tryAGI.OpenAI.ChatCompletionMessageToolCallsItem value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsFunction)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function!, typeInfo);
}
else if (value.IsCustom)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Custom, typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Custom!, typeInfo);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPart.g.cs
index f902604d..32e17562 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPart.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestAssistantMessageContentPart.g.cs
@@ -12,7 +12,8 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -44,7 +45,9 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
{
try
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -57,7 +60,9 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
{
try
{
- refusal = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal).Name}");
+ refusal = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -72,7 +77,9 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
{
try
{
- text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}");
+ text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -83,7 +90,9 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
try
{
- refusal = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal).Name}");
+ refusal = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -108,15 +117,20 @@ public override void Write(
global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContentPart value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsText)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo);
}
else if (value.IsRefusal)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Refusal, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Refusal!, typeInfo);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessage.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessage.g.cs
index f3ab2c43..0d285835 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessage.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestMessage.g.cs
@@ -12,7 +12,8 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -74,7 +75,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- developer = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage).Name}");
+ developer = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -87,7 +90,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage).Name}");
+ system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -100,7 +105,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestUserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestUserMessage).Name}");
+ user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -113,7 +120,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage).Name}");
+ assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -126,7 +135,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestToolMessage).Name}");
+ tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -139,7 +150,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage).Name}");
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -154,7 +167,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- developer = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage).Name}");
+ developer = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -165,7 +180,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage).Name}");
+ system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -176,7 +193,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestUserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestUserMessage).Name}");
+ user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -187,7 +206,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage).Name}");
+ assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -198,7 +219,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestToolMessage).Name}");
+ tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -209,7 +232,9 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage).Name}");
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
@@ -242,31 +267,44 @@ public override void Write(
global::tryAGI.OpenAI.ChatCompletionRequestMessage value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
if (value.IsDeveloper)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Developer, typeof(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Developer!, typeInfo);
}
else if (value.IsSystem)
{
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.System, typeof(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage), options);
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo