meal_generator.py is a Python script designed for generating personalized meal suggestions. It uses OpenAI's GPT-4 for intelligent meal planning, interfaces with MongoDB for data management, and sends notifications to Microsoft Teams.
- Environment Variable Loading: Safely loads credentials and URLs from a
.envfile. - MongoDB Integration: Utilizes MongoDB for storing user data, meal suggestions, and logs.
- OpenAI API: Leverages the capabilities of GPT-4 for generating creative and personalized meal suggestions.
- Custom Logging: Implements a custom logger that stores logs in MongoDB.
- Teams Notifications: Sends formatted meal suggestions to a specified Microsoft Teams channel.
- Ensure MongoDB and OpenAI API keys are set in the
.envfile. - Define health, diet, and caution labels to filter meal suggestions based on user preferences.
- Set environment variables in
.env. - Run
python meal_generator.py. - Meal suggestions are generated and stored in MongoDB, and notifications are sent to Microsoft Teams.
- Python 3.x
pymongoopenairequestspython-dotenvjsonloggingdatetime
Contributions are welcome. Please fork the repository and submit pull requests with any enhancements.