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 7fbd39d9..50310cb6 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessCancelARunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 fbdeb41e..f04b93f7 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessCreateMessageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 c27a1cf4..eb092a41 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -131,7 +131,7 @@ partial void ProcessCreateRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -162,7 +162,7 @@ partial void ProcessCreateRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 185a9fab..4c5ed2a8 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessCreateThreadResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 52b9839b..ccde4efb 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessCreateThreadAndRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 7af3fd05..19ab07bc 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.DeleteMessageResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessDeleteMessageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteMessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteMessageResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 76e6bbf1..f567dd14 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.DeleteThreadResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessDeleteThreadResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteThreadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteThreadResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 e2242118..d2927430 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListMessagesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -179,7 +179,7 @@ partial void ProcessListMessagesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListMessagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListMessagesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 3c2c45ca..afa80b3b 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListRunStepsResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -185,7 +185,7 @@ partial void ProcessListRunStepsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListRunStepsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListRunStepsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 d0c556e8..893bc65e 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListRunsResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -172,7 +172,7 @@ partial void ProcessListRunsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListRunsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListRunsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 38d469a4..5c80be24 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessModifyMessageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 d4c10162..c1b96428 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessModifyRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 cfb7f731..44e8f926 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessModifyThreadResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 7551d0dd..7c2cf7c8 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessRetrieveMessageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 b8033a7f..f0771100 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessRetrieveRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 3f0495aa..005f06de 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.RunStepObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessRetrieveRunStepResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunStepObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunStepObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 8fa3309e..bc9101df 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessRetrieveThreadResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 366c3f8a..9d428e62 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessSubmitToolOutputsToRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).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 35952340..2c5a65ae 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 7ba53ce0..0e0722d7 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ var __streamedResponse = global::tryAGI.OpenAI.CreateSpeechResponseStreamEvent.FromJson(__content, JsonSerializerOptions) ??
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 8f0ef26c..c4485a84 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.OneOf.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -243,7 +243,7 @@ partial void ProcessCreateTranscriptionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerOptions).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 c2610081..23442070 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, JsonSerializerContext) ??
+ var __streamedResponse = global::tryAGI.OpenAI.CreateTranscriptionResponseStreamEvent.FromJson(__content, JsonSerializerOptions) ??
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 16673398..62c5b643 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.OneOf.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -176,7 +176,7 @@ partial void ProcessCreateTranslationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.OneOf.FromJsonStreamAsync(__content, JsonSerializerOptions).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 e96824af..8146eebe 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.VoiceResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -160,7 +160,7 @@ partial void ProcessCreateVoiceResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 ff409ad3..75caf120 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -160,7 +160,7 @@ partial void ProcessCreateVoiceConsentResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 bbc6f65f..52d5dbe3 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.VoiceConsentDeletedResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -140,7 +140,7 @@ partial void ProcessDeleteVoiceConsentResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentDeletedResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 318591aa..15a4557d 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.VoiceConsentListResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -152,7 +152,7 @@ partial void ProcessListVoiceConsentsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentListResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 00f82580..8fa16a30 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -140,7 +140,7 @@ partial void ProcessRetrieveVoiceConsentResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 86d24386..cadba81a 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.VoiceConsentResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -155,7 +155,7 @@ partial void ProcessUpdateVoiceConsentResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.VoiceConsentResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 eda5a4ad..0eeeb1c3 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 1875471f..ec939400 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListAuditLogsResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -202,7 +202,7 @@ partial void ProcessListAuditLogsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListAuditLogsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListAuditLogsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 0cc23501..948afba2 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 9cf90acc..8ad6125c 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Batch.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessCancelBatchResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerOptions).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 7705fa69..8510570d 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Batch.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessCreateBatchResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerOptions).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 c95e4157..9897cf2d 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListBatchesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -150,7 +150,7 @@ partial void ProcessListBatchesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListBatchesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListBatchesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 49de9ded..5370801a 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Batch.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessRetrieveBatchResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Batch.FromJsonStreamAsync(__content, JsonSerializerOptions).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 94d76307..c5a798dc 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 9bfaad6d..a289a3a9 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessActivateCertificatesForOrganizationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 ac613c2c..9504f2c3 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -154,7 +154,7 @@ partial void ProcessActivateCertificatesForProjectResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 59e876bb..0c76d873 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessDeactivateCertificatesForOrganizationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 28945ad4..88bca9e2 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -154,7 +154,7 @@ partial void ProcessDeactivateCertificatesForProjectResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 35b478df..c025baa2 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.DeleteCertificateResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessDeleteCertificateResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteCertificateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteCertificateResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 2d4a37ea..c6e8e4e4 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Certificate.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessGetCertificateResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerOptions).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 301a9ce2..e1ff8633 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessListOrganizationCertificatesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 e7d0fcbc..5c91a112 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListCertificatesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -165,7 +165,7 @@ partial void ProcessListProjectCertificatesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListCertificatesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 a49af9ef..970b5c8a 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Certificate.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessModifyCertificateResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerOptions).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 9adcfee5..6ee014e7 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Certificate.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessUploadCertificateResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Certificate.FromJsonStreamAsync(__content, JsonSerializerOptions).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 ec9262f9..c7b29a1b 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 5d9be57a..f110a2c8 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -158,7 +158,7 @@ partial void ProcessCreateChatCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 f4854ed0..753d0523 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ var __streamedResponse = global::tryAGI.OpenAI.CreateChatCompletionStreamResponse.FromJson(__content, JsonSerializerOptions) ??
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 b48ba25e..9fb3d043 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ChatCompletionDeleted.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessDeleteChatCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ChatCompletionDeleted.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ChatCompletionDeleted.FromJsonStreamAsync(__content, JsonSerializerOptions).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 7ef8d115..301916b2 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -139,7 +139,7 @@ partial void ProcessGetChatCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 439c7697..fce6fd81 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ChatCompletionMessageList.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -167,7 +167,7 @@ partial void ProcessGetChatMessagesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ChatCompletionMessageList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ChatCompletionMessageList.FromJsonStreamAsync(__content, JsonSerializerOptions).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 6e4ba677..091bcdd5 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ChatCompletionList.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -174,7 +174,7 @@ partial void ProcessListChatCompletionsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ChatCompletionList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ChatCompletionList.FromJsonStreamAsync(__content, JsonSerializerOptions).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 06434ccb..c504adee 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -155,7 +155,7 @@ partial void ProcessUpdateChatCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateChatCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 ade1fbfe..258bc9be 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 e23a3380..8a0ceb02 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.CreateCompletionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessCreateCompletionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateCompletionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 c0e74566..0d17501f 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 0f461968..7eb046b3 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessCreateAConversationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 112fef26..3483e6b2 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -133,7 +133,7 @@ partial void ProcessCreateItemsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ConversationItemList.FromJson(__content, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ConversationItemList.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -164,7 +164,7 @@ partial void ProcessCreateItemsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationItemList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationItemList.FromJsonStreamAsync(__content, JsonSerializerOptions).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 2fec4669..995f5f5e 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.DeletedConversationResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -140,7 +140,7 @@ partial void ProcessDeleteAConversationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeletedConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeletedConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 8ede9109..03d34277 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessDeleteAnItemResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 1dd87a04..25a404d6 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ConversationItemList.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -172,7 +172,7 @@ partial void ProcessListItemsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationItemList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationItemList.FromJsonStreamAsync(__content, JsonSerializerOptions).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 4f6fdfa5..dc3608ec 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -140,7 +140,7 @@ partial void ProcessRetrieveAConversationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 72e9e12e..db8e24c6 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ConversationItem.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -157,7 +157,7 @@ partial void ProcessRetrieveAnItemResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationItem.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationItem.FromJsonStreamAsync(__content, JsonSerializerOptions).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 aefc932c..474462ba 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ConversationResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -155,7 +155,7 @@ partial void ProcessUpdateAConversationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ConversationResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 ee4daf8b..8a765a19 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 ef04818b..af607aef 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.CreateEmbeddingResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessCreateEmbeddingsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.CreateEmbeddingResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.CreateEmbeddingResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 c407fc55..01d4c1cd 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 bf8e5f29..7f312e3c 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessCancelEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerOptions).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 4a9bcb92..10129da0 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Eval.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -151,7 +151,7 @@ partial void ProcessCreateEvalResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerOptions).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 94f03ce1..322a3e67 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext);
+ __value_400 = global::tryAGI.OpenAI.Error.FromJson(__content_400, JsonSerializerOptions);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_400 = global::tryAGI.OpenAI.Error.FromJson(__content_400, JsonSerializerContext);
+ __value_400 = global::tryAGI.OpenAI.Error.FromJson(__content_400, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -160,7 +160,7 @@ partial void ProcessCreateEvalRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -191,7 +191,7 @@ partial void ProcessCreateEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerOptions).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 7d09e30e..a14a6c0e 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, JsonSerializerContext);
+ __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -145,7 +145,7 @@ partial void ProcessDeleteAnEvalResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeleteEvalResponse.FromJson(__content, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.DeleteEvalResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -176,7 +176,7 @@ partial void ProcessDeleteAnEvalResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteEvalResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteEvalResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 3959fdc7..527b5533 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, JsonSerializerContext);
+ __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerOptions);
}
else
{
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerContext);
+ __value_404 = global::tryAGI.OpenAI.Error.FromJson(__content_404, JsonSerializerOptions);
}
}
catch (global::System.Exception __ex)
@@ -151,7 +151,7 @@ partial void ProcessDeleteEvalRunResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.DeleteEvalRunResponse.FromJson(__content, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.DeleteEvalRunResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -182,7 +182,7 @@ partial void ProcessDeleteEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteEvalRunResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteEvalRunResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 e4167b42..14548586 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Eval.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessGetAnEvalResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerOptions).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 3d9aa01e..a4c55653 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.EvalRun.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessGetAnEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRun.FromJsonStreamAsync(__content, JsonSerializerOptions).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 6151c00b..12a29b12 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.EvalRunOutputItem.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -150,7 +150,7 @@ partial void ProcessGetAnOutputItemOfAnEvalRunResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRunOutputItem.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRunOutputItem.FromJsonStreamAsync(__content, JsonSerializerOptions).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 2ee70046..07e616f7 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.EvalRunOutputItemList.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -178,7 +178,7 @@ partial void ProcessGetEvalRunOutputItemsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRunOutputItemList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRunOutputItemList.FromJsonStreamAsync(__content, JsonSerializerOptions).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 7a443e8e..a7ad4bcc 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.EvalRunList.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -172,7 +172,7 @@ partial void ProcessGetEvalRunsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalRunList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalRunList.FromJsonStreamAsync(__content, JsonSerializerOptions).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 b3fdda51..9f952b34 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.EvalList.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -168,7 +168,7 @@ partial void ProcessListEvalsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.EvalList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.EvalList.FromJsonStreamAsync(__content, JsonSerializerOptions).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 49ca2d21..c8dbc6e9 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Eval.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessUpdateAnEvalResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Eval.FromJsonStreamAsync(__content, JsonSerializerOptions).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 dbb44bf2..cea32ee8 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 fb605317..8da104e7 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.DeleteFileResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessDeleteFileResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteFileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteFileResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 63bf70fe..cddad46e 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListFilesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -166,7 +166,7 @@ partial void ProcessListFilesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFilesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFilesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 a6c131ff..57d1fc26 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.OpenAIFile.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessRetrieveFileResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.OpenAIFile.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.OpenAIFile.FromJsonStreamAsync(__content, JsonSerializerOptions).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 371588e8..75f2deb7 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.OpenAIFile.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -176,7 +176,7 @@ partial void ProcessUploadFileResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.OpenAIFile.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.OpenAIFile.FromJsonStreamAsync(__content, JsonSerializerOptions).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 e5d8828f..0941f6f6 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 bad50216..0c2d54b3 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -140,7 +140,7 @@ partial void ProcessCancelFineTuningResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).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 9f05b277..b5e74f90 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -156,7 +156,7 @@ partial void ProcessCreateCheckpointPermissionsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 c86e4547..f998febf 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -151,7 +151,7 @@ partial void ProcessCreateFineTuningJobResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).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 ab28390b..0578fab7 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -149,7 +149,7 @@ partial void ProcessDeleteCheckpointPermissionResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeleteFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 84372018..ead50d05 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -175,7 +175,7 @@ partial void ProcessListCheckpointPermissionsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFineTuningCheckpointPermissionResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 f7a1ba65..f504724d 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -158,7 +158,7 @@ partial void ProcessListFineTuningCheckpointsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFineTuningJobCheckpointsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 eacaad10..c046c8e9 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListFineTuningJobEventsResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -158,7 +158,7 @@ partial void ProcessListFineTuningEventsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListFineTuningJobEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListFineTuningJobEventsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 8f753e0a..61c8bc4b 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -157,7 +157,7 @@ partial void ProcessListFineTuningJobsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ListPaginatedFineTuningJobsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 a4e57b75..bc27ed9d 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -140,7 +140,7 @@ partial void ProcessPauseFineTuningResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).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 e027feda..7d2099b2 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -140,7 +140,7 @@ partial void ProcessResumeFineTuningResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).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 3431ffb2..67558fe4 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.FineTuningJob.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -141,7 +141,7 @@ partial void ProcessRetrieveFineTuningJobResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.FineTuningJob.FromJsonStreamAsync(__content, JsonSerializerOptions).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 e1c61a96..5a5954b9 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.RunGraderResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessRunGraderResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RunGraderResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RunGraderResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 f10fae5f..2e232855 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ValidateGraderResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessValidateGraderResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ValidateGraderResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ValidateGraderResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 30b27ddd..462859f9 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 ad4a998b..12118a2e 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.GroupRoleAssignment.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessAssignOrganizationRoleToGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupRoleAssignment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupRoleAssignment.FromJsonStreamAsync(__content, JsonSerializerOptions).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 1dd6b9ec..f1d956ac 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.RoleListResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -161,7 +161,7 @@ partial void ProcessListGroupOrganizationRoleAssignmentsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.RoleListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.RoleListResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 50423efe..d23432a6 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessUnassignOrganizationRoleFromGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.DeletedRoleAssignmentResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 e8a4c196..e0757a9f 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 d9966bce..91af5d8c 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.GroupUserAssignment.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessAddGroupUserResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupUserAssignment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupUserAssignment.FromJsonStreamAsync(__content, JsonSerializerOptions).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 baa0d7f4..4e184071 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.UserListResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -165,7 +165,7 @@ partial void ProcessListGroupUsersResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.UserListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.UserListResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 e986fac6..c9a782cd 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.GroupUserDeletedResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -144,7 +144,7 @@ partial void ProcessRemoveGroupUserResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupUserDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupUserDeletedResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 c636edde..48e75c24 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 37d7080f..c9223102 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.GroupResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessCreateGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 2a1a2f6a..61f8a246 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.GroupDeletedResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessDeleteGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupDeletedResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupDeletedResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 7ce48d43..d257429b 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.GroupListResource.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -159,7 +159,7 @@ partial void ProcessListGroupsResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupListResource.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupListResource.FromJsonStreamAsync(__content, JsonSerializerOptions).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 c5f2735c..369f20fd 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.GroupResourceWithSuccess.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -153,7 +153,7 @@ partial void ProcessUpdateGroupResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.GroupResourceWithSuccess.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.GroupResourceWithSuccess.FromJsonStreamAsync(__content, JsonSerializerOptions).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 be6e34e7..b95fb924 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 fd59cb8d..0eb84f76 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 4fd6c507..77faa7ee 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 f5bb2439..53e78568 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 78e8675c..3e07f5b1 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 58665df0..7f47da44 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 9b9e64f4..d5f236ac 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 f657ebaa..548bd1d0 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 833a97f5..40715284 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 599f4d96..211bf8de 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 dff056f9..781968fa 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 9d41cc7c..81e1012e 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 c1e9e70d..bb669d2c 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 1e926c20..e83cd4d1 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 01d49619..cf439f48 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 089922fc..d288957e 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 9930dcb0..82a8ecc8 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 b0d6c04b..cbe4c689 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 c77e2ace..78f31f73 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 0b8ed4c1..30cf5665 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 942bcc7a..0c31675e 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 9ab126cd..b365ee68 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 b7fef149..7adeb7af 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 21522e23..e3725fbe 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 e15480ee..ccd5ae70 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 1954db82..6870be21 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 2eed6a2c..fceef960 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 977bd1de..b0b70be2 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 feaa9bcd..2e3275c8 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 2caaf94b..02e3f4b2 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 11f6cf3e..fa87a6c8 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 ad791362..01107c9f 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 b26ec274..693a3405 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 bc29852f..7a485618 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 7e63b1ed..fd636bcc 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+ global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { 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 afdc1d1d..4cd21ac3 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
@@ -133,7 +133,7 @@ partial void ProcessCreateImageResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -164,7 +164,7 @@ partial void ProcessCreateImageResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 a5775f60..c5d26833 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ var __streamedResponse = global::tryAGI.OpenAI.ImageGenStreamEvent.FromJson(__content, JsonSerializerOptions) ??
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 e05b2172..a45db49a 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -269,7 +269,7 @@ partial void ProcessCreateImageEditResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 81c9c2fa..d1c9c4d5 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, JsonSerializerContext) ??
+ var __streamedResponse = global::tryAGI.OpenAI.ImageEditStreamEvent.FromJson(__content, JsonSerializerOptions) ??
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 6cc20317..dc1465f8 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.ImagesResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -187,7 +187,7 @@ partial void ProcessCreateImageVariationResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.ImagesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 2988a02e..149e752e 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 acdd03bb..27a8656f 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(JsonSerializerContext);
+ var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Invite.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -147,7 +147,7 @@ partial void ProcessCreateInviteResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Invite.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Invite.FromJsonStreamAsync(__content, JsonSerializerOptions).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 dd9b48a6..0063be12 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.InviteDeleteResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessDeleteInviteResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.InviteDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.InviteDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 23d0875e..a9d3e494 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.InviteListResponse.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -150,7 +150,7 @@ partial void ProcessListInvitesResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.InviteListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.InviteListResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).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 0689304e..c5702abe 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, JsonSerializerContext) ??
+ global::tryAGI.OpenAI.Invite.FromJson(__content, JsonSerializerOptions) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -138,7 +138,7 @@ partial void ProcessRetrieveInviteResponseContent(
).ConfigureAwait(false);
return
- await global::tryAGI.OpenAI.Invite.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::tryAGI.OpenAI.Invite.FromJsonStreamAsync(__content, JsonSerializerOptions).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 67c7c47c..dab32686 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.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::tryAGI.OpenAI.SourceGenerationContext.Default;
+ public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
///
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 2519fa10..65c51da1 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
@@ -11,8 +11,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -27,27 +26,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
}
var __score0 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score0++;
- }
- }
- }
var __score1 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score1++;
- }
- }
- }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -62,9 +41,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -79,9 +56,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -97,9 +72,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -111,9 +84,7 @@ public class AllOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -138,20 +109,15 @@ public override void Write(
global::tryAGI.OpenAI.AllOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsValue1)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
}
else if (value.IsValue2)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation.g.cs
index 92e1eee0..37dcf8d6 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,8 +12,7 @@ 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));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -65,9 +64,7 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- 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);
+ fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -80,9 +77,7 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- 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);
+ urlCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -95,9 +90,7 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- 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);
+ containerFileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -110,9 +103,7 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- 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);
+ filePath = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -127,9 +118,7 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
{
try
{
- 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);
+ fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -140,9 +129,7 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
try
{
- 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);
+ urlCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -153,9 +140,7 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
try
{
- 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);
+ containerFileCitation = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -166,9 +151,7 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
try
{
- 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);
+ filePath = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -197,32 +180,23 @@ public override void Write(
global::tryAGI.OpenAI.Annotation value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsFileCitation)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation, typeof(global::tryAGI.OpenAI.FileCitationBody), options);
}
else if (value.IsUrlCitation)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.UrlCitation, typeof(global::tryAGI.OpenAI.UrlCitationBody), options);
}
else if (value.IsContainerFileCitation)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerFileCitation, typeof(global::tryAGI.OpenAI.ContainerFileCitationBody), options);
}
else if (value.IsFilePath)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilePath, typeof(global::tryAGI.OpenAI.FilePath), options);
}
}
}
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 9cd768c0..d3607c6e 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,8 +12,7 @@ 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));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -45,9 +44,7 @@ public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serializat
{
try
{
- 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);
+ file = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -60,9 +57,7 @@ public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serializat
{
try
{
- 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);
+ url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -77,9 +72,7 @@ public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serializat
{
try
{
- 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);
+ file = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -90,9 +83,7 @@ public class AnnotationsItem3JsonConverter : global::System.Text.Json.Serializat
try
{
- 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);
+ url = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -117,20 +108,15 @@ public override void Write(
global::tryAGI.OpenAI.AnnotationsItem3 value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsFile)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.File, typeof(global::tryAGI.OpenAI.FileAnnotation), options);
}
else if (value.IsUrl)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Url, typeof(global::tryAGI.OpenAI.UrlAnnotation), options);
}
}
}
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 c2c20089..46cac4a3 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
@@ -11,8 +11,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -27,27 +26,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
}
var __score0 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score0++;
- }
- }
- }
var __score1 = 0;
- {
- var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options);
- if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object)
- {
- foreach (var __prop in __ti.Properties)
- {
- if (__jsonProps.Contains(__prop.Name)) __score1++;
- }
- }
- }
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -62,9 +41,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -79,9 +56,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -97,9 +72,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -111,9 +84,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serialization
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -138,20 +109,15 @@ public override void Write(
global::tryAGI.OpenAI.AnyOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsValue1)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
}
else if (value.IsValue2)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf3.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.AnyOf3.g.cs
index 7c2abd97..907fea92 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
@@ -11,8 +11,7 @@ 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));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
@@ -27,38 +26,8 @@ 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; }
@@ -75,9 +44,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -92,9 +59,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -109,9 +74,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- 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);
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -127,9 +90,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -141,9 +102,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -155,9 +114,7 @@ public class AnyOfJsonConverter : global::System.Text.Json.Serializa
try
{
- 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);
+ value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -184,26 +141,19 @@ public override void Write(
global::tryAGI.OpenAI.AnyOf value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsValue1)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options);
}
else if (value.IsValue2)
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options);
}
else if (value.IsValue3)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeof(T3), options);
}
}
}
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 b8c5a071..4c59e791 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,8 +12,7 @@ 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));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -52,9 +51,7 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
{
try
{
- 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);
+ createFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -67,9 +64,7 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
{
try
{
- 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);
+ deleteFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -82,9 +77,7 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
{
try
{
- 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);
+ updateFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -99,9 +92,7 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
{
try
{
- 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);
+ createFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -112,9 +103,7 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
try
{
- 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);
+ deleteFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -125,9 +114,7 @@ public class ApplyPatchOperationParamJsonConverter : global::System.Text.Json.Se
try
{
- 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);
+ updateFile = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -154,26 +141,19 @@ public override void Write(
global::tryAGI.OpenAI.ApplyPatchOperationParam value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsCreateFile)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateFile, typeof(global::tryAGI.OpenAI.ApplyPatchCreateFileOperationParam), options);
}
else if (value.IsDeleteFile)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.DeleteFile, typeof(global::tryAGI.OpenAI.ApplyPatchDeleteFileOperationParam), options);
}
else if (value.IsUpdateFile)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.UpdateFile, typeof(global::tryAGI.OpenAI.ApplyPatchUpdateFileOperationParam), options);
}
}
}
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 8f58f7fa..d6f6c241 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,8 +12,7 @@ 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));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -57,9 +56,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- 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);
+ thread = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -72,9 +69,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- 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);
+ run = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -87,9 +82,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- 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);
+ runStep = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -102,9 +95,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- 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);
+ message = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -117,9 +108,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- 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);
+ error = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -132,9 +121,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- 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);
+ done = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -149,9 +136,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
{
try
{
- 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);
+ thread = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -162,9 +147,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- 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);
+ run = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -175,9 +158,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- 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);
+ runStep = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -188,9 +169,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- 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);
+ message = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -201,9 +180,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- 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);
+ error = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -214,9 +191,7 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial
try
{
- 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);
+ done = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -249,44 +224,31 @@ public override void Write(
global::tryAGI.OpenAI.AssistantStreamEvent value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsThread)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Thread, typeof(global::tryAGI.OpenAI.ThreadStreamEvent), options);
}
else if (value.IsRun)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Run, typeof(global::tryAGI.OpenAI.RunStreamEvent), options);
}
else if (value.IsRunStep)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStep, typeof(global::tryAGI.OpenAI.RunStepStreamEvent), options);
}
else if (value.IsMessage)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message, typeof(global::tryAGI.OpenAI.MessageStreamEvent), options);
}
else if (value.IsError)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Error, typeof(global::tryAGI.OpenAI.ErrorEvent), options);
}
else if (value.IsDone)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Done, typeof(global::tryAGI.OpenAI.DoneEvent), options);
}
}
}
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 6f25b14d..87de0ca4 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,8 +12,7 @@ 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));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -51,9 +50,7 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- 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);
+ @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -66,9 +63,7 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- 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);
+ text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -81,9 +76,7 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- 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);
+ jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -96,9 +89,7 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- 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);
+ jsonSchema = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -113,9 +104,7 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
{
try
{
- 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);
+ @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -126,9 +115,7 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
try
{
- 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);
+ text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -139,9 +126,7 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
try
{
- 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);
+ jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -152,9 +137,7 @@ public class AssistantsApiResponseFormatOptionJsonConverter : global::System.Tex
try
{
- 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);
+ jsonSchema = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -183,32 +166,23 @@ public override void Write(
global::tryAGI.OpenAI.AssistantsApiResponseFormatOption value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsEnum)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Enum, typeof(global::tryAGI.OpenAI.AssistantsApiResponseFormatOptionEnum), options);
}
else if (value.IsText)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::tryAGI.OpenAI.ResponseFormatText), options);
}
else if (value.IsJsonObject)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonObject, typeof(global::tryAGI.OpenAI.ResponseFormatJsonObject), options);
}
else if (value.IsJsonSchema)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonSchema, typeof(global::tryAGI.OpenAI.ResponseFormatJsonSchema), options);
}
}
}
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 18fd6235..1a9f2460 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,8 +12,7 @@ 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));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -43,9 +42,7 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
{
try
{
- 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);
+ @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -58,9 +55,7 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
{
try
{
- 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);
+ named = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -75,9 +70,7 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
{
try
{
- 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);
+ @enum = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -88,9 +81,7 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
try
{
- 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);
+ named = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -115,20 +106,15 @@ public override void Write(
global::tryAGI.OpenAI.AssistantsApiToolChoiceOption value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsEnum)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Enum, typeof(global::tryAGI.OpenAI.AssistantsApiToolChoiceOptionEnum), options);
}
else if (value.IsNamed)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Named, typeof(global::tryAGI.OpenAI.AssistantsNamedToolChoice), options);
}
}
}
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 dc450a0f..e4e7bd47 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,8 +12,7 @@ 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));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -47,9 +46,7 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te
{
try
{
- 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);
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -62,9 +59,7 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te
{
try
{
- 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);
+ custom = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -79,9 +74,7 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te
{
try
{
- 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);
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -92,9 +85,7 @@ public class ChatCompletionMessageToolCallsItemJsonConverter : global::System.Te
try
{
- 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);
+ custom = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -119,20 +110,15 @@ public override void Write(
global::tryAGI.OpenAI.ChatCompletionMessageToolCallsItem value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsFunction)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeof(global::tryAGI.OpenAI.ChatCompletionMessageToolCall), options);
}
else if (value.IsCustom)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Custom, typeof(global::tryAGI.OpenAI.ChatCompletionMessageCustomToolCall), options);
}
}
}
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 32e17562..f902604d 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,8 +12,7 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -45,9 +44,7 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
{
try
{
- 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);
+ text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -60,9 +57,7 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
{
try
{
- 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);
+ refusal = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -77,9 +72,7 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
{
try
{
- 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);
+ text = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -90,9 +83,7 @@ public class ChatCompletionRequestAssistantMessageContentPartJsonConverter : glo
try
{
- 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);
+ refusal = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -117,20 +108,15 @@ public override void Write(
global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessageContentPart value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsText)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options);
}
else if (value.IsRefusal)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Refusal, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartRefusal), options);
}
}
}
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 0d285835..f3ab2c43 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,8 +12,7 @@ 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));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -75,9 +74,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- 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);
+ developer = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -90,9 +87,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- 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);
+ system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -105,9 +100,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- 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);
+ user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -120,9 +113,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- 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);
+ assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -135,9 +126,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- 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);
+ tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -150,9 +139,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- 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);
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -167,9 +154,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
{
try
{
- 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);
+ developer = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -180,9 +165,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- 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);
+ system = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -193,9 +176,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- 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);
+ user = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -206,9 +187,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- 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);
+ assistant = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -219,9 +198,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- 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);
+ tool = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -232,9 +209,7 @@ public class ChatCompletionRequestMessageJsonConverter : global::System.Text.Jso
try
{
- 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);
+ function = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -267,44 +242,31 @@ public override void Write(
global::tryAGI.OpenAI.ChatCompletionRequestMessage value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsDeveloper)
{
- 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);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Developer, typeof(global::tryAGI.OpenAI.ChatCompletionRequestDeveloperMessage), options);
}
else if (value.IsSystem)
{
- 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}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.System!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.System, typeof(global::tryAGI.OpenAI.ChatCompletionRequestSystemMessage), options);
}
else if (value.IsUser)
{
- 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}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.User!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.User, typeof(global::tryAGI.OpenAI.ChatCompletionRequestUserMessage), options);
}
else if (value.IsAssistant)
{
- 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}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Assistant!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Assistant, typeof(global::tryAGI.OpenAI.ChatCompletionRequestAssistantMessage), options);
}
else if (value.IsTool)
{
- 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}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool, typeof(global::tryAGI.OpenAI.ChatCompletionRequestToolMessage), options);
}
else if (value.IsFunction)
{
- 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}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeof(global::tryAGI.OpenAI.ChatCompletionRequestFunctionMessage), options);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPart.g.cs
index 7cf0b1b0..dd17ed82 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPart.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestSystemMessageContentPart.g.cs
@@ -12,8 +12,7 @@ public class ChatCompletionRequestSystemMessageContentPartJsonConverter : global
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -40,9 +39,7 @@ public class ChatCompletionRequestSystemMessageContentPartJsonConverter : global
{
try
{
- 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}");
- textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -57,9 +54,7 @@ public class ChatCompletionRequestSystemMessageContentPartJsonConverter : global
{
try
{
- 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}");
- textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -82,14 +77,11 @@ public override void Write(
global::tryAGI.OpenAI.ChatCompletionRequestSystemMessageContentPart value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsTextContentPart)
{
- 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.TextContentPart!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextContentPart, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPart.g.cs
index 1e04fa0d..0a0eab3c 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPart.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestToolMessageContentPart.g.cs
@@ -12,8 +12,7 @@ public class ChatCompletionRequestToolMessageContentPartJsonConverter : global::
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -40,9 +39,7 @@ public class ChatCompletionRequestToolMessageContentPartJsonConverter : global::
{
try
{
- 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}");
- textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -57,9 +54,7 @@ public class ChatCompletionRequestToolMessageContentPartJsonConverter : global::
{
try
{
- 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}");
- textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -82,14 +77,11 @@ public override void Write(
global::tryAGI.OpenAI.ChatCompletionRequestToolMessageContentPart value,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
if (value.IsTextContentPart)
{
- 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.TextContentPart!, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextContentPart, typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartText), options);
}
}
}
diff --git a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs
index 4d16f01f..723959c1 100644
--- a/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs
+++ b/src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ChatCompletionRequestUserMessageContentPart.g.cs
@@ -12,8 +12,7 @@ public class ChatCompletionRequestUserMessageContentPartJsonConverter : global::
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
- options = options ?? throw new global::System.ArgumentNullException(nameof(options));
- var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();
@@ -55,9 +54,7 @@ public class ChatCompletionRequestUserMessageContentPartJsonConverter : global::
{
try
{
- 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}");
- textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ textContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -70,9 +67,7 @@ public class ChatCompletionRequestUserMessageContentPartJsonConverter : global::
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartImage).Name}");
- imageContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ imageContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, options);
}
catch (global::System.Text.Json.JsonException)
{
@@ -85,9 +80,7 @@ public class ChatCompletionRequestUserMessageContentPartJsonConverter : global::
{
try
{
- var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
- throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.ChatCompletionRequestMessageContentPartAudio).Name}");
- audioContentPart = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ audioContentPart = global::System.Text.Json.JsonSerializer.Deserialize