euracle commited on
Commit
fabd7ec
·
verified ·
1 Parent(s): 8a69875

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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[:30] + "..." if len(first_user_msg) > 30 else first_user_msg
231
 
232
- if st.button(f"Conversation {idx + 1}: {preview}", key=f"conv_{idx}"):
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