Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Local AI Plugin

This plugin provides local AI model capabilities through the elizaOS platform, supporting text generation, image analysis, speech synthesis, and audio transcription.

Usage

Add the plugin to your character configuration:

"plugins": ["@elizaos-plugins/plugin-local-ai"]

Configuration

The plugin is configured using environment variables (typically set in a .env file or via your deployment settings):

Or in .env file:

# Optional: Specify a custom directory for models (GGUF files)
# MODELS_DIR=/path/to/your/models

# Optional: Specify a custom directory for caching other components (tokenizers, etc.)
# CACHE_DIR=/path/to/your/cache

# Optional: Specify filenames for the text generation and embedding models within the models directory
# LOCAL_SMALL_MODEL=my-custom-small-model.gguf
# LOCAL_LARGE_MODEL=my-custom-large-model.gguf
# LOCAL_EMBEDDING_MODEL=my-custom-embedding-model.gguf

# Optional: Fallback dimension size for embeddings if generation fails. Defaults to the model's default (e.g., 384).
# LOCAL_EMBEDDING_DIMENSIONS=384

Configuration Options

  • MODELS_DIR (Optional): Specifies a custom directory for storing model files (GGUF format). If not set, defaults to ~/.eliza/models.
  • CACHE_DIR (Optional): Specifies a custom directory for caching other components like tokenizers. If not set, defaults to ~/.eliza/cache.
  • LOCAL_SMALL_MODEL (Optional): Specifies the filename for the small text generation model (e.g., DeepHermes-3-Llama-3-3B-Preview-q4.gguf) located in the models directory.
  • LOCAL_LARGE_MODEL (Optional): Specifies the filename for the large text generation model (e.g., DeepHermes-3-Llama-3-8B-q4.gguf) located in the models directory.
  • LOCAL_EMBEDDING_MODEL (Optional): Specifies the filename for the text embedding model (e.g., bge-small-en-v1.5.Q4_K_M.gguf) located in the models directory.
  • LOCAL_EMBEDDING_DIMENSIONS (Optional): Defines the expected dimension size for text embeddings. This is primarily used as a fallback dimension if the embedding model fails to generate an embedding. If not set, it defaults to the embedding model's native dimension size (e.g., 384 for bge-small-en-v1.5.Q4_K_M.gguf).

Features

The plugin provides these model classes:

  • TEXT_SMALL: Fast, efficient text generation using smaller models
  • TEXT_LARGE: More capable text generation using larger models
  • TEXT_EMBEDDING: Generates text embeddings locally.
  • IMAGE_DESCRIPTION: Local image analysis using Florence-2 vision model
  • TEXT_TO_SPEECH: Local text-to-speech synthesis
  • TRANSCRIPTION: Local audio transcription using Whisper

Text Generation

// Using small model
const smallResponse = await runtime.useModel(ModelType.TEXT_SMALL, {
  prompt: 'Generate a short response',
  stopSequences: [],
});

// Using large model
const largeResponse = await runtime.useModel(ModelType.TEXT_LARGE, {
  prompt: 'Generate a detailed response',
  stopSequences: [],
});

Text Embedding

const embedding = await runtime.useModel(ModelType.TEXT_EMBEDDING, {
  text: 'Text to get embedding for',
});

Image Analysis

const { title, description } = await runtime.useModel(
  ModelType.IMAGE_DESCRIPTION,
  'https://example.com/image.jpg'
);

Text-to-Speech

const audioStream = await runtime.useModel(ModelType.TEXT_TO_SPEECH, 'Text to convert to speech');

Audio Transcription

const transcription = await runtime.useModel(ModelType.TRANSCRIPTION, audioBuffer);

Metadata

Release files for elizaos-plugin-local-embedding 2.0.0a5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elizaos-plugin-local-embedding 2.0.0a5
File Size Uploaded
elizaos_plugin_local_embedding-2.0.0a5.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for elizaos-plugin-local-embedding 2.0.0a5
File Interpreter ABI Platform
elizaos_plugin_local_embedding-2.0.0a5-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / elizaos_plugin_local_embedding-2.0.0a5.tar.gz

Download URL elizaos_plugin_local_embedding-2.0.0a5.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
43a65ab1a27713d3d0c99462bf1d6bbe7ffce57c1e73c99ebb7fb4e0c7a203d9
BLAKE2b-256 checksum
How to use checksums
e11a0f3a5410dc4b5d1f61e28e038590f2bb4b36c709af6cf6412a19e4420185
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / elizaos_plugin_local_embedding-2.0.0a5-py3-none-any.whl

Download URL elizaos_plugin_local_embedding-2.0.0a5-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbed1d7c07e4cced993190785762472ca64f87003a827cef73775f8075d1f0fd
BLAKE2b-256 checksum
How to use checksums
4a6c30f80a6dbf05d1a3f5f994b9805b32a5eb5e4eda8f9d9c8c16c0e1034e18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

2.0.0a5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page