Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -62,10 +62,10 @@ conversation = LLMChain(
|
|
| 62 |
|
| 63 |
# Input from user
|
| 64 |
if prompt_input := st.chat_input("Say something..."):
|
| 65 |
-
history.add_user_message(prompt_input)
|
| 66 |
st.chat_message("user").write(prompt_input)
|
| 67 |
|
|
|
|
| 68 |
response = conversation.run(input=prompt_input)
|
| 69 |
|
| 70 |
-
history.add_ai_message(response)
|
| 71 |
st.chat_message("assistant").write(response)
|
|
|
|
|
|
| 62 |
|
| 63 |
# Input from user
|
| 64 |
if prompt_input := st.chat_input("Say something..."):
|
|
|
|
| 65 |
st.chat_message("user").write(prompt_input)
|
| 66 |
|
| 67 |
+
# Let LangChain handle history
|
| 68 |
response = conversation.run(input=prompt_input)
|
| 69 |
|
|
|
|
| 70 |
st.chat_message("assistant").write(response)
|
| 71 |
+
|