jchen8000 commited on
Commit
43f3aa5
·
verified ·
1 Parent(s): 594c4a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,10 +51,10 @@ def generate_response(user_input, history, model, temperature, max_tokens, top_p
51
  chat_history = memory.load_memory_variables({})["chat_history"]
52
 
53
  # The chatbot's answer is generated by sending the full prompt to the LLM
54
- response = conversation.invoke({"human_input": user_question, "chat_history": chat_history})
55
 
56
  # Update the memory with the new interaction
57
- memory.save_context({"input": user_question}, {"output": response.content})
58
 
59
  return response.content
60
 
 
51
  chat_history = memory.load_memory_variables({})["chat_history"]
52
 
53
  # The chatbot's answer is generated by sending the full prompt to the LLM
54
+ response = conversation.invoke({"human_input": user_input, "chat_history": chat_history})
55
 
56
  # Update the memory with the new interaction
57
+ memory.save_context({"input": user_input}, {"output": response.content})
58
 
59
  return response.content
60