kanhatakeyama commited on
Commit
c5174be
·
verified ·
1 Parent(s): 7835cb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -48,7 +48,7 @@ def save_or_update_conversation(conversation_id, history,
48
  data = [json.loads(line) for line in f if line.strip()]
49
 
50
  # Find if an entry with the same id and message_index exists
51
- #entry_index = next((i for i, entry in enumerate(data) if entry['id'] == conversation_id and entry['message_index'] == message_index), None)
52
 
53
  #if entry_index is not None:
54
  ## # Update existing entry
 
48
  data = [json.loads(line) for line in f if line.strip()]
49
 
50
  # Find if an entry with the same id and message_index exists
51
+ entry_index = next((i for i, entry in enumerate(data) if entry['id'] == conversation_id and entry['message_index'] == message_index), None)
52
 
53
  #if entry_index is not None:
54
  ## # Update existing entry