fixed 迭代器参数传递错误,知识库问答报错TypeError: unhashable type: 'list' (#2383)

Co-authored-by: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com>
This commit is contained in:
Astlvk 2023-12-15 07:54:36 +08:00 committed by GitHub
parent 7e8391eb55
commit 7e01e82470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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))