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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public class AgentResponseJsonConverter : global::System.Text.Json.Serialization
if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; }

global::RetellAI.AgentResponseVariant1? value1 = default;
global::RetellAI.AgentRequest? value2 = default;
global::RetellAI.AgentResponseVariant3? value3 = default;
global::RetellAI.AgentResponseVariant1? agentResponseVariant1 = default;
global::RetellAI.AgentRequest? request = default;
global::RetellAI.AgentResponseVariant3? agentResponseVariant3 = default;
if (__bestIndex >= 0)
{
if (__bestIndex == 0)
Expand All @@ -106,7 +106,7 @@ public class AgentResponseJsonConverter : global::System.Text.Json.Serialization
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentResponseVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentResponseVariant1> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentResponseVariant1).Name}");
value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
agentResponseVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -121,7 +121,7 @@ public class AgentResponseJsonConverter : global::System.Text.Json.Serialization
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentRequest> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentRequest).Name}");
value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
request = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -136,7 +136,7 @@ public class AgentResponseJsonConverter : global::System.Text.Json.Serialization
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentResponseVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentResponseVariant3> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentResponseVariant3).Name}");
value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
agentResponseVariant3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -147,13 +147,13 @@ public class AgentResponseJsonConverter : global::System.Text.Json.Serialization
}
}

if (value1 == null && value2 == null && value3 == null)
if (agentResponseVariant1 == null && request == null && agentResponseVariant3 == null)
{
try
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentResponseVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentResponseVariant1> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentResponseVariant1).Name}");
value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
agentResponseVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -166,7 +166,7 @@ public class AgentResponseJsonConverter : global::System.Text.Json.Serialization
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentRequest> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentRequest).Name}");
value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
request = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -179,7 +179,7 @@ public class AgentResponseJsonConverter : global::System.Text.Json.Serialization
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentResponseVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentResponseVariant3> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentResponseVariant3).Name}");
value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
agentResponseVariant3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -190,11 +190,11 @@ public class AgentResponseJsonConverter : global::System.Text.Json.Serialization
}

var __value = new global::RetellAI.AgentResponse(
value1,
agentResponseVariant1,

value2,
request,

value3
agentResponseVariant3
);

return __value;
Expand All @@ -209,23 +209,23 @@ public override void Write(
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

if (value.IsValue1)
if (value.IsAgentResponseVariant1)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentResponseVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentResponseVariant1?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentResponseVariant1).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentResponseVariant1!, typeInfo);
}
else if (value.IsValue2)
else if (value.IsRequest)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentRequest?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentRequest).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Request!, typeInfo);
}
else if (value.IsValue3)
else if (value.IsAgentResponseVariant3)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentResponseVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentResponseVariant3?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentResponseVariant3).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentResponseVariant3!, typeInfo);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class AgentSwapNodeJsonConverter : global::System.Text.Json.Serialization
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }

global::RetellAI.NodeBase? value1 = default;
global::RetellAI.AgentSwapNodeVariant2? value2 = default;
global::RetellAI.NodeBase? @base = default;
global::RetellAI.AgentSwapNodeVariant2? agentSwapNodeVariant2 = default;
if (__bestIndex >= 0)
{
if (__bestIndex == 0)
Expand All @@ -53,7 +53,7 @@ public class AgentSwapNodeJsonConverter : global::System.Text.Json.Serialization
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.NodeBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.NodeBase> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.NodeBase).Name}");
value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
@base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -68,7 +68,7 @@ public class AgentSwapNodeJsonConverter : global::System.Text.Json.Serialization
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentSwapNodeVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentSwapNodeVariant2> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentSwapNodeVariant2).Name}");
value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
agentSwapNodeVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -79,13 +79,13 @@ public class AgentSwapNodeJsonConverter : global::System.Text.Json.Serialization
}
}

if (value1 == null && value2 == null)
if (@base == null && agentSwapNodeVariant2 == null)
{
try
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.NodeBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.NodeBase> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.NodeBase).Name}");
value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
@base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -98,7 +98,7 @@ public class AgentSwapNodeJsonConverter : global::System.Text.Json.Serialization
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentSwapNodeVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentSwapNodeVariant2> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentSwapNodeVariant2).Name}");
value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
agentSwapNodeVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
Expand All @@ -109,9 +109,9 @@ public class AgentSwapNodeJsonConverter : global::System.Text.Json.Serialization
}

var __value = new global::RetellAI.AgentSwapNode(
value1,
@base,

value2
agentSwapNodeVariant2
);

return __value;
Expand All @@ -126,17 +126,17 @@ public override void Write(
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

if (value.IsValue1)
if (value.IsBase)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.NodeBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.NodeBase> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.NodeBase).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!.Value, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!.Value, typeInfo);
}
else if (value.IsValue2)
else if (value.IsAgentSwapNodeVariant2)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.AgentSwapNodeVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.AgentSwapNodeVariant2?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.AgentSwapNodeVariant2).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentSwapNodeVariant2!, typeInfo);
}
}
}
Expand Down
Loading
Loading