"Eat What" System¶
Location: cogs/eat/
The "Eat What" system is a sophisticated, personalized restaurant recommendation engine integrated into the bot. It combines web crawling, database storage, and machine learning to learn a server's food preferences and provide tailored suggestions. This feature is primarily accessed through the eat option in the /internet_search command.
Core Components¶
The system is divided into several key components:
- Database: Manages the storage of search history and user preferences.
- Google Maps Crawler: Fetches real-time restaurant data from Google Maps.
- Machine Learning Model: Trains on user feedback to provide personalized recommendations.
- UI (Embeds & Views): Provides the interactive Discord interface for users.
Workflow¶
- A user initiates a search via
/internet_search search_type: eat. - If the user provides a keyword, the Google Maps Crawler searches for that type of food.
- If no keyword is provided, the Machine Learning Model predicts a food recommendation based on the server's past ratings.
- The crawler fetches details for a randomly selected restaurant.
- The UI displays the recommendation in an interactive embed with buttons (Map, Menu, Like, Dislike, etc.).
- The search result is saved to the Database.
- When a user clicks "Like" or "Dislike", their rating is saved to the database.
- This new rating triggers the Machine Learning Model to retrain, refining its future recommendations for that server.