-
Notifications
You must be signed in to change notification settings - Fork 460
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
fix: Add fallback to environment variable for API key if config is missing #394
Merged
Conversation
This file contains 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
dded better error logs in kernel.py to help find bugs faster. ## Changes Made 1. Added clear headers to show where we are in the code: - Tool Manager setup - Agent submission - Agent status checking 2. Made error messages better: - Clear error messages - Stack traces - Basic info like Agent ID Now it's easier to: - See what the code is doing - Find where errors happen - Fix problems quickly
- Add debug logs to track agent loading - Fix config handling in agent manager - Update seeact_demo_agent config format The code now: - Shows better error messages - Loads agents more reliably - Keeps full config when packaging"
Description: Introduced a configuration file to manage global parameters for the AIOS kernel. Updated the kernel to read parameters from this configuration file at launch. Added a "refresh" command to reload and apply configuration changes without restarting the kernel. Improved API key handling with secure masking in logs. Enhanced error handling and logging for better debugging.
…ssing ### Summary This PR implements a fallback mechanism for the `api_key` configuration. If the `api_key` is not provided in the config file, the system will attempt to use the `API_KEY` environment variable.
joshprk
approved these changes
Jan 6, 2025
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.
Summary
This PR implements a fallback mechanism for the
api_key
configuration. If theapi_key
is not provided in the config file, the system will attempt to use theAPI_KEY
environment variable. This ensures compatibility and flexibility for users who still rely on environment variables.