Skip to content

Commit

Permalink
fix: lint err
Browse files Browse the repository at this point in the history
  • Loading branch information
statefb committed Oct 17, 2024
1 parent e5441fc commit b15ae60
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions backend/app/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,13 @@ def process_chat_input(

# Leaf node id
# If `continue_generate` is True, note that new message is not added to the message map.
node_id = ""
if chat_input.continue_generate:
node_id = chat_input.message.parent_message_id
else:
node_id = conversation.message_map[user_msg_id].parent
node_id = (
chat_input.message.parent_message_id
if chat_input.continue_generate
else conversation.message_map[user_msg_id].parent
)
if node_id is None:
raise ValueError("parent_message_id or parent is None")

messages = trace_to_root(
node_id=node_id,
Expand Down

0 comments on commit b15ae60

Please sign in to comment.