Claude/add api compatible ollama 011 c urd mqq1x q jv scwxg gu1q#3
Open
CesarPetrescu wants to merge 2 commits into
Open
Conversation
- Added OLLAMA_BASE_URL, OLLAMA_CHAT_MODEL, OLLAMA_EMBED_MODEL, and OLLAMA_TEMPERATURE to .env.template - Updated agent.py to use Ollama environment variables for ChatOllama initialization - Updated retriever.py to use Ollama environment variables for OllamaEmbeddings - Updated tools/summarize_text.py to use Ollama environment variables - Created .env file as a working example (not tracked in git) - Now supports both local Ollama (http://localhost:11434) and remote/API Ollama instances Users can now configure Ollama to point to any API-compatible endpoint by setting OLLAMA_BASE_URL in their .env file.
This commit adds comprehensive support for multiple LLM providers, allowing users to easily switch between different services: New Features: - Multi-provider architecture supporting Ollama, LM Studio, OpenAI, and OpenAI-compatible APIs - API key authentication support for all providers - Unified configuration through .env file - Easy provider switching via LLM_PROVIDER and EMBEDDING_PROVIDER variables Supported Providers: - Ollama (local/remote with optional API key) - LM Studio (local OpenAI-compatible server) - OpenAI (official API) - OpenAI-Compatible (OpenRouter, Together.ai, Groq, Fireworks, etc.) Changes: - Created utils/llm_config.py - Centralized LLM provider management - Updated .env.template - Added configuration for all providers - Updated agent.py - Now uses provider configuration system - Updated retriever.py - Now uses provider configuration for embeddings - Updated tools/summarize_text.py - Now uses provider configuration - Updated requirements.txt - Added langchain-openai dependency - Added PROVIDER_EXAMPLES.md - Comprehensive configuration examples and troubleshooting Users can now: 1. Use local models (Ollama, LM Studio) 2. Use cloud APIs (OpenAI, OpenRouter, Groq, Together.ai, Fireworks) 3. Mix providers (e.g., Groq for chat, OpenAI for embeddings) 4. Switch providers by changing a single environment variable
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.
No description provided.