Overview
TheModelDefinition type defines AI models (LLMs, embeddings, etc.) that can be used within the Atomemo platform. Models describe their capabilities, supported modalities, and limitations.
Type Definition
Properties
The unique identifier for the model, typically in the format
provider/model-name.Example: "openai/gpt-4" or "anthropic/claude-3-opus"Localized display names for the model.Example:
Localized descriptions explaining the model’s capabilities.Example:
An emoji or icon representing the model.Example:
"🤖" or "🧠"The category or type of the model.Options:
"llm"- Large Language Model (text generation, chat)"embedding"- Text embedding model"image"- Image generation or processing model"audio"- Audio processing model"video"- Video processing model
Array of input types the model can accept.Options:
"text", "image", "audio", "video"Example: ["text", "image"] for a multimodal LLMArray of output types the model can generate.Options:
"text", "image", "audio", "video"Example: ["text"] for a text-only modelList of standard parameters that this model does not support.Common parameters:
"temperature"- Controls randomness"top_p"- Nucleus sampling parameter"max_tokens"- Maximum output length"stop"- Stop sequences"frequency_penalty"- Penalizes frequent tokens"presence_penalty"- Penalizes repeated tokens
["frequency_penalty", "presence_penalty"]Optional array of credential names required to use this model. The credentials must be registered with the plugin using
addCredential().Example: ["api-key"]Usage
Models are registered using theaddModel() method on the plugin instance:
Example: LLM Model
Example: Embedding Model
Example: Image Generation Model
Example: Model Without Credentials
Model Capabilities
Theinput_modalities and output_modalities properties define what the model can process:
Text-only LLM
Multimodal LLM (Vision)
Image Generator
Audio Transcription
Unsupported Parameters
Useunsupported_parameters to indicate which standard parameters the model doesn’t support. This helps the platform provide appropriate UI and prevent errors.
Related Types
- CredentialDefinition - Credentials used by models
- PluginDefinition - Parent plugin configuration
See Also
- Adding Models - Step-by-step guide
- Plugin Instance - The
addModel()method - Custom Model Example