Skip to main content

elizaOS Local AI Plugin - Local LLM inference using llama.cpp for text, embeddings, vision, and audio

Project description

elizaOS Local AI Plugin (Python)

Python implementation of the Local AI plugin for elizaOS, providing local LLM inference using llama.cpp.

Installation

pip install elizaos-plugin-local-ai

Requirements

  • Python 3.11+
  • llama-cpp-python
  • Model files (GGUF format)

Usage

from elizaos_plugin_local_ai import LocalAIPlugin, LocalAIConfig, TextGenerationParams

# Create configuration
config = LocalAIConfig(
    models_dir="/path/to/models",
    small_model="DeepHermes-3-Llama-3-3B-Preview-q4.gguf",
)

# Initialize plugin
plugin = LocalAIPlugin(config)

# Generate text
result = plugin.generate_text(TextGenerationParams(
    prompt="Tell me a joke",
    max_tokens=100,
))

print(result.text)

Configuration

Environment variables:

  • MODELS_DIR: Directory containing model files
  • CACHE_DIR: Directory for caching
  • LOCAL_SMALL_MODEL: Filename of small model
  • LOCAL_LARGE_MODEL: Filename of large model
  • LOCAL_EMBEDDING_MODEL: Filename of embedding model
  • LOCAL_EMBEDDING_DIMENSIONS: Embedding vector dimensions (default: 384)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elizaos_plugin_local_ai-2.0.0a5.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elizaos_plugin_local_ai-2.0.0a5-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file elizaos_plugin_local_ai-2.0.0a5.tar.gz.

File metadata

File hashes

Hashes for elizaos_plugin_local_ai-2.0.0a5.tar.gz
Algorithm Hash digest
SHA256 a37397400a00111f55e665ef0acf44c56da1523dcf233c853e7e6826a7a50257
MD5 d6b75bf041129c37024d2ad639ebd297
BLAKE2b-256 81b9d76eb993b7d1bd91ef5a93e5e05f340cdcaf63e23329798de7338ab0b324

See more details on using hashes here.

File details

Details for the file elizaos_plugin_local_ai-2.0.0a5-py3-none-any.whl.

File metadata

File hashes

Hashes for elizaos_plugin_local_ai-2.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 e2f18d9c9bba3893294f2965d1f56f38a455dee7e9fe2357824dd81300b16532
MD5 86cad67135dec2c9866d841b88f0aa68
BLAKE2b-256 137eb625596adc0893d402035a948d3a7654586be8106ae46498f52ebbd5688a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page