Skip to content

Commit

Permalink
remove alter log (infiniflow#2140)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?


### Type of change
- [x] Refactoring
  • Loading branch information
KevinHuSh authored Aug 28, 2024
1 parent 7867874 commit a8334de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/apps/api_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def fillin_conv(ans):
else:
conv.reference[-1] = ans["reference"]
conv.message[-1] = {"role": "assistant", "content": ans["answer"], "id": message_id}
ans["id"] = message_id

def rename_field(ans):
reference = ans['reference']
Expand Down
1 change: 1 addition & 0 deletions api/apps/conversation_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def fillin_conv(ans):
else: conv.reference[-1] = ans["reference"]
conv.message[-1] = {"role": "assistant", "content": ans["answer"],
"id": message_id, "prompt": ans.get("prompt", "")}
ans["id"] = message_id

def stream():
nonlocal dia, msg, req, conv
Expand Down
4 changes: 3 additions & 1 deletion rag/utils/redis_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ def get_unacked_for(self, consumer_name, queue_name, group_name):
_, payload = msg[0]
return Payload(self.REDIS, queue_name, group_name, msg_id, payload)
except Exception as e:
logging.warning("[EXCEPTION]xpending_range" + consumer_name + "||" + str(e))
if 'key' in str(e):
return
logging.warning("[EXCEPTION]xpending_range: " + consumer_name + "||" + str(e))
self.__open__()

REDIS_CONN = RedisDB()

0 comments on commit a8334de

Please sign in to comment.