fix: cooking chatbot button too high; chatbots leaked underlying model name
Moved the homepage cooking-assistant button from bottom-24 to bottom-16 — still clears the recipe list's floating bulk-action bar, just not as far. Both chat system prompts (cooking-chat and the per-recipe chat) now explicitly identify as "Epicure" and are told never to name the underlying model/provider if asked — previously they'd just answer honestly with whatever the model calls itself. Verified locally: screenshotted the new button position, and asked "what model or AI are you" through the real UI — response identified as Epicure with no model name.
This commit is contained in:
@@ -40,7 +40,7 @@ export async function POST(req: NextRequest) {
|
||||
const result = await withAiQuota(session!.user.id, session!.user.tier as "free" | "pro", () =>
|
||||
generateText({
|
||||
model,
|
||||
system: `You are a helpful culinary assistant answering general cooking questions — not tied to any specific recipe (techniques, substitutions, timing, equipment, food safety, etc). If a question has nothing to do with cooking or food, politely redirect. Keep answers under 200 words. Respond in ${lang}.${bioContext}`,
|
||||
system: `You are Epicure, a helpful culinary assistant answering general cooking questions — not tied to any specific recipe (techniques, substitutions, timing, equipment, food safety, etc). If asked who you are or what model/AI you're built on, say you're Epicure — never name the underlying model or provider. If a question has nothing to do with cooking or food, politely redirect. Keep answers under 200 words. Respond in ${lang}.${bioContext}`,
|
||||
prompt: parsed.data.question,
|
||||
})
|
||||
);
|
||||
|
||||
@@ -76,7 +76,7 @@ ${stepList || "None listed"}
|
||||
const result = await withAiQuota(session!.user.id, session!.user.tier as "free" | "pro", () =>
|
||||
generateText({
|
||||
model,
|
||||
system: `You are a helpful culinary assistant. Answer questions about the following recipe concisely and accurately. If a question is not related to the recipe or cooking, politely redirect. Keep answers under 200 words. Respond in ${lang}.
|
||||
system: `You are Epicure, a helpful culinary assistant. Answer questions about the following recipe concisely and accurately. If asked who you are or what model/AI you're built on, say you're Epicure — never name the underlying model or provider. If a question is not related to the recipe or cooking, politely redirect. Keep answers under 200 words. Respond in ${lang}.
|
||||
|
||||
${recipeContext}${bioContext}`,
|
||||
prompt: parsed.data.question,
|
||||
|
||||
@@ -70,10 +70,10 @@ export function CookingAssistantPanel() {
|
||||
<Button
|
||||
variant="default"
|
||||
size="icon"
|
||||
// bottom-24 (not bottom-6, like the per-recipe chat button) clears the
|
||||
// bottom-16 (not bottom-6, like the per-recipe chat button) clears the
|
||||
// recipe list's floating bulk-action bar, which occupies the bottom-4
|
||||
// to bottom-8 band while select mode is active.
|
||||
className="fixed bottom-24 right-6 h-12 w-12 rounded-full shadow-lg z-40"
|
||||
className="fixed bottom-16 right-6 h-12 w-12 rounded-full shadow-lg z-40"
|
||||
onClick={() => setOpen(true)}
|
||||
aria-label={t("ariaLabel")}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user