From 7e01e8247079224360ec514daf0ab6c9f548b971 Mon Sep 17 00:00:00 2001 From: Astlvk Date: Fri, 15 Dec 2023 07:54:36 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E8=BF=AD=E4=BB=A3=E5=99=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BC=A0=E9=80=92=E9=94=99=E8=AF=AF=EF=BC=8C=E7=9F=A5?= =?UTF-8?q?=E8=AF=86=E5=BA=93=E9=97=AE=E7=AD=94=E6=8A=A5=E9=94=99TypeError?= =?UTF-8?q?:=20unhashable=20type:=20'list'=20(#2383)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com> --- server/chat/knowledge_base_chat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/chat/knowledge_base_chat.py b/server/chat/knowledge_base_chat.py index 18ef2b0..162e24d 100644 --- a/server/chat/knowledge_base_chat.py +++ b/server/chat/knowledge_base_chat.py @@ -57,7 +57,7 @@ async def knowledge_base_chat(query: str = Body(..., description="用户输入", query: str, top_k: int, history: Optional[List[History]], - model_name: str = LLM_MODELS[0], + model_name: str = model_name, prompt_name: str = prompt_name, ) -> AsyncIterable[str]: nonlocal max_tokens @@ -120,3 +120,4 @@ async def knowledge_base_chat(query: str = Body(..., description="用户输入", await task return EventSourceResponse(knowledge_base_chat_iterator(query, top_k, history,model_name,prompt_name)) +