s
This commit is contained in:
@@ -196,12 +196,14 @@
|
||||
const res = await fetch("https://api.groq.com/openai/v1/chat/completions", {
|
||||
method: "POST", headers: {"Content-Type":"application/json", "Authorization":`Bearer ${API}`},
|
||||
body: JSON.stringify({ model:"llama-3.3-70b-versatile", messages:[
|
||||
{role:"system", content: `Expert Nutritionist. Target: ${document.getElementById('kcal').innerText} kcal. SYSTEM: ${isMetric ? 'METRIC' : 'IMPERIAL'}.
|
||||
{role:"system", content: `Math-Strict Expert Nutritionist. Target: ${document.getElementById('kcal').innerText} kcal. SYSTEM: ${isMetric ? 'METRIC' : 'IMPERIAL'}.
|
||||
MANDATORY RULES:
|
||||
1. ALWAYS use raw weights for ingredients in meal plans.
|
||||
2. DO NOT generate a shopping list unless the user explicitly asks for one.
|
||||
3. If requested, provide shopping list quantities in ${isMetric ? 'grams/kilograms' : 'ounces/lbs'}.
|
||||
4. Use Markdown tables.`},
|
||||
1. MATH AUDIT: 100g RAW Brown Rice = 360 kcal. 100g RAW Oats = 380 kcal. DO NOT hallucinate lower calories.
|
||||
2. SCALING: If the total plan is below ${document.getElementById('kcal').innerText} kcal, INCREASE gram weights of ingredients. Do not lie about density.
|
||||
3. VARIETY: Use Steak, Salmon, Whole Eggs, Avocado, Nuts, and Greek Yogurt. Do not default to just chicken and rice.
|
||||
4. USER PREFERENCE: If user asks for "High Protein" or specific foods, prioritize them and adjust portions to hit the calorie target exactly.
|
||||
5. RAW WEIGHTS: Always specify RAW weights for all ingredients.
|
||||
6. SHOPPING LIST: Only generate if explicitly requested via the specific prompt. Units: ${isMetric ? 'grams/kilograms' : 'ounces/lbs'}.`},
|
||||
{role:"user", content:text}
|
||||
]})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user