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
ScriptableObject
ModelBase
Inherited Members
ScriptableObject.SetDirty()
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.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<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.name
Object.hideFlags
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
|
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
|
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
|
Edit this page
View Source
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
|
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
|
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
|
Edit this page
View Source
The maximum number of input tokens allowed for this
Declaration
public int MaxInputTokens { get; }
Property Value
|
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
Property Value
|
Edit this page
View Source
MaxOutputTokens
The maximum number of output tokens that the model can generate.
Declaration
public int MaxOutputTokens { get; }
Property Value
|
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
|
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
|
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
|
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
|
Edit this page
View Source
Type
The type of the model, such as LanguageModel, ImageModel, etc.
Declaration
public ModelType Type { get; }
Property Value
|
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
Methods
|
Edit this page
View Source
GetApiKey()
Declaration
public string GetApiKey()
Returns
|
Edit this page
View Source
Supports(ModelCapability)
Declaration
public bool Supports(ModelCapability capability)
Parameters
Returns
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
Implements
Extension Methods