This pull request introduces two enhancements to the MindSearch project:
Environment Variables Configuration:
Added support for managing environment variables using a .env file.
Updated models.py to load environment variables using python-dotenv.
Modified GPT-4 and Silicon model configurations to use values from the .env file or defaults.
Updated .gitignore to exclude the .env file.
Updated requirements.txt to include python-dotenv.
Backend Usage Example:
Added backend_example.py to demonstrate how to interact with the backend directly, without using the frontend.
Changes
.env.example: Added with necessary environment variable placeholders.
.gitignore: Updated to exclude .env file.
README.md: Documented environment variable setup and backend usage example.
backend_example.py: New script for direct backend interaction.
models.py: Updated to load environment variables for model configurations.
requirements.txt: Added python-dotenv dependency.
How to Test
Setup Environment Variables:
Rename .env.example to .env and fill in the required values.
Run Backend Example:
Ensure the backend is running.
Execute python backend_example.py to test direct backend interaction.
Additional Information
This update simplifies the configuration process and provides an example for users who prefer backend interaction without a frontend.
Note: The README currently refers to this as a "forked version." If this pull request is accepted, I am happy to update the README to reflect the changes in the main repository.
Description
This pull request introduces two enhancements to the MindSearch project:
Environment Variables Configuration:
.env
file.models.py
to load environment variables usingpython-dotenv
..env
file or defaults..gitignore
to exclude the.env
file.requirements.txt
to includepython-dotenv
.Backend Usage Example:
backend_example.py
to demonstrate how to interact with the backend directly, without using the frontend.Changes
.env
file.python-dotenv
dependency.How to Test
Setup Environment Variables:
.env.example
to.env
and fill in the required values.Run Backend Example:
python backend_example.py
to test direct backend interaction.Additional Information