camel
camel copied to clipboard
Load .env file environment variables before instantiating openai clients
Description
This pull request allows for environment variables to be loaded from .env files before instantiating any of its OpenAI clients
Motivation and Context
Closes issue #431 Currently, the Camel repo doesn't search environment variables from .env files. This is important for extended implementations of Camel that depend on .env files to input their environment variables.
- [x] I have raised an issue to propose this change (required for new features and bug fixes)
Types of changes
What types of changes does your code introduce? Put an x
in all the boxes that apply:
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds core functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation (update in the documentation)
- [ ] Example (update in the folder of example)
Implemented Tasks
- [x] Install python-dotenv
- [x] Use load_dotenv() before every OpenAI client gets instantiated
Checklist
Go over all the following points, and put an x
in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!
- [x] I have read the CONTRIBUTION guide. (required)
- [ ] My change requires a change to the documentation.
- [ ] I have updated the tests accordingly. (required for a bug fix or a new feature)
- [ ] I have updated the documentation accordingly.