Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -92,4 +92,18 @@ st.sidebar.markdown("[Visit us at](https://www.insighttherapysolutions.com/)")
|
|
92 |
#msgs = StreamlitChatMessageHistory(key="langchain_messages")
|
93 |
|
94 |
# --- Main Content ---
|
95 |
-
st.markdown("## 🔍 Chatbot For AI Engineer test:")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
#msgs = StreamlitChatMessageHistory(key="langchain_messages")
|
93 |
|
94 |
# --- Main Content ---
|
95 |
+
st.markdown("## 🔍 Chatbot For AI Engineer test:")
|
96 |
+
|
97 |
+
if len(msgs.messages) == 0:
|
98 |
+
msgs.add_ai_message("Hi! How can I assist you today?")
|
99 |
+
|
100 |
+
|
101 |
+
for msg in msgs.messages:
|
102 |
+
st.chat_message(msg.type).write(msg.content)
|
103 |
+
|
104 |
+
if prompt := st.chat_input():
|
105 |
+
st.chat_message("human").write(prompt)
|
106 |
+
|
107 |
+
with st.chat_message("assistant"):
|
108 |
+
message_placeholder = st.empty()
|
109 |
+
full_response = ""
|