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
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ partial void ProcessCreateAndEscalateThreadResponseContent(
__response.EnsureSuccessStatusCode();

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

return
await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.ResultInAppThreadString.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::Helicone.ResultSuccessBooleanString.FromJson(__content, JsonSerializerOptions) ??
global::Helicone.ResultSuccessBooleanString.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::Helicone.ResultSuccessBooleanString.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.ResultSuccessBooleanString.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 ProcessEscalateThreadResponseContent(
__response.EnsureSuccessStatusCode();

return
global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerOptions) ??
global::Helicone.ResultInAppThreadString.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 ProcessEscalateThreadResponseContent(
).ConfigureAwait(false);

return
await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.ResultInAppThreadString.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 @@ -65,7 +65,7 @@ partial void ProcessGenerateResponseContent(
__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 @@ -114,7 +114,7 @@ partial void ProcessGenerateResponseContent(
__response.EnsureSuccessStatusCode();

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

return
await global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.ResultChatCompletionOrContentStringReasoningStringCallsAnyString.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 @@ -101,7 +101,7 @@ partial void ProcessGetAllThreadsResponseContent(
__response.EnsureSuccessStatusCode();

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

return
await global::Helicone.ResultThreadSummaryArrayString.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.ResultThreadSummaryArrayString.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 ProcessGetThreadResponseContent(
__response.EnsureSuccessStatusCode();

return
global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerOptions) ??
global::Helicone.ResultInAppThreadString.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 ProcessGetThreadResponseContent(
).ConfigureAwait(false);

return
await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.ResultInAppThreadString.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 ProcessReopenThreadResponseContent(
__response.EnsureSuccessStatusCode();

return
global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerOptions) ??
global::Helicone.ResultInAppThreadString.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 ProcessReopenThreadResponseContent(
).ConfigureAwait(false);

return
await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.ResultInAppThreadString.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 ProcessSearchDocsResponseContent(
__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 ProcessSearchDocsResponseContent(
__response.EnsureSuccessStatusCode();

return
global::Helicone.ResultStringString.FromJson(__content, JsonSerializerOptions) ??
global::Helicone.ResultStringString.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 ProcessSearchDocsResponseContent(
).ConfigureAwait(false);

return
await global::Helicone.ResultStringString.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.ResultStringString.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 ProcessUpsertThreadMessageResponseContent(
__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 ProcessUpsertThreadMessageResponseContent(
__response.EnsureSuccessStatusCode();

return
global::Helicone.ResultInAppThreadString.FromJson(__content, JsonSerializerOptions) ??
global::Helicone.ResultInAppThreadString.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 ProcessUpsertThreadMessageResponseContent(
).ConfigureAwait(false);

return
await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.ResultInAppThreadString.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Helicone/Generated/Helicone.AgentClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public sealed partial class AgentClient : global::Helicone.IAgentClient, global:
/// <summary>
///
/// </summary>
public global::System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get; set; } = new global::System.Text.Json.JsonSerializerOptions();
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Helicone.SourceGenerationContext.Default;


/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions src/libs/Helicone/Generated/Helicone.AllOf.2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Helicone
/// <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 @@ -67,7 +67,7 @@ partial void ProcessCreateAPIKeyResponseContent(
__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 ProcessCreateAPIKeyResponseContent(
__response.EnsureSuccessStatusCode();

return
global::Helicone.AnyOf<global::Helicone.CreateAPIKeyResponseVariant1, global::Helicone.CreateAPIKeyResponseVariant2>.FromJson(__content, JsonSerializerOptions) ??
global::Helicone.AnyOf<global::Helicone.CreateAPIKeyResponseVariant1, global::Helicone.CreateAPIKeyResponseVariant2>.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 ProcessCreateAPIKeyResponseContent(
).ConfigureAwait(false);

return
await global::Helicone.AnyOf<global::Helicone.CreateAPIKeyResponseVariant1, global::Helicone.CreateAPIKeyResponseVariant2>.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.AnyOf<global::Helicone.CreateAPIKeyResponseVariant1, global::Helicone.CreateAPIKeyResponseVariant2>.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 ProcessCreateProviderKeyResponseContent(
__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 ProcessCreateProviderKeyResponseContent(
__response.EnsureSuccessStatusCode();

return
global::Helicone.AnyOf<global::Helicone.CreateProviderKeyResponseVariant1, global::Helicone.CreateProviderKeyResponseVariant2>.FromJson(__content, JsonSerializerOptions) ??
global::Helicone.AnyOf<global::Helicone.CreateProviderKeyResponseVariant1, global::Helicone.CreateProviderKeyResponseVariant2>.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 ProcessCreateProviderKeyResponseContent(
).ConfigureAwait(false);

return
await global::Helicone.AnyOf<global::Helicone.CreateProviderKeyResponseVariant1, global::Helicone.CreateProviderKeyResponseVariant2>.FromJsonStreamAsync(__content, JsonSerializerOptions).ConfigureAwait(false) ??
await global::Helicone.AnyOf<global::Helicone.CreateProviderKeyResponseVariant1, global::Helicone.CreateProviderKeyResponseVariant2>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
Expand Down
Loading