Conversation
0xDEC0DE
force-pushed
the
issue/67
branch
2 times, most recently
from
August 14, 2026 01:51
0c089c7 to
4f575eb
Compare
0xDEC0DE
commented
Aug 14, 2026
Comment on lines
+100
to
+120
| if llm_type == "openai": | ||
| from openai import OpenAIError | ||
| from langchain_openai import ChatOpenAI | ||
| OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY") | ||
| OPENAI_BASE_URL = os.environ.get("OPENAI_BASE_URL") | ||
| return ChatOpenAI( | ||
| model=model_name, | ||
| temperature=LLM_TEMPERATURE, | ||
| base_url=OPENAI_BASE_URL, | ||
| api_key=OPENAI_API_KEY, | ||
| ) | ||
| elif llm_type == "ollama": | ||
| from langchain_ollama import OllamaLLM | ||
| OLLAMA_HOST = os.environ.get("OLLAMA_HOST") | ||
| return OllamaLLM( | ||
| model=model_name, | ||
| temperature=LLM_TEMPERATURE, | ||
| base_url=OLLAMA_HOST, | ||
| ) | ||
| else: | ||
| raise ImportError("Unknown model") |
Author
There was a problem hiding this comment.
I'd prefer this as a match/case block, but you support Python 3.9, which doesn't have them. Bummer.
Adds a `Dockerfile` and a `docker-compose.yaml` to allow for easier spin-up and development of a sandboxed environment Runs an MQTT bus, the registrar, and an example pipeline running inside a Flask app. Uses `uv` in lieu of `pip` for installing Python packages because `uv`s installer is (much) faster and has a (much) better solver fix: update dependency versions Move away from Hatch's "most-compatible version" notation to using plain minimum-version notation with explicit upper-bounds where needed to mitigate breaking changes
- Pull langchain values from well-known environment variables for Ollama and OpenAI configuration instead of hardcoded/default values - Accept multiple LLM types, trying each one in turn as a simple fallback Fixes: Issue geekscape#67
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.
Pull langchain values from well-known environment variables for Ollama and OpenAI configuration instead of hardcoded/default values
Accept multiple LLM types, trying each one in turn as a simple fallback
Fixes: Issue #67