Spaces:
Sleeping
Sleeping
def build_prompt(diet_type, goal, pdf_text, user_question): | |
return f"""You are a nutrition chatbot. | |
Diet preference: {diet_type} | |
Goal: {goal} | |
Context from uploaded meal plan documents: | |
{pdf_text[:1500]} # keep it short to avoid truncation | |
User: {user_question} | |
Bot:""" | |