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 @@ -5,7 +5,7 @@ namespace TypeSafeAI.Generated
public partial interface IRawTypeSafeClient
{
/// <summary>
/// Models V1<br/>
/// List models<br/>
/// List the models and aliases available to the authenticated account.<br/>
/// Pass a returned model name as `model` in a POST /v1/systemone request.
/// </summary>
Expand All @@ -16,7 +16,7 @@ public partial interface IRawTypeSafeClient
global::TypeSafeAI.Generated.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Models V1<br/>
/// List models<br/>
/// List the models and aliases available to the authenticated account.<br/>
/// Pass a returned model name as `model` in a POST /v1/systemone request.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace TypeSafeAI.Generated
public partial interface IRawTypeSafeClient
{
/// <summary>
/// Systemone<br/>
/// System One<br/>
/// Answer one or more questions about the content supplied in `state`.<br/>
/// You can mix question types in one request. Answers use the same names as the<br/>
/// questions, so you can match each result to its question. The response also includes<br/>
Expand All @@ -21,7 +21,7 @@ public partial interface IRawTypeSafeClient
global::TypeSafeAI.Generated.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Systemone<br/>
/// System One<br/>
/// Answer one or more questions about the content supplied in `state`.<br/>
/// You can mix question types in one request. Answers use the same names as the<br/>
/// questions, so you can match each result to its question. The response also includes<br/>
Expand All @@ -37,27 +37,27 @@ public partial interface IRawTypeSafeClient
global::TypeSafeAI.Generated.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Systemone<br/>
/// System One<br/>
/// Answer one or more questions about the content supplied in `state`.<br/>
/// You can mix question types in one request. Answers use the same names as the<br/>
/// questions, so you can match each result to its question. The response also includes<br/>
/// the model used and token usage.
/// </summary>
/// <param name="state">
/// The content all questions in this request refer to.
/// </param>
/// <param name="model">
/// Name or alias of the model to use. Available names are returned by GET /v1/models.
/// </param>
/// <param name="state">
/// The content all questions in this request refer to.
/// </param>
/// <param name="questions">
/// Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::TypeSafeAI.Generated.SystemOneResponse> SystemoneV1SystemonePostAsync(
global::TypeSafeAI.Generated.AnyOf<string, object, global::System.Collections.Generic.IList<object>> state,
string model,
global::TypeSafeAI.Generated.AnyOf<string, object, global::System.Collections.Generic.IList<object>> state,
global::System.Collections.Generic.Dictionary<string, global::TypeSafeAI.Generated.Question> questions,
global::TypeSafeAI.Generated.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ public class AnswerJsonConverter : global::System.Text.Json.Serialization.JsonCo
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::TypeSafeAI.Generated.NoulAnswer)}");
noul = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::TypeSafeAI.Generated.ScoreAnswer? score = default;
if (discriminator?.Type == global::TypeSafeAI.Generated.AnswerDiscriminatorType.Score)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::TypeSafeAI.Generated.ScoreAnswer), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::TypeSafeAI.Generated.ScoreAnswer> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::TypeSafeAI.Generated.ScoreAnswer)}");
score = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::TypeSafeAI.Generated.ChoiceAnswer? choice = default;
if (discriminator?.Type == global::TypeSafeAI.Generated.AnswerDiscriminatorType.Choice)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::TypeSafeAI.Generated.ChoiceAnswer), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::TypeSafeAI.Generated.ChoiceAnswer> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::TypeSafeAI.Generated.ChoiceAnswer)}");
choice = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::TypeSafeAI.Generated.ScoreAnswer? score = default;
if (discriminator?.Type == global::TypeSafeAI.Generated.AnswerDiscriminatorType.Score)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::TypeSafeAI.Generated.ScoreAnswer), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::TypeSafeAI.Generated.ScoreAnswer> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::TypeSafeAI.Generated.ScoreAnswer)}");
score = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}

var __value = new global::TypeSafeAI.Generated.Answer(
discriminator?.Type,
noul,

score,
choice,

choice
score
);

return __value;
Expand All @@ -70,18 +70,18 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::TypeSafeAI.Generated.NoulAnswer).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickNoul(), typeInfo);
}
else if (value.IsScore)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::TypeSafeAI.Generated.ScoreAnswer), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::TypeSafeAI.Generated.ScoreAnswer?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::TypeSafeAI.Generated.ScoreAnswer).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickScore(), typeInfo);
}
else if (value.IsChoice)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::TypeSafeAI.Generated.ChoiceAnswer), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::TypeSafeAI.Generated.ChoiceAnswer?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::TypeSafeAI.Generated.ChoiceAnswer).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChoice(), typeInfo);
}
else if (value.IsScore)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::TypeSafeAI.Generated.ScoreAnswer), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::TypeSafeAI.Generated.ScoreAnswer?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::TypeSafeAI.Generated.ScoreAnswer).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickScore(), typeInfo);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ namespace TypeSafeAI.Generated
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<object>), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.Answer), TypeInfoPropertyName = "Answer2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.NoulAnswer))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.ScoreAnswer))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.ChoiceAnswer))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.ScoreAnswer))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.AnswerDiscriminator))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::TypeSafeAI.Generated.AnswerDiscriminatorType), TypeInfoPropertyName = "AnswerDiscriminatorType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(string))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::TypeSafeAI.Generated.ScoreAnswer? Type2 { get; set; }
public global::TypeSafeAI.Generated.ChoiceAnswer? Type2 { get; set; }
/// <summary>
///
/// </summary>
public global::TypeSafeAI.Generated.ChoiceAnswer? Type3 { get; set; }
public global::TypeSafeAI.Generated.ScoreAnswer? Type3 { get; set; }
/// <summary>
///
/// </summary>
Expand Down
Loading
Loading