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.0a4.tar.gz (12.4 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.0a4-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for elizaos_plugin_local_ai-2.0.0a4.tar.gz
Algorithm Hash digest
SHA256 5fce4497c47c59e91265f646919640dc7a002e32ddf119e26818f7bfde092c48
MD5 7614dd3c8489838ea58e999f205b85cd
BLAKE2b-256 596f16068a5946bd6a42ab87d8ecedb15852c0592b74fbbe3c5ee988b565c114

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elizaos_plugin_local_ai-2.0.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 e3f09d61e4b107ea872c12ae8ac1d1325bacb22aed88cc07517e51641e46d6de
MD5 2698e000d8e6a128ede08e6bc64fa1d9
BLAKE2b-256 9ae875b9d6aeaefcff5372b94babd6f4e2aeba19bded7aa351bc740dc59fd0e5

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