Spaces:
Sleeping
Sleeping
Create prompts.py
Browse files- prompts.py +11 -0
prompts.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
def build_prompt(diet_type, goal, pdf_text, user_question):
|
2 |
+
return f"""You are a nutrition chatbot.
|
3 |
+
|
4 |
+
Diet preference: {diet_type}
|
5 |
+
Goal: {goal}
|
6 |
+
|
7 |
+
Context from uploaded meal plan documents:
|
8 |
+
{pdf_text[:1500]} # keep it short to avoid truncation
|
9 |
+
|
10 |
+
User: {user_question}
|
11 |
+
Bot:"""
|