Overview
You’ll learn how to:- Define custom models with
addModel() - Specify model capabilities and modalities
- Configure unsupported parameters
- Register multiple model variants
Complete Example
index.ts
Code Breakdown
Model Definition Structure
Each model is defined with the following properties:Model Types
Atomemo supports several model types:Input and Output Modalities
Modalities define what types of data the model can process:| Modality | Description | Example Use |
|---|---|---|
text | Text data | Prompts, documents, transcripts |
image | Image data | Photos, diagrams, screenshots |
audio | Audio data | Speech, music, sounds |
video | Video data | Clips, recordings |
embedding | Vector embeddings | Semantic search results |
Multimodal models can accept multiple input types. For example, a vision model might accept both
text and image inputs.Unsupported Parameters
Specify which common parameters your model doesn’t support:temperature- Controls randomnesstop_p- Nucleus sampling thresholdtop_k- Top-k sampling thresholdmax_tokens- Maximum output lengthfrequency_penalty- Penalize frequent tokenspresence_penalty- Penalize already-present tokensstop- Stop sequences
Advanced Examples
Multimodal Vision Model
A model that accepts both text prompts and images:Family of Model Variants
Register multiple variants of the same base model:Specialized Domain Models
Create models optimized for specific domains:Model Naming Conventions
Follow these conventions for model names:Provider prefix
Provider prefix
Start with your provider identifier:
Descriptive names
Descriptive names
Use clear, descriptive names:
Version suffixes
Version suffixes
Include version information:
Variant indicators
Variant indicators
Indicate size or specialization:
Best Practices
Choose appropriate model types
Use the correct
model_type for your model’s primary function. This helps users discover and filter models correctly.Accurately specify modalities
Only list modalities your model actually supports. Incorrect modality specifications will cause errors when users try to use the model.
Document unsupported parameters
Clearly specify which parameters aren’t supported to prevent errors and set proper user expectations.
Use descriptive metadata
Provide clear
display_name and description values that help users understand:- What the model does
- What it’s optimized for
- When to use it vs. other models
Model Registry
All models registered withaddModel() are:
- Automatically added to the plugin registry
- Available in the Atomemo platform
- Discoverable by users based on their capabilities
- Selectable in AI workflows and tools
Models are registered but not executed by the plugin. The actual model inference happens on your infrastructure or third-party APIs. This plugin SDK simply makes the models available in the Atomemo platform.
Next Steps
Model Definition
Full model API reference
Basic Plugin
Return to basic plugin example