Update features and dependencies
This commit is contained in:
@@ -27,7 +27,7 @@ export async function suggestDrinks(
|
||||
ingredients: Array<{ rawName: string }>;
|
||||
},
|
||||
count = 4,
|
||||
config?: AiConfig,
|
||||
config?: AiConfig & { userContext?: string },
|
||||
locale?: string
|
||||
): Promise<DrinkSuggestion[]> {
|
||||
const model = resolveModel(config);
|
||||
@@ -41,7 +41,7 @@ export async function suggestDrinks(
|
||||
model,
|
||||
schema: DrinksOutputSchema,
|
||||
system:
|
||||
`You are a sommelier and beverage expert. For each suggestion, lead with a style or category (e.g. 'Dry white Burgundy', 'Session IPA', 'Sparkling water with citrus') rather than a specific product. Then provide 2–3 concrete examples to illustrate the style. Consider flavor profiles, acidity, tannins, sweetness, weight, and cultural pairing traditions. Include a mix of alcoholic and non-alcoholic options. Respond in ${lang}.`,
|
||||
`You are a sommelier and beverage expert. For each suggestion, lead with a style or category (e.g. 'Dry white Burgundy', 'Session IPA', 'Sparkling water with citrus') rather than a specific product. Then provide 2–3 concrete examples to illustrate the style. Consider flavor profiles, acidity, tannins, sweetness, weight, and cultural pairing traditions. Include a mix of alcoholic and non-alcoholic options. Respond in ${lang}.${config?.userContext ? `\n\nUser preferences and context:\n${config.userContext}` : ""}`,
|
||||
prompt: `Suggest ${count} drinks to serve with this recipe.\n\nRecipe: ${recipe.title}\n${recipe.description ? `Description: ${recipe.description}` : ""}\n${dietaryContext ? `Dietary: ${dietaryContext}` : ""}\nKey ingredients: ${recipe.ingredients.slice(0, 8).map((i) => i.rawName).join(", ")}`,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user