Spaces:
Running
on
Zero
Running
on
Zero
fix for multi-turn conv.
Browse files
app.py
CHANGED
@@ -152,7 +152,7 @@ st.caption(f"Powered by `llama.cpp` | Model: {selected_model['filename']}")
|
|
152 |
user_input = st.chat_input("Ask something...")
|
153 |
|
154 |
if user_input:
|
155 |
-
if
|
156 |
st.warning("Please wait for the assistant to respond before sending another message.")
|
157 |
else:
|
158 |
st.session_state.chat_history.append({"role": "user", "content": user_input})
|
|
|
152 |
user_input = st.chat_input("Ask something...")
|
153 |
|
154 |
if user_input:
|
155 |
+
if st.session_state.chat_history and st.session_state.chat_history[-1]["role"] == "user":
|
156 |
st.warning("Please wait for the assistant to respond before sending another message.")
|
157 |
else:
|
158 |
st.session_state.chat_history.append({"role": "user", "content": user_input})
|