Search Results for

    Show / Hide Table of Contents

    Class ModelBase

    ScriptableObject representation of a generative AI model with metadata, configuration, and pricing information. Supports token limits, ownership, creation time, and dynamic pricing for various content types (text, image, audio).

    Inheritance
    object
    Object
    ScriptableObject
    AIResourceBase
    ModelBase
    FineTunedModel
    Model
    Implements
    IAIResource
    IData
    IHasId<string>
    IHasName
    IDeprecatable
    Inherited Members
    AIResourceBase.id
    AIResourceBase.displayName
    AIResourceBase.api
    AIResourceBase.deprecated
    AIResourceBase.locked
    AIResourceBase.Id
    AIResourceBase.Name
    AIResourceBase.Api
    AIResourceBase.IsCustom
    AIResourceBase.IsDeprecated
    AIResourceBase.ToString()
    AIResourceBase.Equals(AIResourceBase)
    AIResourceBase.Equals(object)
    AIResourceBase.GetHashCode()
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetEntityId()
    Object.GetInstanceID()
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    [JsonConverter(typeof(ModelConverter))]
    [CreateAssetMenu(menuName = "AI DevKit/AI Model", order = 2055)]
    public abstract class ModelBase : AIResourceBase, IAIResource, IData, IHasId<string>, IHasName, IDeprecatable

    Properties

    | Edit this page View Source

    Capabilities

    Features of the model, such as text generation, image generation, etc. This information is used to determine the capabilities of the

    Declaration
    public ModelCapability[] Capabilities { get; }
    Property Value
    Type Description
    ModelCapability[]
    | Edit this page View Source

    EmbeddingDimension

    The dimension of the embedding vectors produced by the This is relevant for models that generate text embeddings for tasks like semantic search.

    Declaration
    public int EmbeddingDimension { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Family

    The family classification of the model (e.g., GPT, Gemini, Imagen). This information is usually used to determine the structure of the request body.

    Declaration
    public ModelFamily Family { get; }
    Property Value
    Type Description
    ModelFamily
    | Edit this page View Source

    InputModality

    A bitflag indicating supported input Modality (e.g., Text, Image, Audio). This information is used to determines which input types the model supports.

    Declaration
    public Modality[] InputModality { get; }
    Property Value
    Type Description
    Modality[]
    | Edit this page View Source

    IsFineTuned

    Indicates whether the model is a fine-tuned version (i.e., custom).

    Declaration
    public bool IsFineTuned { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsLegacy

    Indicates whether the model is a legacy version. Legacy models often have a different endpoint or API structure.

    Declaration
    public abstract bool IsLegacy { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    MaxInputTokens

    The maximum number of input tokens allowed for this

    Declaration
    public int MaxInputTokens { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    MaxN

    The maximum number of images that this model can generate in a single request. This information is only relevant for image generation models.

    Declaration
    public int MaxN { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    MaxOutputTokens

    The maximum number of output tokens that the model can generate.

    Declaration
    public int MaxOutputTokens { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    OutputModality

    A bitflag indicating supported output Modality (e.g., Text, Image, Audio). This information is used to determines which output types the model supports.

    Declaration
    public Modality[] OutputModality { get; }
    Property Value
    Type Description
    Modality[]
    | Edit this page View Source

    Prices

    An array of pricing definitions for this model based on content type and usage (e.g., per 1K tokens).

    Declaration
    public ModelPrice[] Prices { get; }
    Property Value
    Type Description
    ModelPrice[]
    | Edit this page View Source

    ResourceName

    The resource name or deployment name for the model, used in certain APIs like Azure.

    Declaration
    public string ResourceName { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    SupportedModes

    The connection modes supported by this model (e.g., REST, gRPC, WebSocket). This information is used to determine how to communicate with the model's API endpoint.

    Declaration
    public ConnectionMode[] SupportedModes { get; }
    Property Value
    Type Description
    ConnectionMode[]
    | Edit this page View Source

    Type

    The type of the model, such as LanguageModel, ImageModel, etc.

    Declaration
    public ModelType Type { get; }
    Property Value
    Type Description
    ModelType
    | Edit this page View Source

    Voices

    The list of available voice IDs for this model. Populated for local providers (e.g. SherpaOnnx Kokoro) where voices are known at scan time.

    Declaration
    public string[] Voices { get; }
    Property Value
    Type Description
    string[]

    Methods

    | Edit this page View Source

    GetApiKey()

    Declaration
    public string GetApiKey()
    Returns
    Type Description
    string
    | Edit this page View Source

    Supports(ModelCapability)

    Declaration
    public bool Supports(ModelCapability capability)
    Parameters
    Type Name Description
    ModelCapability capability
    Returns
    Type Description
    bool

    Operators

    | Edit this page View Source

    implicit operator ModelBase(string)

    Declaration
    public static implicit operator ModelBase(string modelId)
    Parameters
    Type Name Description
    string modelId
    Returns
    Type Description
    ModelBase

    Implements

    IAIResource
    IData
    IHasId<TId>
    IHasName
    IDeprecatable

    Extension Methods

    ModelUtility.IsDalle2(ModelBase)
    ModelUtility.IsDalle3(ModelBase)
    ModelUtility.IsGemini(ModelBase)
    ModelUtility.IsGoogleImagen(ModelBase)
    ModelUtility.IsGptImage(ModelBase)
    ModelUtility.IsLanguageModel(ModelBase)
    ModelUtility.IsVeo2(ModelBase)
    ModelUtility.IsVeo3(ModelBase)
    ModelUtility.IsVeo3_1(ModelBase)
    ModelUtility.SupportsInpainting(ModelBase)
    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    FileExtensions.ToFile<T>(T, string)
    ResponseCastingExtensions.GetResult<T>(T)
    CoreLibTypeExtensions.GetNameOrDash(IData)
    CoreLibTypeExtensions.GetIdOrNull(IHasId<string>)
    CoreLibTypeExtensions.IsNullOrEmptyId(IHasId<string>)
    SystemExtensions.GetName(object)
    UnityObjectExtensions.EncodeToBase64(Object)
    UnityObjectExtensions.ToBytes(Object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation