Update app.py
Browse files
app.py
CHANGED
@@ -112,10 +112,12 @@ def get_rag_results(prompt):
|
|
112 |
|
113 |
if "messages" not in st.session_state:
|
114 |
st.session_state.messages = []
|
115 |
-
with st.chat_message("assistant"):
|
116 |
-
st.markdown(initial_message)
|
117 |
st.session_state.messages.append({"role": "assistant", "content": initial_message})
|
118 |
|
|
|
|
|
|
|
|
|
119 |
|
120 |
if prompt := st.chat_input("What kind of class are you looking for?"):
|
121 |
st.session_state.messages.append({"role": "user", "content": prompt})
|
|
|
112 |
|
113 |
if "messages" not in st.session_state:
|
114 |
st.session_state.messages = []
|
|
|
|
|
115 |
st.session_state.messages.append({"role": "assistant", "content": initial_message})
|
116 |
|
117 |
+
for message in st.session_state.messages:
|
118 |
+
with st.chat_message(message["role"]):
|
119 |
+
st.markdown(message["content"])
|
120 |
+
|
121 |
|
122 |
if prompt := st.chat_input("What kind of class are you looking for?"):
|
123 |
st.session_state.messages.append({"role": "user", "content": prompt})
|