diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.IRawTypeSafeClient.ModelsV1V1ModelsGet.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.IRawTypeSafeClient.ModelsV1V1ModelsGet.g.cs index 177b085..83a20e7 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.IRawTypeSafeClient.ModelsV1V1ModelsGet.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.IRawTypeSafeClient.ModelsV1V1ModelsGet.g.cs @@ -5,7 +5,7 @@ namespace TypeSafeAI.Generated public partial interface IRawTypeSafeClient { /// - /// Models V1
+ /// List models
/// List the models and aliases available to the authenticated account.
/// Pass a returned model name as `model` in a POST /v1/systemone request. ///
@@ -16,7 +16,7 @@ public partial interface IRawTypeSafeClient global::TypeSafeAI.Generated.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Models V1
+ /// List models
/// List the models and aliases available to the authenticated account.
/// Pass a returned model name as `model` in a POST /v1/systemone request. ///
diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.IRawTypeSafeClient.SystemoneV1SystemonePost.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.IRawTypeSafeClient.SystemoneV1SystemonePost.g.cs index 47ba355..0afeeb2 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.IRawTypeSafeClient.SystemoneV1SystemonePost.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.IRawTypeSafeClient.SystemoneV1SystemonePost.g.cs @@ -5,7 +5,7 @@ namespace TypeSafeAI.Generated public partial interface IRawTypeSafeClient { /// - /// Systemone
+ /// System One
/// Answer one or more questions about the content supplied in `state`.
/// You can mix question types in one request. Answers use the same names as the
/// questions, so you can match each result to its question. The response also includes
@@ -21,7 +21,7 @@ public partial interface IRawTypeSafeClient global::TypeSafeAI.Generated.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Systemone
+ /// System One
/// Answer one or more questions about the content supplied in `state`.
/// You can mix question types in one request. Answers use the same names as the
/// questions, so you can match each result to its question. The response also includes
@@ -37,18 +37,18 @@ public partial interface IRawTypeSafeClient global::TypeSafeAI.Generated.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Systemone
+ /// System One
/// Answer one or more questions about the content supplied in `state`.
/// You can mix question types in one request. Answers use the same names as the
/// questions, so you can match each result to its question. The response also includes
/// the model used and token usage. ///
- /// - /// The content all questions in this request refer to. - /// /// /// Name or alias of the model to use. Available names are returned by GET /v1/models. /// + /// + /// The content all questions in this request refer to. + /// /// /// Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers. /// @@ -56,8 +56,8 @@ public partial interface IRawTypeSafeClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task SystemoneV1SystemonePostAsync( - global::TypeSafeAI.Generated.AnyOf> state, string model, + global::TypeSafeAI.Generated.AnyOf> state, global::System.Collections.Generic.Dictionary questions, global::TypeSafeAI.Generated.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonConverters.Answer.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonConverters.Answer.g.cs index a62789f..c484574 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonConverters.Answer.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonConverters.Answer.g.cs @@ -28,13 +28,6 @@ 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 ?? - 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) { @@ -42,14 +35,21 @@ public class AnswerJsonConverter : global::System.Text.Json.Serialization.JsonCo 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 ?? + 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; @@ -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 ?? - 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 ?? 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 ?? + 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); + } } } } \ No newline at end of file diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContext.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContext.g.cs index e09e6a5..6c821ba 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContext.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContext.g.cs @@ -50,8 +50,8 @@ namespace TypeSafeAI.Generated [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), 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))] diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContextTypes.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContextTypes.g.cs index 875863f..dd03172 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContextTypes.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.JsonSerializerContextTypes.g.cs @@ -41,11 +41,11 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::TypeSafeAI.Generated.ScoreAnswer? Type2 { get; set; } + public global::TypeSafeAI.Generated.ChoiceAnswer? Type2 { get; set; } /// /// /// - public global::TypeSafeAI.Generated.ChoiceAnswer? Type3 { get; set; } + public global::TypeSafeAI.Generated.ScoreAnswer? Type3 { get; set; } /// /// /// diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.Answer.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.Answer.g.cs index ad2c3d8..f618e6e 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.Answer.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.Answer.g.cs @@ -52,78 +52,78 @@ public bool TryPickNoul( : throw new global::System.InvalidOperationException($"Expected union variant 'Noul' but the value was {ToString()}."); /// - /// An expected score with its rubric, confidence, and score-level probabilities. + /// The selected choice, confidence, and probabilities for a choice question. /// #if NET6_0_OR_GREATER - public global::TypeSafeAI.Generated.ScoreAnswer? Score { get; init; } + public global::TypeSafeAI.Generated.ChoiceAnswer? Choice { get; init; } #else - public global::TypeSafeAI.Generated.ScoreAnswer? Score { get; } + public global::TypeSafeAI.Generated.ChoiceAnswer? Choice { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Score))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Choice))] #endif - public bool IsScore => Score != null; + public bool IsChoice => Choice != null; /// /// /// - public bool TryPickScore( + public bool TryPickChoice( #if NET6_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out global::TypeSafeAI.Generated.ScoreAnswer? value) + out global::TypeSafeAI.Generated.ChoiceAnswer? value) { - value = Score; - return IsScore; + value = Choice; + return IsChoice; } /// /// /// - public global::TypeSafeAI.Generated.ScoreAnswer PickScore() => Score is { } value + public global::TypeSafeAI.Generated.ChoiceAnswer PickChoice() => Choice is { } value ? value - : throw new global::System.InvalidOperationException($"Expected union variant 'Score' but the value was {ToString()}."); + : throw new global::System.InvalidOperationException($"Expected union variant 'Choice' but the value was {ToString()}."); /// - /// The selected choice, confidence, and probabilities for a choice question. + /// An expected score with its rubric, confidence, and score-level probabilities. /// #if NET6_0_OR_GREATER - public global::TypeSafeAI.Generated.ChoiceAnswer? Choice { get; init; } + public global::TypeSafeAI.Generated.ScoreAnswer? Score { get; init; } #else - public global::TypeSafeAI.Generated.ChoiceAnswer? Choice { get; } + public global::TypeSafeAI.Generated.ScoreAnswer? Score { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Choice))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Score))] #endif - public bool IsChoice => Choice != null; + public bool IsScore => Score != null; /// /// /// - public bool TryPickChoice( + public bool TryPickScore( #if NET6_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out global::TypeSafeAI.Generated.ChoiceAnswer? value) + out global::TypeSafeAI.Generated.ScoreAnswer? value) { - value = Choice; - return IsChoice; + value = Score; + return IsScore; } /// /// /// - public global::TypeSafeAI.Generated.ChoiceAnswer PickChoice() => Choice is { } value + public global::TypeSafeAI.Generated.ScoreAnswer PickScore() => Score is { } value ? value - : throw new global::System.InvalidOperationException($"Expected union variant 'Choice' but the value was {ToString()}."); + : throw new global::System.InvalidOperationException($"Expected union variant 'Score' but the value was {ToString()}."); /// /// /// @@ -150,48 +150,48 @@ public Answer(global::TypeSafeAI.Generated.NoulAnswer? value) /// /// /// - public static implicit operator Answer(global::TypeSafeAI.Generated.ScoreAnswer value) => new Answer((global::TypeSafeAI.Generated.ScoreAnswer?)value); + public static implicit operator Answer(global::TypeSafeAI.Generated.ChoiceAnswer value) => new Answer((global::TypeSafeAI.Generated.ChoiceAnswer?)value); /// /// /// - public static implicit operator global::TypeSafeAI.Generated.ScoreAnswer?(Answer @this) => @this.Score; + public static implicit operator global::TypeSafeAI.Generated.ChoiceAnswer?(Answer @this) => @this.Choice; /// /// /// - public Answer(global::TypeSafeAI.Generated.ScoreAnswer? value) + public Answer(global::TypeSafeAI.Generated.ChoiceAnswer? value) { - Score = value; + Choice = value; } /// /// /// - public static Answer FromScore(global::TypeSafeAI.Generated.ScoreAnswer? value) => new Answer(value); + public static Answer FromChoice(global::TypeSafeAI.Generated.ChoiceAnswer? value) => new Answer(value); /// /// /// - public static implicit operator Answer(global::TypeSafeAI.Generated.ChoiceAnswer value) => new Answer((global::TypeSafeAI.Generated.ChoiceAnswer?)value); + public static implicit operator Answer(global::TypeSafeAI.Generated.ScoreAnswer value) => new Answer((global::TypeSafeAI.Generated.ScoreAnswer?)value); /// /// /// - public static implicit operator global::TypeSafeAI.Generated.ChoiceAnswer?(Answer @this) => @this.Choice; + public static implicit operator global::TypeSafeAI.Generated.ScoreAnswer?(Answer @this) => @this.Score; /// /// /// - public Answer(global::TypeSafeAI.Generated.ChoiceAnswer? value) + public Answer(global::TypeSafeAI.Generated.ScoreAnswer? value) { - Choice = value; + Score = value; } /// /// /// - public static Answer FromChoice(global::TypeSafeAI.Generated.ChoiceAnswer? value) => new Answer(value); + public static Answer FromScore(global::TypeSafeAI.Generated.ScoreAnswer? value) => new Answer(value); /// /// @@ -199,23 +199,23 @@ public Answer(global::TypeSafeAI.Generated.ChoiceAnswer? value) public Answer( global::TypeSafeAI.Generated.AnswerDiscriminatorType? type, global::TypeSafeAI.Generated.NoulAnswer? noul, - global::TypeSafeAI.Generated.ScoreAnswer? score, - global::TypeSafeAI.Generated.ChoiceAnswer? choice + global::TypeSafeAI.Generated.ChoiceAnswer? choice, + global::TypeSafeAI.Generated.ScoreAnswer? score ) { Type = type; Noul = noul; - Score = score; Choice = choice; + Score = score; } /// /// /// public object? Object => - Choice as object ?? Score as object ?? + Choice as object ?? Noul as object ; @@ -224,8 +224,8 @@ Noul as object /// public override string? ToString() => Noul?.ToString() ?? - Score?.ToString() ?? - Choice?.ToString() + Choice?.ToString() ?? + Score?.ToString() ; /// @@ -233,7 +233,7 @@ Noul as object /// public bool Validate() { - return IsNoul && !IsScore && !IsChoice || !IsNoul && IsScore && !IsChoice || !IsNoul && !IsScore && IsChoice; + return IsNoul && !IsChoice && !IsScore || !IsNoul && IsChoice && !IsScore || !IsNoul && !IsChoice && IsScore; } /// @@ -241,8 +241,8 @@ public bool Validate() /// public TResult? Match( global::System.Func? noul = null, - global::System.Func? score = null, global::System.Func? choice = null, + global::System.Func? score = null, bool validate = true) { if (validate) @@ -254,13 +254,13 @@ public bool Validate() { return noul(__value0); } - else if (Score is { } __value1 && score != null) + else if (Choice is { } __value1 && choice != null) { - return score(__value1); + return choice(__value1); } - else if (Choice is { } __value2 && choice != null) + else if (Score is { } __value2 && score != null) { - return choice(__value2); + return score(__value2); } return default(TResult); @@ -272,9 +272,9 @@ public bool Validate() public void Match( global::System.Action? noul = null, - global::System.Action? score = null, - global::System.Action? choice = null, + + global::System.Action? score = null, bool validate = true) { if (validate) @@ -286,13 +286,13 @@ public void Match( { noul?.Invoke(__value0); } - else if (Score is { } __value1) + else if (Choice is { } __value1) { - score?.Invoke(__value1); + choice?.Invoke(__value1); } - else if (Choice is { } __value2) + else if (Score is { } __value2) { - choice?.Invoke(__value2); + score?.Invoke(__value2); } } @@ -301,8 +301,8 @@ public void Match( /// public void Switch( global::System.Action? noul = null, - global::System.Action? score = null, global::System.Action? choice = null, + global::System.Action? score = null, bool validate = true) { if (validate) @@ -314,13 +314,13 @@ public void Switch( { noul?.Invoke(__value0); } - else if (Score is { } __value1) + else if (Choice is { } __value1) { - score?.Invoke(__value1); + choice?.Invoke(__value1); } - else if (Choice is { } __value2) + else if (Score is { } __value2) { - choice?.Invoke(__value2); + score?.Invoke(__value2); } } @@ -333,10 +333,10 @@ public override int GetHashCode() { Noul, typeof(global::TypeSafeAI.Generated.NoulAnswer), - Score, - typeof(global::TypeSafeAI.Generated.ScoreAnswer), Choice, typeof(global::TypeSafeAI.Generated.ChoiceAnswer), + Score, + typeof(global::TypeSafeAI.Generated.ScoreAnswer), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -354,8 +354,8 @@ public bool Equals(Answer other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(Noul, other.Noul) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Score, other.Score) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Choice, other.Choice) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Choice, other.Choice) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Score, other.Score) ; } diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.SystemOneRequest.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.SystemOneRequest.g.cs index e89a21e..2a31826 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.SystemOneRequest.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.Models.SystemOneRequest.g.cs @@ -9,19 +9,19 @@ namespace TypeSafeAI.Generated public sealed partial class SystemOneRequest { /// - /// The content all questions in this request refer to. + /// Name or alias of the model to use. Available names are returned by GET /v1/models. /// - [global::System.Text.Json.Serialization.JsonPropertyName("state")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::TypeSafeAI.Generated.JsonConverters.AnyOfJsonConverter>))] + [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::TypeSafeAI.Generated.AnyOf> State { get; set; } + public required string Model { get; set; } /// - /// Name or alias of the model to use. Available names are returned by GET /v1/models. + /// The content all questions in this request refer to. /// - [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonPropertyName("state")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::TypeSafeAI.Generated.JsonConverters.AnyOfJsonConverter>))] [global::System.Text.Json.Serialization.JsonRequired] - public required string Model { get; set; } + public required global::TypeSafeAI.Generated.AnyOf> State { get; set; } /// /// Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers. @@ -39,12 +39,12 @@ public sealed partial class SystemOneRequest /// /// Initializes a new instance of the class. /// - /// - /// The content all questions in this request refer to. - /// /// /// Name or alias of the model to use. Available names are returned by GET /v1/models. /// + /// + /// The content all questions in this request refer to. + /// /// /// Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers. /// @@ -52,12 +52,12 @@ public sealed partial class SystemOneRequest [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SystemOneRequest( - global::TypeSafeAI.Generated.AnyOf> state, string model, + global::TypeSafeAI.Generated.AnyOf> state, global::System.Collections.Generic.Dictionary questions) { - this.State = state; this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.State = state; this.Questions = questions ?? throw new global::System.ArgumentNullException(nameof(questions)); } diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.ModelsV1V1ModelsGet.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.ModelsV1V1ModelsGet.g.cs index a030e74..44ccbd5 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.ModelsV1V1ModelsGet.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.ModelsV1V1ModelsGet.g.cs @@ -40,7 +40,7 @@ partial void ProcessModelsV1V1ModelsGetResponseContent( ref string content); /// - /// Models V1
+ /// List models
/// List the models and aliases available to the authenticated account.
/// Pass a returned model name as `model` in a POST /v1/systemone request. ///
@@ -59,7 +59,7 @@ partial void ProcessModelsV1V1ModelsGetResponseContent( return __response.Body; } /// - /// Models V1
+ /// List models
/// List the models and aliases available to the authenticated account.
/// Pass a returned model name as `model` in a POST /v1/systemone request. ///
diff --git a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.SystemoneV1SystemonePost.g.cs b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.SystemoneV1SystemonePost.g.cs index 899826f..0bc2a65 100644 --- a/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.SystemoneV1SystemonePost.g.cs +++ b/src/libs/TypeSafeAI/Generated/TypeSafeAI.Generated.RawTypeSafeClient.SystemoneV1SystemonePost.g.cs @@ -42,7 +42,7 @@ partial void ProcessSystemoneV1SystemonePostResponseContent( ref string content); /// - /// Systemone
+ /// System One
/// Answer one or more questions about the content supplied in `state`.
/// You can mix question types in one request. Answers use the same names as the
/// questions, so you can match each result to its question. The response also includes
@@ -68,7 +68,7 @@ partial void ProcessSystemoneV1SystemonePostResponseContent( return __response.Body; } /// - /// Systemone
+ /// System One
/// Answer one or more questions about the content supplied in `state`.
/// You can mix question types in one request. Answers use the same names as the
/// questions, so you can match each result to its question. The response also includes
@@ -477,18 +477,18 @@ partial void ProcessSystemoneV1SystemonePostResponseContent( } } /// - /// Systemone
+ /// System One
/// Answer one or more questions about the content supplied in `state`.
/// You can mix question types in one request. Answers use the same names as the
/// questions, so you can match each result to its question. The response also includes
/// the model used and token usage. ///
- /// - /// The content all questions in this request refer to. - /// /// /// Name or alias of the model to use. Available names are returned by GET /v1/models. /// + /// + /// The content all questions in this request refer to. + /// /// /// Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers. /// @@ -496,16 +496,16 @@ partial void ProcessSystemoneV1SystemonePostResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task SystemoneV1SystemonePostAsync( - global::TypeSafeAI.Generated.AnyOf> state, string model, + global::TypeSafeAI.Generated.AnyOf> state, global::System.Collections.Generic.Dictionary questions, global::TypeSafeAI.Generated.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::TypeSafeAI.Generated.SystemOneRequest { - State = state, Model = model, + State = state, Questions = questions, }; diff --git a/src/libs/TypeSafeAI/Generated/autosdk.generated-examples.json b/src/libs/TypeSafeAI/Generated/autosdk.generated-examples.json new file mode 100644 index 0000000..58800ac --- /dev/null +++ b/src/libs/TypeSafeAI/Generated/autosdk.generated-examples.json @@ -0,0 +1,15 @@ +{ + "Examples": [ + { + "Order": 1, + "Title": "System One", + "Slug": "systemone-v1-systemone-post", + "Description": "Answer one or more questions about the content supplied in \u0060state\u0060.\n\nYou can mix question types in one request. Answers use the same names as the\nquestions, so you can match each result to its question. The response also includes\nthe model used and token usage.", + "Language": "csharp", + "Code": "using var client = RawTypeSafeClient.CreateFromEnvironment();\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::TypeSafeAI.Generated.SystemOneRequest\u003E(\n @\u0022{\n \u0022\u0022model\u0022\u0022: \u0022\u0022jev-latest\u0022\u0022,\n \u0022\u0022state\u0022\u0022: \u0022\u0022I was charged twice for my subscription this month. Please refund the extra charge.\u0022\u0022,\n \u0022\u0022questions\u0022\u0022: {\n \u0022\u0022tone\u0022\u0022: {\n \u0022\u0022type\u0022\u0022: \u0022\u0022choice\u0022\u0022,\n \u0022\u0022instructions\u0022\u0022: \u0022\u0022What is the tone of this message?\u0022\u0022,\n \u0022\u0022criteria\u0022\u0022: {\n \u0022\u0022angry\u0022\u0022: \u0022\u0022An upset or hostile message\u0022\u0022,\n \u0022\u0022calm\u0022\u0022: \u0022\u0022A neutral or polite message\u0022\u0022,\n \u0022\u0022excited\u0022\u0022: \u0022\u0022An enthusiastic or eager message\u0022\u0022\n }\n }\n }\n}\u0022)!;\n\nvar response = await client.SystemoneV1SystemonePostAsync(\n request: request\n);\n\n// Example response:\n// {\n// \u0022model\u0022: \u0022jev-latest\u0022,\n// \u0022answers\u0022: {\n// \u0022tone\u0022: {\n// \u0022type\u0022: \u0022choice\u0022,\n// \u0022choice\u0022: \u0022calm\u0022,\n// \u0022confidence\u0022: 0.7,\n// \u0022probabilities\u0022: {\n// \u0022angry\u0022: 0.15,\n// \u0022calm\u0022: 0.8,\n// \u0022excited\u0022: 0.05\n// }\n// }\n// },\n// \u0022usage\u0022: {\n// \u0022input_tokens\u0022: 120,\n// \u0022output_tokens\u0022: 12\n// }\n// }", + "Format": "sdk", + "OperationId": "systemone_v1_systemone_post", + "Setup": "This example assumes \u0060using TypeSafeAI.Generated;\u0060 is in scope and a configured credential environment variable is set: \u0060TYPESAFE_API_KEY\u0060." + } + ] +} \ No newline at end of file diff --git a/src/libs/TypeSafeAI/openapi.yaml b/src/libs/TypeSafeAI/openapi.yaml index 3f1f48b..72c4c61 100644 --- a/src/libs/TypeSafeAI/openapi.yaml +++ b/src/libs/TypeSafeAI/openapi.yaml @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"TypeSafe","description":"Ask yes/no questions, evaluate statements, select choices, or assign ratings to your content. Send your API key in the Authorization header as `Bearer `. Use GET /v1/models to discover available model names.","version":"0.2.0"},"paths":{"/v1/systemone":{"post":{"summary":"Systemone","description":"Answer one or more questions about the content supplied in `state`.\n\nYou can mix question types in one request. Answers use the same names as the\nquestions, so you can match each result to its question. The response also includes\nthe model used and token usage.","operationId":"systemone_v1_systemone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/models":{"get":{"summary":"Models V1","description":"List the models and aliases available to the authenticated account.\n\nPass a returned model name as `model` in a POST /v1/systemone request.","operationId":"models_v1_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelMetadataList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"Answer":{"oneOf":[{"$ref":"#/components/schemas/NoulAnswer"},{"$ref":"#/components/schemas/ScoreAnswer"},{"$ref":"#/components/schemas/ChoiceAnswer"}],"description":"An answer whose type matches the corresponding question.","discriminator":{"propertyName":"type","mapping":{"choice":"#/components/schemas/ChoiceAnswer","noul":"#/components/schemas/NoulAnswer","score":"#/components/schemas/ScoreAnswer"}}},"ChoiceAnswer":{"properties":{"type":{"type":"string","const":"choice","title":"Type","description":"Identifies a selection from the requested choices.","examples":["choice"]},"choice":{"type":"string","title":"Choice","description":"The name of the choice with the highest probability among the question's criteria.","examples":["angry"]},"confidence":{"type":"number","title":"Confidence","description":"Confidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review.","examples":[0.9]},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","description":"Probability of each choice in criteria, keyed by choice name, from 0 to 1. Shows how likely the alternatives are; values sum to approximately 1.","examples":[{"angry":0.8,"calm":0.1,"excited":0.1}]}},"type":"object","required":["choice","confidence","probabilities","type"],"title":"ChoiceAnswer","description":"The selected choice, confidence, and probabilities for a choice question."},"ChoiceQuestion":{"properties":{"type":{"type":"string","const":"choice","title":"Type","description":"Identifies a question that selects one of the choices in criteria.","examples":["choice"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Instructions","description":"What the model should decide when choosing an option.","examples":["What is the tone of this message?"]},"criteria":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}]},"type":"object","title":"Criteria","description":"Choice names and descriptions of when each applies. A choice without a description is interpreted by its name alone.","examples":[{"angry":"An upset or hostile message","calm":"A neutral or polite message","excited":"An enthusiastic or eager message"}]}},"type":"object","required":["criteria","type"],"title":"ChoiceQuestion","description":"A question that selects one option from the choices you define."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail","description":"Validation errors describing which request values are missing or invalid.","examples":[[{"loc":["body","state"],"msg":"Field required","type":"missing"}]]}},"type":"object","title":"HTTPValidationError","description":"Request validation failures returned with HTTP status 422."},"ModelMetadata":{"properties":{"name":{"type":"string","title":"Name","description":"Model name or alias accepted by the request's model field.","examples":["jev-latest"]},"description":{"type":"string","title":"Description","description":"Human-readable description of the model and its capabilities.","examples":["General-purpose system one model."]},"release_date":{"type":"string","title":"Release Date","description":"Model release date, formatted as YYYY-MM-DD.","examples":["2026-09-15"]}},"type":"object","required":["name","description","release_date"],"title":"ModelMetadata","description":"A model or model alias available to the authenticated account."},"ModelMetadataList":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelMetadata"},"type":"array","title":"Models","description":"Available models and aliases. Use a model's name in POST /v1/systemone requests.","examples":[[{"description":"General-purpose system one model.","name":"jev-latest","release_date":"2026-09-15"}]]}},"type":"object","required":["models"],"title":"ModelMetadataList","description":"Models and aliases available to the authenticated account."},"NoulAnswer":{"properties":{"type":{"type":"string","const":"noul","title":"Type","description":"Identifies a yes/no answer.","examples":["noul"]},"noul":{"type":"number","title":"Noul","description":"Probability of a yes answer or a true statement, from 0 to 1. Values near 1 favor yes or true, values near 0 favor no or false, and values near 0.5 indicate uncertainty.","examples":[0.98]}},"type":"object","required":["noul","type"],"title":"NoulAnswer","description":"The probability of a yes answer or a true statement."},"NoulCriteria":{"properties":{"true":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"True","description":"What counts as a yes answer.","examples":["The message is unsolicited advertising."]},"false":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"False","description":"What counts as a no answer.","examples":["The message is a legitimate conversation."]}},"type":"object","title":"NoulCriteria","description":"Criteria defining what counts as a yes or no answer."},"NoulQuestion":{"properties":{"type":{"type":"string","const":"noul","title":"Type","description":"Identifies a yes/no question or statement.","examples":["noul"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Instructions","description":"The yes/no question or statement to evaluate.","examples":["Is this message spam?","This message contains unsolicited advertising.",{"task":"Identify unsolicited advertising."}]},"criteria":{"anyOf":[{"$ref":"#/components/schemas/NoulCriteria"},{"type":"null"}],"description":"Criteria clarifying what counts as a yes or no answer.","examples":[{"false":"A legitimate conversation","true":"Unsolicited advertising"}]}},"type":"object","title":"NoulQuestion","description":"A yes/no question or statement, answered with the probability of yes or true.","required":["type"]},"Question":{"oneOf":[{"$ref":"#/components/schemas/NoulQuestion"},{"$ref":"#/components/schemas/ChoiceQuestion"},{"$ref":"#/components/schemas/ScoreQuestion"}],"description":"A question about the supplied content.","discriminator":{"propertyName":"type","mapping":{"choice":"#/components/schemas/ChoiceQuestion","noul":"#/components/schemas/NoulQuestion","score":"#/components/schemas/ScoreQuestion"}}},"ScoreAnswer":{"properties":{"type":{"type":"string","const":"score","title":"Type","description":"Identifies a rating against the requested score levels.","examples":["score"]},"score":{"type":"number","title":"Score","description":"Expected score: the probability-weighted average of the rubric levels. May fall between integer levels.","examples":[1.7]},"confidence":{"type":"number","title":"Confidence","description":"Confidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review.","examples":[0.9]},"legend":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}]},"type":"object","title":"Legend","description":"The requested criteria mapped to their score levels, so you can interpret the score.","examples":[{"0":"Can wait","1":"Needs attention this week","2":"Needs attention today"}]},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","description":"Probability of each score level, from 0 to 1, using the same keys as legend. Shows how likely the alternatives are; values sum to approximately 1.","examples":[{"0":0.1,"1":0.1,"2":0.8}]}},"type":"object","required":["score","confidence","legend","probabilities","type"],"title":"ScoreAnswer","description":"An expected score with its rubric, confidence, and score-level probabilities."},"ScoreQuestion":{"properties":{"type":{"type":"string","const":"score","title":"Type","description":"Identifies a question that rates the content using the levels in criteria.","examples":["score"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Instructions","description":"What the model should rate.","examples":["How urgent is this message?"]},"criteria":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}]},"type":"array","minItems":1,"title":"Criteria","description":"Ordered descriptions of the score levels. Each description's position determines its score, starting at zero.","examples":[["Can wait","Needs attention this week","Needs attention today"]]}},"type":"object","required":["criteria","type"],"title":"ScoreQuestion","description":"A question that assigns a score using an ordered rubric."},"SystemOneRequest":{"properties":{"state":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"State","description":"The content all questions in this request refer to.","examples":["I was charged twice. Please help.",{"message":"Please help.","subject":"Duplicate charge"}]},"model":{"type":"string","title":"Model","description":"Name or alias of the model to use. Available names are returned by GET /v1/models.","examples":["jev-latest"]},"questions":{"additionalProperties":{"$ref":"#/components/schemas/Question"},"type":"object","minProperties":1,"title":"Questions","description":"Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers.","examples":[{"billing":{"instructions":"Is this message about billing?","type":"noul"}}]}},"type":"object","required":["model","questions","state"],"title":"SystemOneRequest","description":"Content and named questions to evaluate together using a TypeSafe model."},"SystemOneResponse":{"properties":{"model":{"type":"string","title":"Model","description":"Name of the model that answered the questions. May differ from the alias supplied in the request.","examples":["jev-latest"]},"answers":{"additionalProperties":{"$ref":"#/components/schemas/Answer"},"type":"object","minProperties":1,"title":"Answers","description":"Answers keyed by the question names supplied in the request. Each answer's type matches its question's type.","examples":[{"billing":{"noul":0.98,"type":"noul"}}]},"usage":{"$ref":"#/components/schemas/Usage","description":"Input and output token counts for this evaluation.","examples":[{"input_tokens":120,"output_tokens":12}]}},"type":"object","required":["model","answers","usage"],"title":"SystemOneResponse","description":"Answers grouped by question name, with the model used and token usage."},"Usage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Number of billable input tokens used to evaluate the request.","examples":[120]},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Number of output tokens used to answer the questions. Output tokens are currently free of charge.","examples":[12]}},"type":"object","required":["input_tokens","output_tokens"],"title":"Usage","description":"Token usage for the request."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location","description":"Path to the invalid value: the request location followed by field names and array indices.","examples":[["body","questions","urgency","score","criteria"]]},"msg":{"type":"string","title":"Message","description":"Human-readable explanation of the validation failure.","examples":["Field required"]},"type":{"type":"string","title":"Error Type","description":"Machine-readable validation error code.","examples":["missing"]},"input":{"title":"Input","description":"The input value that failed validation.","examples":[{"type":"score"}]},"ctx":{"type":"object","title":"Context","description":"Additional context used to explain the validation failure.","examples":[{"min_length":1}]}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","description":"A request validation error at a specific field or array element."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"TypeSafe","description":"Ask yes/no questions, evaluate statements, select choices, or assign ratings to your content. Send your API key in the Authorization header as `Bearer `. Use GET /v1/models to discover available model names.","version":"0.2.0"},"servers":[{"url":"https://api.typesafe.ai"}],"paths":{"/v1/models":{"get":{"summary":"List models","description":"List the models and aliases available to the authenticated account.\n\nPass a returned model name as `model` in a POST /v1/systemone request.","operationId":"models_v1_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelMetadataList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/systemone":{"post":{"summary":"System One","description":"Answer one or more questions about the content supplied in `state`.\n\nYou can mix question types in one request. Answers use the same names as the\nquestions, so you can match each result to its question. The response also includes\nthe model used and token usage.","operationId":"systemone_v1_systemone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneRequest"},"examples":{"noul":{"summary":"Noul","value":{"model":"jev-latest","state":"I was charged twice for my subscription this month. Please refund the extra charge.","questions":{"billing":{"type":"noul","instructions":"Is this message about billing?"}}}},"choice":{"summary":"Choice","value":{"model":"jev-latest","state":"I was charged twice for my subscription this month. Please refund the extra charge.","questions":{"tone":{"type":"choice","instructions":"What is the tone of this message?","criteria":{"angry":"An upset or hostile message","calm":"A neutral or polite message","excited":"An enthusiastic or eager message"}}}}},"score":{"summary":"Score","value":{"model":"jev-latest","state":"I was charged twice for my subscription this month. Please refund the extra charge.","questions":{"urgency":{"type":"score","instructions":"How urgent is this message?","criteria":["Can wait","Needs attention this week","Needs attention today"]}}}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneResponse"},"examples":{"noul":{"summary":"Noul","value":{"model":"jev-latest","answers":{"billing":{"type":"noul","noul":0.98}},"usage":{"input_tokens":120,"output_tokens":12}}},"choice":{"summary":"Choice","value":{"model":"jev-latest","answers":{"tone":{"type":"choice","choice":"calm","confidence":0.7,"probabilities":{"angry":0.15,"calm":0.8,"excited":0.05}}},"usage":{"input_tokens":120,"output_tokens":12}}},"score":{"summary":"Score","value":{"model":"jev-latest","answers":{"urgency":{"type":"score","score":1.7,"confidence":0.55,"legend":{"0":"Can wait","1":"Needs attention this week","2":"Needs attention today"},"probabilities":{"0":0.1,"1":0.1,"2":0.8}}},"usage":{"input_tokens":120,"output_tokens":12}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"Answer":{"oneOf":[{"$ref":"#/components/schemas/NoulAnswer","title":"Noul"},{"$ref":"#/components/schemas/ChoiceAnswer","title":"Choice"},{"$ref":"#/components/schemas/ScoreAnswer","title":"Score"}],"discriminator":{"propertyName":"type","mapping":{"noul":"#/components/schemas/NoulAnswer","choice":"#/components/schemas/ChoiceAnswer","score":"#/components/schemas/ScoreAnswer"}},"description":"An answer whose type matches the corresponding question."},"ChoiceAnswer":{"properties":{"type":{"type":"string","const":"choice","title":"Type","description":"Identifies a selection from the requested choices.","examples":["choice"]},"choice":{"type":"string","title":"Choice","description":"The name of the choice with the highest probability among the question's criteria.","examples":["angry"]},"confidence":{"type":"number","title":"Confidence","description":"Confidence in the selected choice, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain selections for review.","examples":[0.9]},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","description":"Probability of each choice in criteria, keyed by choice name, from 0 to 1. Shows how likely the alternatives are; values sum to approximately 1.","examples":[{"angry":0.8,"calm":0.1,"excited":0.1}]}},"type":"object","required":["type","choice","confidence","probabilities"],"title":"ChoiceAnswer","description":"The selected choice, confidence, and probabilities for a choice question."},"ChoiceQuestion":{"properties":{"type":{"type":"string","const":"choice","title":"Type","description":"Identifies a question that selects one of the choices in criteria.","examples":["choice"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"What the model should decide when choosing an option.","examples":["What is the tone of this message?"]},"criteria":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array"},"type":"object","title":"Criteria","description":"Choice names and descriptions of when each applies. A choice without a description is interpreted by its name alone.","examples":[{"angry":"An upset or hostile message","calm":"A neutral or polite message","excited":"An enthusiastic or eager message"}]}},"type":"object","required":["type","criteria"],"title":"ChoiceQuestion","description":"A question that selects one option from the choices you define."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail","description":"Validation errors describing which request values are missing or invalid.","examples":[[{"loc":["body","state"],"msg":"Field required","type":"missing"}]]}},"type":"object","title":"HTTPValidationError","description":"Request validation failures returned with HTTP status 422."},"ModelMetadata":{"properties":{"name":{"type":"string","title":"Name","description":"Model name or alias accepted by the request's model field.","examples":["jev-latest"]},"description":{"type":"string","title":"Description","description":"Human-readable description of the model and its capabilities.","examples":["General-purpose system one model."]},"release_date":{"type":"string","title":"Release Date","description":"Model release date, formatted as YYYY-MM-DD.","examples":["2026-09-15"]}},"type":"object","required":["name","description","release_date"],"title":"ModelMetadata","description":"A model or model alias available to the authenticated account."},"ModelMetadataList":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelMetadata"},"type":"array","title":"Models","description":"Available models and aliases. Use a model's name in POST /v1/systemone requests.","examples":[[{"description":"General-purpose system one model.","name":"jev-latest","release_date":"2026-09-15"}]]}},"type":"object","required":["models"],"title":"ModelMetadataList","description":"Models and aliases available to the authenticated account."},"NoulAnswer":{"properties":{"type":{"type":"string","const":"noul","title":"Type","description":"Identifies a yes/no answer.","examples":["noul"]},"noul":{"type":"number","title":"Noul","description":"Probability of a yes answer or a true statement, from 0 to 1. Values near 1 favor yes or true, values near 0 favor no or false, and values near 0.5 indicate uncertainty.","examples":[0.98]}},"type":"object","required":["type","noul"],"title":"NoulAnswer","description":"The probability of a yes answer or a true statement."},"NoulCriteria":{"properties":{"true":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"True","description":"What counts as a yes answer.","examples":["The message is unsolicited advertising."]},"false":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"False","description":"What counts as a no answer.","examples":["The message is a legitimate conversation."]}},"type":"object","title":"NoulCriteria","description":"Criteria defining what counts as a yes or no answer."},"NoulQuestion":{"properties":{"type":{"type":"string","const":"noul","title":"Type","description":"Identifies a yes/no question or statement.","examples":["noul"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"The yes/no question or statement to evaluate.","examples":["Is this message spam?","This message contains unsolicited advertising.",{"task":"Identify unsolicited advertising."}]},"criteria":{"anyOf":[{"$ref":"#/components/schemas/NoulCriteria"},{"type":"null"}],"description":"Criteria clarifying what counts as a yes or no answer.","examples":[{"false":"A legitimate conversation","true":"Unsolicited advertising"}]}},"type":"object","required":["type"],"title":"NoulQuestion","description":"A yes/no question or statement, answered with the probability of yes or true."},"Question":{"oneOf":[{"$ref":"#/components/schemas/NoulQuestion","title":"Noul"},{"$ref":"#/components/schemas/ChoiceQuestion","title":"Choice"},{"$ref":"#/components/schemas/ScoreQuestion","title":"Score"}],"discriminator":{"propertyName":"type","mapping":{"noul":"#/components/schemas/NoulQuestion","choice":"#/components/schemas/ChoiceQuestion","score":"#/components/schemas/ScoreQuestion"}},"description":"A question about the supplied content."},"ScoreAnswer":{"properties":{"type":{"type":"string","const":"score","title":"Type","description":"Identifies a rating against the requested score levels.","examples":["score"]},"score":{"type":"number","title":"Score","description":"Expected score: the probability-weighted average of the rubric levels. May fall between integer levels.","examples":[1.7]},"confidence":{"type":"number","title":"Confidence","description":"Confidence in the score, from 0 to 1. Higher values indicate greater certainty; use lower values to flag uncertain ratings for review.","examples":[0.9]},"legend":{"additionalProperties":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"x-accepts":"string | object | array"},"type":"object","title":"Legend","description":"The requested criteria mapped to their score levels, so you can interpret the score.","examples":[{"0":"Can wait","1":"Needs attention this week","2":"Needs attention today"}]},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","description":"Probability of each score level, from 0 to 1, using the same keys as legend. Shows how likely the alternatives are; values sum to approximately 1.","examples":[{"0":0.1,"1":0.1,"2":0.8}]}},"type":"object","required":["type","score","confidence","legend","probabilities"],"title":"ScoreAnswer","description":"An expected score with its rubric, confidence, and score-level probabilities."},"ScoreQuestion":{"properties":{"type":{"type":"string","const":"score","title":"Type","description":"Identifies a question that rates the content using the levels in criteria.","examples":["score"]},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"x-accepts":"string | object | array","title":"Instructions","description":"What the model should rate.","examples":["How urgent is this message?"]},"criteria":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"x-accepts":"string | object | array"},"type":"array","minItems":1,"title":"Criteria","description":"Ordered descriptions of the score levels. Each description's position determines its score, starting at zero.","examples":[["Can wait","Needs attention this week","Needs attention today"]]}},"type":"object","required":["type","criteria"],"title":"ScoreQuestion","description":"A question that assigns a score using an ordered rubric."},"SystemOneRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Name or alias of the model to use. Available names are returned by GET /v1/models.","examples":["jev-latest"]},"state":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"x-accepts":"string | object | array","title":"State","description":"The content all questions in this request refer to.","examples":["I was charged twice. Please help.",{"message":"Please help.","subject":"Duplicate charge"}]},"questions":{"additionalProperties":{"$ref":"#/components/schemas/Question"},"type":"object","minProperties":1,"title":"Questions","description":"Questions to ask about the content, each with a name you choose. The response uses those names to identify the answers.","examples":[{"billing":{"instructions":"Is this message about billing?","type":"noul"}}]}},"type":"object","required":["model","state","questions"],"title":"SystemOneRequest","description":"Content and named questions to evaluate together using a TypeSafe model."},"SystemOneResponse":{"properties":{"model":{"type":"string","title":"Model","description":"Name of the model that answered the questions. May differ from the alias supplied in the request.","examples":["jev-latest"]},"answers":{"additionalProperties":{"$ref":"#/components/schemas/Answer"},"type":"object","minProperties":1,"title":"Answers","description":"Answers keyed by the question names supplied in the request. Each answer's type matches its question's type.","examples":[{"billing":{"noul":0.98,"type":"noul"}}]},"usage":{"$ref":"#/components/schemas/Usage","description":"Input and output token counts for this evaluation.","examples":[{"input_tokens":120,"output_tokens":12}]}},"type":"object","required":["model","answers","usage"],"title":"SystemOneResponse","description":"Answers grouped by question name, with the model used and token usage."},"Usage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Number of billable input tokens used to evaluate the request.","examples":[120]},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Number of output tokens used to answer the questions. Output tokens are currently free of charge.","examples":[12]}},"type":"object","required":["input_tokens","output_tokens"],"title":"Usage","description":"Token usage for the request."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location","description":"Path to the invalid value: the request location followed by field names and array indices.","examples":[["body","questions","urgency","score","criteria"]]},"msg":{"type":"string","title":"Message","description":"Human-readable explanation of the validation failure.","examples":["Field required"]},"type":{"type":"string","title":"Error Type","description":"Machine-readable validation error code.","examples":["missing"]},"input":{"title":"Input","description":"The input value that failed validation.","examples":[{"type":"score"}]},"ctx":{"type":"object","title":"Context","description":"Additional context used to explain the validation failure.","examples":[{"min_length":1}]}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","description":"A request validation error at a specific field or array element."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}} \ No newline at end of file