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

fix: Add fallback to environment variable for API key if config is missing #394

Merged
merged 26 commits into from
Jan 6, 2025

Conversation

XiangZhang-zx
Copy link
Contributor

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. This ensures compatibility and flexibility for users who still rely on environment variables.

XiangZhang-zx and others added 26 commits December 4, 2024 17:00
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 joshprk merged commit 5ba97c4 into agiresearch:main Jan 6, 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