jenngang commited on
Commit
13b7412
·
verified ·
1 Parent(s): d05b6ab

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -596,7 +596,7 @@ class NutritionBot:
596
  prompt = ChatPromptTemplate.from_messages([
597
  ("system", system_prompt), # System instructions
598
  ("human", "{input}"), # Placeholder for human input
599
- #("placeholder", "{agent_scratchpad}") # Placeholder for intermediate reasoning steps
600
  ])
601
 
602
  # Create an agent capable of interacting with tools and executing tasks
@@ -691,7 +691,7 @@ class NutritionBot:
691
  #st.write("Context: ", prompt)
692
 
693
  # Generate a response using the agent
694
- response = self.agent_executor.invoke({"input": prompt})
695
  st.write("Context: ", response)
696
 
697
  # Store the current interaction for future reference
 
596
  prompt = ChatPromptTemplate.from_messages([
597
  ("system", system_prompt), # System instructions
598
  ("human", "{input}"), # Placeholder for human input
599
+ ("placeholder", "{agent_scratchpad}") # Placeholder for intermediate reasoning steps
600
  ])
601
 
602
  # Create an agent capable of interacting with tools and executing tasks
 
691
  #st.write("Context: ", prompt)
692
 
693
  # Generate a response using the agent
694
+ response = self.agent_executor.invoke({"input": prompt, "agent_scratchpad": ''})
695
  st.write("Context: ", response)
696
 
697
  # Store the current interaction for future reference