Update api.py (#540)

修改api部署json解析
This commit is contained in:
zzxs 2023-06-03 14:20:03 +08:00 committed by GitHub
parent 33683f447c
commit dc52bb134d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
api.py
View File

@ -310,7 +310,7 @@ async def stream_chat(websocket: WebSocket, knowledge_base_id: str):
turn = 1 turn = 1
while True: while True:
input_json = await websocket.receive_json() input_json = await websocket.receive_json()
question, history, knowledge_base_id = input_json[""], input_json["history"], input_json["knowledge_base_id"] question, history, knowledge_base_id = input_json["question"], input_json["history"], input_json["knowledge_base_id"]
vs_path = os.path.join(VS_ROOT_PATH, knowledge_base_id) vs_path = os.path.join(VS_ROOT_PATH, knowledge_base_id)
if not os.path.exists(vs_path): if not os.path.exists(vs_path):