Update features and dependencies

This commit is contained in:
Arnaud
2026-07-01 11:10:37 +02:00
parent 9d9dfb46c6
commit 8b57a3fd87
107 changed files with 14654 additions and 458 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ export async function adaptRecipe(
excludeIngredients: string[];
extraConstraints?: string;
},
config?: AiConfig,
config?: AiConfig & { userContext?: string },
locale?: string
): Promise<AdaptedRecipe> {
const model = resolveModel(config);
@@ -74,7 +74,7 @@ export async function adaptRecipe(
model,
schema: AdaptedRecipeSchema,
system:
`You are a professional chef specializing in recipe adaptation. When adapting recipes, find the best substitutes that preserve the spirit, flavor profile, and texture of the original. Always explain what changed and why in adaptationNotes. For ingredient quantities: use numbers only, units separately. Respond in ${lang}.`,
`You are a professional chef specializing in recipe adaptation. When adapting recipes, find the best substitutes that preserve the spirit, flavor profile, and texture of the original. Always explain what changed and why in adaptationNotes. For ingredient quantities: use numbers only, units separately. Respond in ${lang}.${config?.userContext ? `\n\nUser preferences and context:\n${config.userContext}` : ""}`,
prompt: `Adapt the following recipe with these constraints:\n\n${constraintText}\n\nOriginal recipe:\n${recipeText}`,
});