Skip to content

Commit

Permalink
fix format issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Oct 10, 2024
1 parent b64ee98 commit b1ed2cc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/chat/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ def main():
len(st.session_state.messages) == 0
or prompt != st.session_state.messages[-1]["content"]
):
# occassionally resends the last user message twice
user_messages = [msg for msg in st.session_state.messages if msg["role"] == "user"]
# occassionally resends the last user message twice
user_messages = [
msg
for msg in st.session_state.messages
if msg["role"] == "user"
]
last_user_message = None
if len(user_messages) > 0:
last_user_message = user_messages[-1]["content"]
Expand Down

0 comments on commit b1ed2cc

Please sign in to comment.