- Notifications
You must be signed in to change notification settings - Fork1.2k
Automatically switch provider based on envirnment variables, Ollama support: closes #13#50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thank you! I'm a bit worried that |
eliliam left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice and clean, very extensible too if anyone wanted to add new providers down the line.
redliu312 commentedApr 30, 2025
hihi@Le09 do you think it is required to add
in the top section of the call_llm.py I tried your branch and it seems this is needed for load the .env file when the script executed |
@redliu312 Oh, I see. workon Tutorial-Codebase-Knowledge-venv# activate your virtual environment with the correct set of python dependenciessource .env# load the API keyspython file.py If done this way, the variables are available in everything that you do in this terminal. So |
Fairly straightforward. In the spirit of the repo, I've kept things simple rather than also automatically add everything (like optional Anthropic libraries or others).
I think asking beginners to modify directly
call_llm
poses a risk of them putting their private keys on Github, so it's better to have them learn how to use environment variables to avoid taking chances.