mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-13 21:53:36 +00:00
Some checks are pending
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
24 lines
1.2 KiB
C#
24 lines
1.2 KiB
C#
namespace AIStudio.Models;
|
|
|
|
/// <summary>
|
|
/// Points at the tokenizer a model uses, without fetching it.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Only the reference is recorded here. Obtaining a tokenizer is a feature of its own, and today
|
|
/// only the Hugging Face kind could be resolved at all; the other kinds document what would have to
|
|
/// happen. Unknown means the built-in default tokenizer, which is what every model uses today.
|
|
/// </remarks>
|
|
/// <param name="Kind">What sort of tokenizer this is, which decides how the name would be resolved.</param>
|
|
/// <param name="Id">The name, in whatever spelling the kind uses. Meaningless unless the reference is known.</param>
|
|
public readonly record struct TokenizerRef(TokenizerKind Kind, string Id)
|
|
{
|
|
/// <summary>
|
|
/// The tokenizer of a model we have no statement about: the built-in default one.
|
|
/// </summary>
|
|
public static readonly TokenizerRef UNKNOWN = new(TokenizerKind.UNKNOWN, string.Empty);
|
|
|
|
/// <summary>
|
|
/// Whether this reference names something. Read the ID only when it does.
|
|
/// </summary>
|
|
public bool IsKnown => this.Kind is not TokenizerKind.UNKNOWN && !string.IsNullOrWhiteSpace(this.Id);
|
|
} |