Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Prioritize API Key from Config File #404

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

XiangZhang-zx
Copy link
Contributor

Problem: The system was using environment variables for API keys.
Solution: Changed the code to first check the config file for API keys. If not found, it falls back to environment variables.
Impact: Ensures API keys are managed centrally in the config file, improving flexibility and control.

Problem: The system was using environment variables for API keys.
Solution: Changed the code to first check the config file for API keys. If not found, it falls back to environment variables.
Impact: Ensures API keys are managed centrally in the config file, improving flexibility and control.
Copy link
Collaborator

@dongyuanjushi dongyuanjushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale behind switching the match case grammar to if-else in llm_core/adapter.py?

@XiangZhang-zx
Copy link
Contributor Author

Thank you for the feedback! I’ve decided to keep the match-case syntax because it’s clear and maintainable, especially for handling multiple backend types.

Let me know if there’s anything else to adjust

@dongyuanjushi dongyuanjushi merged commit 5e7c2b7 into agiresearch:main Jan 7, 2025
1 check passed
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.

2 participants