Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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":
|
55 |
|
56 |
# Update the memory with the new interaction
|
57 |
-
memory.save_context({"input":
|
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 |
|