浏览代码

Fix: wrong type hint (#7738)

### What problem does this PR solve?

Wrong hint type. #7729.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.19.0
Yongteng Lei 5 个月前
父节点
当前提交
0c2b8182e4
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1
    2
      api/db/services/dialog_service.py

+ 1
- 2
api/db/services/dialog_service.py 查看文件

if "max_tokens" in gen_conf: if "max_tokens" in gen_conf:
gen_conf["max_tokens"] = min(gen_conf["max_tokens"], max_tokens - used_token_count) gen_conf["max_tokens"] = min(gen_conf["max_tokens"], max_tokens - used_token_count)


def repair_bad_citation_formats(answer: str, kbinfos: dict, idx: dict):
def repair_bad_citation_formats(answer: str, kbinfos: dict, idx: set):
max_index = len(kbinfos["chunks"]) max_index = len(kbinfos["chunks"])


def safe_add(i): def safe_add(i):
answer = ans answer = ans
yield {"answer": answer, "reference": {}} yield {"answer": answer, "reference": {}}
yield decorate_answer(answer) yield decorate_answer(answer)


正在加载...
取消
保存