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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for elizaos_plugin_ollama-2.0.0a4.tar.gz
Algorithm Hash digest
SHA256 13e73671b635df55b4d88eb71964a6c485619a5e0a2cde8a467be36a75121d2d
MD5 e279c475a048a2baf4c8bb44b860fe19
BLAKE2b-256 9a1c1869b2f8ab091dd1440af5be248135538efce8ca3c9950c8927e091aa3d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elizaos_plugin_ollama-2.0.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 af16fcceb83808939013b55a7130a15e10943556c1f2d87d33c026b56a8573ef
MD5 cb5f92bdca75b4aba02f9360cbe35f8f
BLAKE2b-256 2e3ecc4e1783af60d1a7d1795cf8aefc1d481d157f1e087a4fe44fcb4ec14ea9

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