From 42f4d4dbc8c19b09bf23076512fff1f43964ade7 Mon Sep 17 00:00:00 2001 From: Yongteng Lei Date: Tue, 20 May 2025 17:21:42 +0800 Subject: [PATCH] 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) --- api/db/services/dialog_service.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/db/services/dialog_service.py b/api/db/services/dialog_service.py index 607194db5..79fcfcad3 100644 --- a/api/db/services/dialog_service.py +++ b/api/db/services/dialog_service.py @@ -302,7 +302,7 @@ def chat(dialog, messages, stream=True, **kwargs): if "max_tokens" in gen_conf: 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"]) def safe_add(i): @@ -623,4 +623,3 @@ def ask(question, kb_ids, tenant_id): answer = ans yield {"answer": answer, "reference": {}} yield decorate_answer(answer) -