Skip to main content

elizaOS Ollama Plugin - Local LLM client for text and object generation

Project description

elizaOS Plugin Ollama (Python)

Ollama plugin for elizaOS - Local LLM client for text and object generation.

Installation

pip install elizaos-plugin-ollama

Usage

from elizaos_plugin_ollama import OllamaClient, OllamaConfig

# Create a client with default configuration
config = OllamaConfig.from_env()
client = OllamaClient(config)

# Generate text
response = await client.generate_text_large("What is the meaning of life?")
print(response.text)

# Generate embeddings
embedding = await client.generate_embedding("Hello, world!")
print(f"Embedding dimension: {len(embedding.embedding)}")

Configuration

The client can be configured via environment variables:

Variable Description Default
OLLAMA_API_ENDPOINT Base URL for the Ollama API http://localhost:11434
OLLAMA_SMALL_MODEL Model for small text generation gemma3:latest
OLLAMA_LARGE_MODEL Model for large text generation gemma3:latest
OLLAMA_EMBEDDING_MODEL Model for embeddings nomic-embed-text:latest
OLLAMA_TIMEOUT_SECONDS Request timeout 300

Features

  • Text Generation: Generate text using small or large models
  • Object Generation: Generate structured JSON objects
  • Text Embeddings: Generate embeddings for semantic search
  • Model Management: Automatic model downloading if not available locally

Requirements

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_ollama-2.0.0a5.tar.gz (7.5 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_ollama-2.0.0a5-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: elizaos_plugin_ollama-2.0.0a5.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for elizaos_plugin_ollama-2.0.0a5.tar.gz
Algorithm Hash digest
SHA256 5f62931015ee9c2dfc5a8186975b86adbc25953d448cc6506de2255e2cb3ddf6
MD5 d46f7f73a67bfd08fd65313449a77b74
BLAKE2b-256 c1fcf7e25b10b7585260f75df5eadcdb700f60ddc8c4ce9c2cf7bceea92addc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elizaos_plugin_ollama-2.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 9c0a20646a6ea4353fbe12721c411170315e90d70f38e6519163f538af630e36
MD5 0835c62b5c734ef867dc35778baf24b8
BLAKE2b-256 0706e02caa8ec71a8e220877d37e6f74d5e671f9183f46835f17d9e121214b4b

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