Skip to content

Acquiredshot/Dinner-Decider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍳 Dinner Decision Agent

An AI-powered dinner recommendation and cooking assistant that helps you decide what to cook and provides expert cooking tips and guidance.

Overview

The Dinner Decision Agent is an interactive Python application that uses Claude AI to:

  • Suggest random dinner recipes from a curated database
  • Provide detailed cooking tips and techniques
  • Answer questions about recipes in real-time
  • Save your favorite recipes for easy reference
  • Have interactive conversations about cooking

Features

🎲 Random Recipe Selection

Start the application and get a random recipe suggestion from the database, complete with:

  • Ingredients list
  • Step-by-step instructions
  • Cuisine type
  • Difficulty level
  • Prep and cook times
  • Serving size

πŸ’‘ AI Cooking Tips

Claude provides personalized cooking advice including:

  • Techniques for perfect execution
  • Pro tips and tricks
  • Ingredient substitutions
  • Timing hacks
  • Flavor enhancement suggestions

πŸ’¬ Interactive Q&A

Ask the AI chef any questions about the recipe:

  • Ingredient adjustments
  • Cooking method variations
  • Dietary accommodations
  • Pairing suggestions
  • Troubleshooting tips

⭐ Favorites Management

  • Save recipes you love for later
  • View all your favorite recipes anytime
  • Prevent duplicate saves
  • Persistent storage in favorites.json

Requirements

  • Python 3.7+
  • Anthropic API key
  • macOS, Linux, or Windows

Installation

1. Clone or Download the Project

cd /path/to/Dinner\ Decider

2. Create a Virtual Environment

python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

4. Set Up Your Anthropic API Key

Add your Anthropic API key to your shell configuration:

For macOS/Linux (zsh):

echo "export ANTHROPIC_API_KEY='your-api-key-here'" >> ~/.zshrc
source ~/.zshrc

For macOS/Linux (bash):

echo "export ANTHROPIC_API_KEY='your-api-key-here'" >> ~/.bash_profile
source ~/.bash_profile

For Windows (PowerShell):

[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "your-api-key-here", "User")

Replace your-api-key-here with your actual Anthropic API key from https://console.anthropic.com

Usage

Running the Application

source venv/bin/activate  # Activate virtual environment
python dinner_agent.py

Interactive Commands

Once the application starts, you'll see a recipe and cooking tips. Use these commands:

Command Action
favorite Add the current recipe to your favorites
favorites View all your saved favorite recipes
new Get a different random recipe
exit Quit the application
Any text Ask the AI chef a question about the recipe

Example Session

🍳 Welcome to the Dinner Decision Agent!

I've randomly selected a delicious dinner option for you:
============================================================
🍽️  BEEF TACOS
...

πŸ’‘ Cooking Tips from Your AI Chef:
[AI provides helpful cooking tips]

Feel free to ask any questions about this recipe!
Type 'exit' to quit, 'new' for a different recipe,
'favorite' to add this recipe to your favorites, or
'favorites' to view all your favorite recipes.

You: how can I make the beef more flavorful?
Chef: [AI responds with suggestions]

You: favorite
βœ… Added 'Beef Tacos' to your favorites!

You: favorites
============================================================
⭐ YOUR FAVORITE RECIPES (1)
============================================================

1. Beef Tacos (Mexican - Easy)

You: exit
πŸ‘‹ Happy cooking! Enjoy your meal!

File Structure

Dinner Decider/
β”œβ”€β”€ dinner_agent.py      # Main application
β”œβ”€β”€ recipes.json         # Database of available recipes
β”œβ”€β”€ favorites.json       # Your saved favorite recipes (auto-created)
β”œβ”€β”€ requirements.txt     # Python dependencies
└── README.md           # This file

Files Explained

dinner_agent.py

The main Python script containing:

  • Recipe loading and selection logic
  • Anthropic API integration
  • Favorites management functions
  • Interactive conversation loop

recipes.json

Contains a collection of recipes with:

  • Recipe name and cuisine type
  • Difficulty level
  • Prep and cook times
  • Ingredients list
  • Step-by-step instructions
  • Serving size

favorites.json

Automatically created and maintained by the application. Stores all your favorite recipes with complete details for quick access and persistence.

requirements.txt

Python package dependencies:

  • anthropic>=0.7.0 - Anthropic API client
  • langchain>=0.1.0 - LLM framework
  • python-dotenv>=1.0.0 - Environment variable management

How It Works

  1. Startup: Application loads recipes from recipes.json and initializes the Anthropic client
  2. Selection: Randomly picks a recipe and displays it
  3. AI Tips: Sends recipe to Claude for cooking advice and tips
  4. Conversation: Maintains conversation history to answer follow-up questions
  5. Storage: Saves favorites to favorites.json for persistence
  6. Loop: Continues until user exits or requests a new recipe

Troubleshooting

"ANTHROPIC_API_KEY environment variable not set"

  • Ensure you've added your API key to your shell config
  • Reload your shell: source ~/.zshrc (or .bash_profile)
  • Verify with: echo $ANTHROPIC_API_KEY

"No module named 'anthropic'"

  • Ensure your virtual environment is activated
  • Run: pip install -r requirements.txt

"model not found" error

  • Your API key may have limited model access
  • Try using a different model in the code or check your API plan

Favorites not saving

  • Verify write permissions in the project directory
  • Check that favorites.json exists and is valid JSON

API Information

This application uses:

Future Enhancements

Potential features to add:

  • Dietary restriction filtering
  • Cuisine preference selection
  • Recipe difficulty filters
  • Cooking time preference
  • Ingredient availability checking
  • User recipe contributions
  • Export favorites to PDF
  • Meal planning integration

License

This project is provided as-is for personal use.

Support

For issues with:


Happy Cooking! πŸ‘¨β€πŸ³πŸ‘©β€πŸ³

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages