cryogenic22 commited on
Commit
a39edc1
·
verified ·
1 Parent(s): 4f327f1

Update backend.py

Browse files
Files changed (1) hide show
  1. backend.py +9 -6
backend.py CHANGED
@@ -217,12 +217,15 @@ def initialize_qa_system(_vector_store):
217
  api_key=os.environ.get("OPENAI_API_KEY"),
218
  )
219
 
220
- prompt = ChatPromptTemplate.from_messages([
221
- ("system", "You are a helpful assistant"),
222
- MessagesPlaceholder(variable_name="chat_history"),  
223
-
224
- ("human", "{input}"),
225
- MessagesPlaceholder(variable_name="agent_scratchpad"),  
 
 
 
226
 
227
  # Define the tools
228
  tools = [
 
217
  api_key=os.environ.get("OPENAI_API_KEY"),
218
  )
219
 
220
+ # Define the prompt template (ADD agent_scratchpad)
221
+ prompt = ChatPromptTemplate.from_messages(
222
+ [
223
+ ("system", "You are a helpful assistant"),
224
+ MessagesPlaceholder(variable_name="chat_history"),
225
+ ("human", "{input}"),
226
+ MessagesPlaceholder(variable_name="agent_scratchpad"),
227
+ ]
228
+ )
229
 
230
  # Define the tools
231
  tools = [