Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -227,9 +227,9 @@ with st.sidebar:
|
|
227 |
# Get the first message from user in the conversation
|
228 |
first_user_msg = next((msg["content"] for msg in conv if msg["role"] == "user"), "")
|
229 |
# Take first 30 characters of the message
|
230 |
-
preview = first_user_msg[:
|
231 |
|
232 |
-
if st.button(f"
|
233 |
st.session_state.messages = conv.copy()
|
234 |
st.rerun()
|
235 |
|
|
|
227 |
# Get the first message from user in the conversation
|
228 |
first_user_msg = next((msg["content"] for msg in conv if msg["role"] == "user"), "")
|
229 |
# Take first 30 characters of the message
|
230 |
+
preview = first_user_msg[:50] + "..." if len(first_user_msg) > 50 else first_user_msg
|
231 |
|
232 |
+
if st.button(f"Query {idx + 1}: {preview}", key=f"conv_{idx}"):
|
233 |
st.session_state.messages = conv.copy()
|
234 |
st.rerun()
|
235 |
|