mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-11 07:53:47 +00:00
Rebuilt how AI Studio knows what a model can do (#960)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
This commit is contained in:
1 parent
d21e09dd1e
commit
d85b4e71b6
287 files changed
+18341
-3677
No files matched your search
@@ -0,0 +1,31 @@
|
||||
using AIStudio.Provider;
|
||||
|
||||
using static AIStudio.Provider.Capability;
|
||||
|
||||
namespace AIStudio.Models.Microsoft;
|
||||
|
||||
/// <summary>
|
||||
/// E5, the embedding models built on somebody else's weights.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// "e5-mistral-7b-instruct" is what made this a family of its own. It is an embedding model, and it
|
||||
/// carries the name of the model it was trained from, so the Mistral rules answer for it and tell
|
||||
/// it that it chats and calls functions. Saying which name means what it says is cheaper than
|
||||
/// teaching every family whose weights somebody built an embedder from.
|
||||
///
|
||||
/// The E5 part is the whole statement: the rest of the name says nothing about what the model does.
|
||||
/// </remarks>
|
||||
public sealed class E5Family : ModelFamily
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override ModelVendor Vendor => ModelVendor.MICROSOFT;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ModelSource Source => new("https://huggingface.co/intfloat/e5-mistral-7b-instruct", new DateOnly(2026, 9, 11), "The app lists this under IProvider.GetEmbeddingModels, which is where the statement that it embeds comes from.");
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Declare(ModelFamilyBuilder builder) =>
|
||||
builder.Rule("e5").AsSegment()
|
||||
.Capabilities(TEXT_INPUT | EMBEDDING)
|
||||
.Kind(ModelKind.EMBEDDING);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using static AIStudio.Provider.Capability;
|
||||
|
||||
namespace AIStudio.Models.Microsoft;
|
||||
|
||||
/// <summary>
|
||||
/// Phi, the small Microsoft models, of which the fourth generation is the one with rules.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// What a Phi 4 checkpoint can do is written in its name, and two of those words can stand in the
|
||||
/// same one. "Phi-4-mini-reasoning" is both, and the previous rules had to look for the thinking
|
||||
/// first so the mini check would not claim it and state the opposite. Here the mini rule says out
|
||||
/// loud that it does not speak for the thinking checkpoints, which is the same statement without an
|
||||
/// order behind it.
|
||||
///
|
||||
/// Tool calling follows the chat template rather than the size: the mini and multimodal checkpoints
|
||||
/// carry tool tokens, the 14B model has no tool role at all, and neither do the thinking ones.
|
||||
/// </remarks>
|
||||
public sealed class PhiFamily : ModelFamily
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override ModelVendor Vendor => ModelVendor.MICROSOFT;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ModelSource Source => new("https://huggingface.co/microsoft", new DateOnly(2026, 9, 11), "Ported unchanged from the Phi block of ProviderExtensions.OpenSource.cs.");
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Declare(ModelFamilyBuilder builder)
|
||||
{
|
||||
// The 14B model answers in text and has nothing to call a function with:
|
||||
builder.Rule("phi4").AsSubstring()
|
||||
.Capabilities(TEXT_INPUT | TEXT_OUTPUT)
|
||||
.Apis(CHAT_COMPLETION_API);
|
||||
|
||||
builder.Rule("phi-4").AsSubstring().Inherits();
|
||||
|
||||
// The mini checkpoints call functions, and they are not the thinking ones:
|
||||
builder.Rule("phi4").AsSubstring().AlsoContains("mini").NotContains("reasoning").Inherits()
|
||||
.Capabilities(FUNCTION_CALLING);
|
||||
|
||||
builder.Rule("phi-4").AsSubstring().AlsoContains("mini").NotContains("reasoning").Inherits();
|
||||
|
||||
// The multimodal one reads pictures and listens:
|
||||
builder.Rule("phi4").AsSubstring().AlsoContains("multimodal").Inherits()
|
||||
.Capabilities(MULTIPLE_IMAGE_INPUT | AUDIO_INPUT);
|
||||
|
||||
builder.Rule("phi-4").AsSubstring().AlsoContains("multimodal").Inherits();
|
||||
|
||||
// The thinking checkpoints always think, and they call nothing:
|
||||
builder.Rule("phi4").AsSubstring().AlsoContains("reasoning")
|
||||
.Capabilities(TEXT_INPUT | TEXT_OUTPUT)
|
||||
.Apis(CHAT_COMPLETION_API)
|
||||
.Reasoning(ReasoningSupport.ALWAYS);
|
||||
|
||||
builder.Rule("phi-4").AsSubstring().AlsoContains("reasoning").Inherits();
|
||||
|
||||
// One of them looks at pictures while it does:
|
||||
builder.Rule("phi4").AsSubstring().AlsoContains("reasoning", "vision").Inherits()
|
||||
.Capabilities(MULTIPLE_IMAGE_INPUT);
|
||||
|
||||
builder.Rule("phi-4").AsSubstring().AlsoContains("reasoning", "vision").Inherits();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user