mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 11:18:00 +00:00
Fixed warnings
This commit is contained in:
6 files changed
+14
-9
No files matched your search
@@ -28,13 +28,12 @@ public readonly struct ModelId(string modelId) : IEquatable<ModelId>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private const int MAX_STACK_ALLOCATED_MODEL_ID_LENGTH = 256;
|
private const int MAX_STACK_ALLOCATED_MODEL_ID_LENGTH = 256;
|
||||||
|
|
||||||
private readonly string originalId = modelId ?? string.Empty;
|
|
||||||
private readonly string normalizedId = Normalize(modelId);
|
private readonly string normalizedId = Normalize(modelId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ID exactly as the provider reported it. This is what a person sees.
|
/// The ID exactly as the provider reported it. This is what a person sees.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Original => this.originalId ?? string.Empty;
|
public string Original => modelId ?? string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The ID in lowercase, with every separator written as a single hyphen.
|
/// The ID in lowercase, with every separator written as a single hyphen.
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ public readonly record struct RuleSpecificity(int ExplicitRank, int Kind, int Pa
|
|||||||
MatchKind.EXACT => 3,
|
MatchKind.EXACT => 3,
|
||||||
MatchKind.PREFIX => 2,
|
MatchKind.PREFIX => 2,
|
||||||
MatchKind.SEGMENT => 1,
|
MatchKind.SEGMENT => 1,
|
||||||
MatchKind.SUBSTRING => 0,
|
|
||||||
|
|
||||||
_ => 0,
|
_ => 0,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -64,9 +64,14 @@ public sealed record ModelProfileChange
|
|||||||
/// carried them could say that a model both always reasons and reasons on request. A rule which
|
/// carried them could say that a model both always reasons and reasons on request. A rule which
|
||||||
/// declares one has still made a mistake, which is why the tests and the verification run look
|
/// declares one has still made a mistake, which is why the tests and the verification run look
|
||||||
/// for it instead of relying on this line to hide it.
|
/// for it instead of relying on this line to hide it.
|
||||||
|
///
|
||||||
|
/// Every member of a profile is named below, so the copy could be written as a new profile
|
||||||
|
/// instead. It stays a copy on purpose: the day a profile learns something this change does not
|
||||||
|
/// know about yet, a modifier has to hand that on rather than reset it to nothing.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="profile">What is known so far.</param>
|
/// <param name="profile">What is known so far.</param>
|
||||||
/// <returns>What is known afterwards.</returns>
|
/// <returns>What is known afterward.</returns>
|
||||||
|
// ReSharper disable once WithExpressionModifiesAllMembers
|
||||||
public ModelProfile ApplyTo(in ModelProfile profile) => profile with
|
public ModelProfile ApplyTo(in ModelProfile profile) => profile with
|
||||||
{
|
{
|
||||||
Capabilities = (profile.Capabilities | this.Adds) & ~this.Removes & ~ModelProfile.REASONING_VOCABULARY,
|
Capabilities = (profile.Capabilities | this.Adds) & ~this.Removes & ~ModelProfile.REASONING_VOCABULARY,
|
||||||
|
|||||||
@@ -227,11 +227,11 @@ public sealed class ModelRuleBuilder(string patternText, ModelRuleKind ruleKind,
|
|||||||
/// Worth preferring over the plain form in a family with more than one generation: naming the
|
/// Worth preferring over the plain form in a family with more than one generation: naming the
|
||||||
/// rule survives somebody reordering the file, while "the one before" does not.
|
/// rule survives somebody reordering the file, while "the one before" does not.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="patternText">The text of the rule to inherit from.</param>
|
/// <param name="inheritedPatternText">The text of the rule to inherit from.</param>
|
||||||
/// <returns>The rule, to go on stating.</returns>
|
/// <returns>The rule, to go on stating.</returns>
|
||||||
public ModelRuleBuilder InheritsFrom(string patternText)
|
public ModelRuleBuilder InheritsFrom(string inheritedPatternText)
|
||||||
{
|
{
|
||||||
this.inheritsFromText = patternText;
|
this.inheritsFromText = inheritedPatternText;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using static AIStudio.Provider.Capability;
|
using static AIStudio.Provider.Capability;
|
||||||
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
namespace AIStudio.Models.OpenAI;
|
namespace AIStudio.Models.OpenAI;
|
||||||
|
|
||||||
@@ -7,7 +8,7 @@ namespace AIStudio.Models.OpenAI;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The previous rules never named this family. Its models reached the last line of the OpenAI
|
/// The previous rules never named this family. Its models reached the last line of the OpenAI
|
||||||
/// function, the one which answers for everything nobody wrote a rule for, and that line happened
|
/// function, the one that answers for everything nobody wrote a rule for, and that line happened
|
||||||
/// to describe GPT-4o exactly. Writing it down changes no answer and takes the family out of the
|
/// to describe GPT-4o exactly. Writing it down changes no answer and takes the family out of the
|
||||||
/// fallback, where a wrong answer looks like no answer.
|
/// fallback, where a wrong answer looks like no answer.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using AIStudio.Models.Registry;
|
using AIStudio.Models.Registry;
|
||||||
using AIStudio.Provider;
|
using AIStudio.Provider;
|
||||||
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
namespace AIStudio.Tests.Models.ZAI;
|
namespace AIStudio.Tests.Models.ZAI;
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ namespace AIStudio.Tests.Models.ZAI;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Z AI marks its vision models by gluing a "v" to the version number: glm-4v, glm-4.1v, glm-4.5v.
|
/// Z AI marks its vision models by gluing a "v" to the version number: glm-4v, glm-4.1v, glm-4.5v.
|
||||||
/// That is not a name part, so no pattern can ask about it and the family works it out of the name
|
/// That is not a name part, so no pattern can ask about it, and the family works it out of the name
|
||||||
/// instead -- the second of the two places in the rebuilt rules where a capability is calculated.
|
/// instead -- the second of the two places in the rebuilt rules where a capability is calculated.
|
||||||
///
|
///
|
||||||
/// These need tests of their own because the corpus cannot tell the calculation apart from a
|
/// These need tests of their own because the corpus cannot tell the calculation apart from a
|
||||||
|
|||||||
Reference in new issue
Block a user