Update features and dependencies
This commit is contained in:
@@ -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}`,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user