Search Results for

    Show / Hide Table of Contents

    Class ModelPolicy

    Inheritance
    object
    ModelPolicy
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public static class ModelPolicy

    Methods

    | Edit this page View Source

    ClampN(int, Model)

    Declaration
    public static int ClampN(int n, Model model)
    Parameters
    Type Name Description
    int n
    Model model
    Returns
    Type Description
    int
    | Edit this page View Source

    EnsureModelId(ModelType, string, Api, bool)

    Declaration
    public static string EnsureModelId(ModelType type, string currentId, Api api = Api.None, bool allowNull = true)
    Parameters
    Type Name Description
    ModelType type
    string currentId
    Api api

    Optional API hint. When provided and currentId is null/empty (or invalid with allowNull=false), the fallback is resolved via TryGetDefaultOrFallback(ModelType, Api, out Model) for that specific provider before falling back to the global default.

    bool allowNull
    Returns
    Type Description
    string
    | Edit this page View Source

    GetDefaultModel(ModelType)

    Core function to get the default model for a given ModelType.

    Declaration
    public static Model GetDefaultModel(this ModelType type)
    Parameters
    Type Name Description
    ModelType type
    Returns
    Type Description
    Model
    | Edit this page View Source

    GetFinalFallbackModel(ModelType)

    Declaration
    public static Model GetFinalFallbackModel(ModelType type)
    Parameters
    Type Name Description
    ModelType type
    Returns
    Type Description
    Model
    | Edit this page View Source

    IsApi(Model, Api)

    Declaration
    public static bool IsApi(this Model model, Api api)
    Parameters
    Type Name Description
    Model model
    Api api
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsDefaultModel(string)

    Declaration
    public static bool IsDefaultModel(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsSystemDefaultModel(string)

    Declaration
    public static bool IsSystemDefaultModel(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    bool
    | Edit this page View Source

    ResolveAspectRatio(Model, AspectRatio, MediaSize)

    Declaration
    public static float ResolveAspectRatio(Model model, GoogleTypes.AspectRatio aspectRatio, MediaSize imageSize)
    Parameters
    Type Name Description
    Model model
    GoogleTypes.AspectRatio aspectRatio
    MediaSize imageSize
    Returns
    Type Description
    float
    | Edit this page View Source

    TryGetDefaultOrFallback(ModelType, Api, out Model)

    Declaration
    public static bool TryGetDefaultOrFallback(ModelType type, Api api, out Model model)
    Parameters
    Type Name Description
    ModelType type
    Api api
    Model model
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation