更改api.py的chat函数的history的类型为Optional,修复chat接口不可调用的问题
This commit is contained in:
parent
3b6819f091
commit
b2278f2f25
3
api.py
3
api.py
|
|
@ -374,7 +374,7 @@ async def bing_search_chat(
|
|||
|
||||
async def chat(
|
||||
question: str = Body(..., description="Question", example="工伤保险是什么?"),
|
||||
history: List[List[str]] = Body(
|
||||
history: Optional[List[List[str]]] = Body(
|
||||
[],
|
||||
description="History of previous questions and answers",
|
||||
example=[
|
||||
|
|
@ -392,7 +392,6 @@ async def chat(
|
|||
resp = answer_result.llm_output["answer"]
|
||||
history = answer_result.history
|
||||
pass
|
||||
|
||||
return ChatMessage(
|
||||
question=question,
|
||||
response=resp,
|
||||
|
|
|
|||
Loading…
Reference in New Issue