Skip to content

feat(component): add Ollama LLM and Embedding providers - #365

Open
Timelovers wants to merge 1 commit into
EverMind-AI:mainfrom
Timelovers:feat/ollama-providers
Open

feat(component): add Ollama LLM and Embedding providers#365
Timelovers wants to merge 1 commit into
EverMind-AI:mainfrom
Timelovers:feat/ollama-providers

Conversation

@Timelovers

Copy link
Copy Markdown

Description

Add OllamaProvider (LLM) and OllamaEmbeddingProvider (embedding) — thin subclasses of the existing OpenAI-compatible providers with Ollama-specific defaults.

Ollama exposes an OpenAI-compatible API at http://localhost:11434/v1 with api-key: ollama. These providers extend the existing implementations so users get sensible local-first defaults out of the box — no need to remember the base URL or supply a dummy key.

from everos.component.llm import OllamaProvider
llm = OllamaProvider(model="llama3.1")

from everos.component.embedding import OllamaEmbeddingProvider
embed = OllamaEmbeddingProvider(model="nomic-embed-text")

The existing OpenAIProvider / OpenAIEmbeddingProvider already work with Ollama via .env config — this PR just makes the setup explicit and discoverable with zero new logic.

Type of Change

  • New feature (non-breaking change that adds functionality)

How Has This Been Tested?

  • Unit Test — 8 tests covering defaults, custom params, inheritance, and public imports
  • Syntax check — all files pass ast.parse()

Checklist

  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have created related documentation issue/PR (if applicable)
  • New and existing unit tests pass locally with make test

Related Issues

N/A — incremental addition following the existing one-provider-per-file pattern.

Add OllamaProvider and OllamaEmbeddingProvider — thin subclasses of
OpenAIProvider / OpenAIEmbeddingProvider with Ollama-specific defaults
(base_url=http://localhost:11434/v1, api_key='ollama', dim=768).

Ollama's API is OpenAI-compatible, so these providers extend the
existing implementations with no new logic — just sensible local-first
defaults. Users can now do:

    from everos.component.llm import OllamaProvider
    llm = OllamaProvider(model='llama3.1')

instead of remembering base_url and supplying a dummy key.

Also add 8 unit tests (defaults, custom params, inheritance, imports).

Co-authored-by: Timelovers <46080686+Timelovers@users.noreply.github.com>
@Timelovers

Copy link
Copy Markdown
Author

Hi — just checking if this is on the radar. Happy to adjust anything if needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant