···4646 formatter := recipes.NewFormatter()
47474848 fmt.Printf("🍽️ Generating 4 weekly recipes for location: %s\n", location)
4949- fmt.Println("📍 Checking available ingredients at local QFC/Fred Meyer...")
5050- fmt.Println("🌱 Using seasonal ingredient recommendations...")
4949+ fmt.Println("🏷️ Checking current sales at local QFC/Fred Meyer...")
5150 fmt.Println("📚 Avoiding recipes from the past 2 weeks...")
5251 fmt.Println()
5352
+7-16
internal/ai/client.go
···5555 }
5656}
57575858-func (c *Client) GenerateRecipes(location string, availableIngredients []string, seasonalIngredients []string, previousRecipes []string) (string, error) {
5959- prompt := c.buildRecipePrompt(location, availableIngredients, seasonalIngredients, previousRecipes)
5858+func (c *Client) GenerateRecipes(location string, saleIngredients []string, previousRecipes []string) (string, error) {
5959+ prompt := c.buildRecipePrompt(location, saleIngredients, previousRecipes)
60606161 messages := []Message{
6262 {
···166166 return anthropicResp.Content[0].Text, nil
167167}
168168169169-func (c *Client) buildRecipePrompt(location string, availableIngredients, seasonalIngredients, previousRecipes []string) string {
169169+func (c *Client) buildRecipePrompt(location string, saleIngredients, previousRecipes []string) string {
170170 prompt := fmt.Sprintf("Generate 4 unique weekly recipes for location: %s\n\n", location)
171171172172- if len(availableIngredients) > 0 {
173173- prompt += "Available fresh ingredients at local QFC/Fred Meyer:\n"
174174- for _, ingredient := range availableIngredients {
175175- prompt += fmt.Sprintf("- %s\n", ingredient)
176176- }
177177- prompt += "\n"
178178- }
179179-180180- if len(seasonalIngredients) > 0 {
181181- prompt += "Seasonal ingredients currently available:\n"
182182- for _, ingredient := range seasonalIngredients {
172172+ if len(saleIngredients) > 0 {
173173+ prompt += "Ingredients currently on sale at local QFC/Fred Meyer:\n"
174174+ for _, ingredient := range saleIngredients {
183175 prompt += fmt.Sprintf("- %s\n", ingredient)
184176 }
185177 prompt += "\n"
···195187196188 prompt += "Requirements:\n"
197189 prompt += "- Generate exactly 4 recipes\n"
198198- prompt += "- Prioritize available fresh ingredients\n"
199199- prompt += "- Use seasonal ingredients when possible\n"
190190+ prompt += "- Prioritize ingredients currently on sale\n"
200191 prompt += "- Avoid repeating previous recipes\n"
201192 prompt += "- Include variety in cooking methods and cuisines\n"
202193 prompt += "- Each recipe should serve 2 people\n"