fix #2388
This commit is contained in:
parent
521ad76552
commit
39bd5bd524
|
@ -108,7 +108,7 @@ def create_app(chat_model: "ChatModel") -> "FastAPI":
|
|||
tool_list = request.tools
|
||||
if len(tool_list):
|
||||
try:
|
||||
tools = json.dumps([tool_list[0]["function"]], ensure_ascii=False)
|
||||
tools = json.dumps([tool["function"] for tool in tool_list], ensure_ascii=False)
|
||||
except Exception:
|
||||
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid tools")
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue