ai cooking
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

only one build error

Paul Miller dc06a7f6 7073e50d

+5 -5
+5 -5
internal/ai/client.go
··· 57 57 58 58 func (c *Client) GenerateRecipes(location string, availableIngredients []string, seasonalIngredients []string, previousRecipes []string) (string, error) { 59 59 prompt := c.buildRecipePrompt(location, availableIngredients, seasonalIngredients, previousRecipes) 60 - 60 + 61 61 messages := []Message{ 62 62 { 63 63 Role: "system", ··· 166 166 return anthropicResp.Content[0].Text, nil 167 167 } 168 168 169 - func (c *Client) buildRecipePrompt(location, availableIngredients, seasonalIngredients, previousRecipes []string) string { 169 + func (c *Client) buildRecipePrompt(location string, availableIngredients, seasonalIngredients, previousRecipes []string) string { 170 170 prompt := fmt.Sprintf("Generate 4 unique weekly recipes for location: %s\n\n", location) 171 - 171 + 172 172 if len(availableIngredients) > 0 { 173 173 prompt += "Available fresh ingredients at local QFC/Fred Meyer:\n" 174 174 for _, ingredient := range availableIngredients { ··· 199 199 prompt += "- Use seasonal ingredients when possible\n" 200 200 prompt += "- Avoid repeating previous recipes\n" 201 201 prompt += "- Include variety in cooking methods and cuisines\n" 202 - prompt += "- Each recipe should serve 4 people\n" 202 + prompt += "- Each recipe should serve 2 people\n" 203 203 prompt += "- Provide clear, step-by-step instructions\n\n" 204 204 205 205 prompt += "Format your response as valid JSON with this structure:\n" ··· 215 215 }` 216 216 217 217 return prompt 218 - } 218 + }