feat(lift): add Ollama provider for free local lifting#95
Merged
Conversation
Adds a fully-local LlmProvider backed by an Ollama daemon (native /api/chat), default model qwen2.5-coder:3b, zero cost, no API key. Slots into the existing provider trait + create_provider/available_providers behind an `ollama` feature (in the default set). CLI `lift --provider ollama` needs no key. Pure response parser is unit tested without a live daemon.
…duration_suboptimal_units)
57c9b89 to
df0fbbe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #94.
Summary
OllamaProvider(crates/rpg-lift/src/provider.rs): a fully-localLlmProviderbacked by an Ollama daemon via the native/api/chatendpoint.qwen2.5-coder:3b, zero cost, no API key. Model + base URL overridable.create_provider/available_providersbehind a default-onollamafeature;rpg-encoder lift --provider ollamarequires no key.Why
Lifting is the most token-expensive step in building an RPG. A free, offline, on-device backend removes that cost. The change is additive and feature-gated — no behaviour change for existing
anthropic/openaiusers.Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace(full suite green; 5 newprovider::testsfor Ollama parsing, defaults, zero-cost, keyless create)rpg-encoder lift --provider ollamaagainst a runningollama serve(requires a local daemon; not exercised in CI)