浏览代码

remove alter log (#2140)

### What problem does this PR solve?


### Type of change
- [x] Refactoring
tags/v0.11.0
Kevin Hu 1年前
父节点
当前提交
6c1f1a9f53
没有帐户链接到提交者的电子邮件
共有 3 个文件被更改,包括 5 次插入1 次删除
  1. 1
    0
      api/apps/api_app.py
  2. 1
    0
      api/apps/conversation_app.py
  3. 3
    1
      rag/utils/redis_conn.py

+ 1
- 0
api/apps/api_app.py 查看文件

@@ -210,6 +210,7 @@ def completion():
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']

+ 1
- 0
api/apps/conversation_app.py 查看文件

@@ -144,6 +144,7 @@ def completion():
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

+ 3
- 1
rag/utils/redis_conn.py 查看文件

@@ -158,7 +158,9 @@ class RedisDB:
_, 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()

正在加载...
取消
保存