fixed 迭代器参数传递错误,知识库问答报错TypeError: unhashable type: 'list' (#2383)
Co-authored-by: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com>
This commit is contained in:
parent
7e8391eb55
commit
7e01e82470
|
|
@ -57,7 +57,7 @@ async def knowledge_base_chat(query: str = Body(..., description="用户输入",
|
||||||
query: str,
|
query: str,
|
||||||
top_k: int,
|
top_k: int,
|
||||||
history: Optional[List[History]],
|
history: Optional[List[History]],
|
||||||
model_name: str = LLM_MODELS[0],
|
model_name: str = model_name,
|
||||||
prompt_name: str = prompt_name,
|
prompt_name: str = prompt_name,
|
||||||
) -> AsyncIterable[str]:
|
) -> AsyncIterable[str]:
|
||||||
nonlocal max_tokens
|
nonlocal max_tokens
|
||||||
|
|
@ -120,3 +120,4 @@ async def knowledge_base_chat(query: str = Body(..., description="用户输入",
|
||||||
await task
|
await task
|
||||||
|
|
||||||
return EventSourceResponse(knowledge_base_chat_iterator(query, top_k, history,model_name,prompt_name))
|
return EventSourceResponse(knowledge_base_chat_iterator(query, top_k, history,model_name,prompt_name))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue