Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.AllOf.2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace tryAGI.OpenAI
/// <summary>
///
/// </summary>
public readonly partial struct AllOf<T1, T2> : global::System.IEquatable<AllOf<T1, T2>>
public readonly partial struct AllOf<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2> : global::System.IEquatable<AllOf<T1, T2>>
{
/// <summary>
///
Expand Down Expand Up @@ -105,9 +105,9 @@ Value1 as object
Value2?.ToString()
;

private static bool RequiresValue<TValue>() => RequirementCache<TValue>.Value;
private static bool RequiresValue<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] TValue>() => RequirementCache<TValue>.Value;

private static bool DetermineRequiresValue(global::System.Type type)
private static bool DetermineRequiresValue([global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] global::System.Type type)
{
if (global::System.Nullable.GetUnderlyingType(type) != null)
{
Expand Down Expand Up @@ -138,7 +138,7 @@ private static bool DetermineRequiresValue(global::System.Type type)
return false;
}

private static class RequirementCache<TValue>
private static class RequirementCache<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] TValue>
{
public static readonly bool Value = DetermineRequiresValue(typeof(TValue));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ partial void ProcessCancelARunResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -143,7 +143,7 @@ partial void ProcessCancelARunResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ partial void ProcessCreateMessageResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -122,7 +122,7 @@ partial void ProcessCreateMessageResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -152,7 +152,7 @@ partial void ProcessCreateMessageResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ partial void ProcessCreateRunResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -131,7 +131,7 @@ partial void ProcessCreateRunResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -161,7 +161,7 @@ partial void ProcessCreateRunResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ partial void ProcessCreateThreadResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -116,7 +116,7 @@ partial void ProcessCreateThreadResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.ThreadObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -146,7 +146,7 @@ partial void ProcessCreateThreadResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.ThreadObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ partial void ProcessCreateThreadAndRunResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -116,7 +116,7 @@ partial void ProcessCreateThreadAndRunResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -146,7 +146,7 @@ partial void ProcessCreateThreadAndRunResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ partial void ProcessDeleteMessageResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.DeleteMessageResponse.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.DeleteMessageResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -143,7 +143,7 @@ partial void ProcessDeleteMessageResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.DeleteMessageResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.DeleteMessageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ partial void ProcessDeleteThreadResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.DeleteThreadResponse.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.DeleteThreadResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -137,7 +137,7 @@ partial void ProcessDeleteThreadResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.DeleteThreadResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.DeleteThreadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ partial void ProcessListMessagesResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.ListMessagesResponse.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.ListMessagesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -178,7 +178,7 @@ partial void ProcessListMessagesResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.ListMessagesResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.ListMessagesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ partial void ProcessListRunStepsResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.ListRunStepsResponse.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.ListRunStepsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -184,7 +184,7 @@ partial void ProcessListRunStepsResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.ListRunStepsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.ListRunStepsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ partial void ProcessListRunsResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.ListRunsResponse.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.ListRunsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -171,7 +171,7 @@ partial void ProcessListRunsResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.ListRunsResponse.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.ListRunsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ partial void ProcessModifyMessageResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -128,7 +128,7 @@ partial void ProcessModifyMessageResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.MessageObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -158,7 +158,7 @@ partial void ProcessModifyMessageResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.MessageObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ partial void ProcessModifyRunResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerOptions);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -128,7 +128,7 @@ partial void ProcessModifyRunResponseContent(
__response.EnsureSuccessStatusCode();

return
global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerOptions) ??
global::tryAGI.OpenAI.RunObject.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -158,7 +158,7 @@ partial void ProcessModifyRunResponseContent(
).ConfigureAwait(false);

return
await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::tryAGI.OpenAI.RunObject.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Loading
Loading