Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -695,11 +695,16 @@ class NutritionBot:
|
|
695 |
context += "---\n"
|
696 |
|
697 |
# Print context for debugging purposes
|
698 |
-
st.write("Context: ", context)
|
699 |
|
700 |
# Prepare a prompt combining past context and the current query
|
701 |
-
prompt = f"""Context: {context}; Current customer query: {query}; Provide a helpful response that takes into account any relevant past interactions."""
|
702 |
-
|
|
|
|
|
|
|
|
|
|
|
703 |
|
704 |
# Generate a response using the agent
|
705 |
response = self.agent_executor.invoke({"input": prompt})
|
|
|
695 |
context += "---\n"
|
696 |
|
697 |
# Print context for debugging purposes
|
698 |
+
#st.write("Context: ", context)
|
699 |
|
700 |
# Prepare a prompt combining past context and the current query
|
701 |
+
#prompt = f"""Context: {context}; Current customer query: {query}; Provide a helpful response that takes into account any relevant past interactions."""
|
702 |
+
prompt = f"""
|
703 |
+
Context: {context}
|
704 |
+
Current customer query: {query}
|
705 |
+
Provide a helpful response that takes into account any relevant past interactions.
|
706 |
+
"""
|
707 |
+
print("Prepare for invoke...")
|
708 |
|
709 |
# Generate a response using the agent
|
710 |
response = self.agent_executor.invoke({"input": prompt})
|