mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-27 02:53:38 +00:00
Fixed warnings
This commit is contained in:
parent
7eec39c4a7
commit
77c95e6f41
@ -28,13 +28,12 @@ public readonly struct ModelId(string modelId) : IEquatable<ModelId>
|
||||
/// </summary>
|
||||
private const int MAX_STACK_ALLOCATED_MODEL_ID_LENGTH = 256;
|
||||
|
||||
private readonly string originalId = modelId ?? string.Empty;
|
||||
private readonly string normalizedId = Normalize(modelId);
|
||||
|
||||
/// <summary>
|
||||
/// The ID exactly as the provider reported it. This is what a person sees.
|
||||
/// </summary>
|
||||
public string Original => this.originalId ?? string.Empty;
|
||||
public string Original => modelId ?? string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 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.PREFIX => 2,
|
||||
MatchKind.SEGMENT => 1,
|
||||
MatchKind.SUBSTRING => 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
|
||||
/// 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.
|
||||
///
|
||||
/// 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>
|
||||
/// <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
|
||||
{
|
||||
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
|
||||
/// rule survives somebody reordering the file, while "the one before" does not.
|
||||
/// </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>
|
||||
public ModelRuleBuilder InheritsFrom(string patternText)
|
||||
public ModelRuleBuilder InheritsFrom(string inheritedPatternText)
|
||||
{
|
||||
this.inheritsFromText = patternText;
|
||||
this.inheritsFromText = inheritedPatternText;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using static AIStudio.Provider.Capability;
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace AIStudio.Models.OpenAI;
|
||||
|
||||
@ -7,7 +8,7 @@ namespace AIStudio.Models.OpenAI;
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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
|
||||
/// fallback, where a wrong answer looks like no answer.
|
||||
/// </remarks>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using AIStudio.Models.Registry;
|
||||
using AIStudio.Provider;
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace AIStudio.Tests.Models.ZAI;
|
||||
|
||||
@ -8,7 +9,7 @@ namespace AIStudio.Tests.Models.ZAI;
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
///
|
||||
/// These need tests of their own because the corpus cannot tell the calculation apart from a
|
||||
|
||||
Loading…
Reference in New Issue
Block a user