feat: 修改 mian 文件
This commit is contained in:
parent
80fef129a9
commit
694e52fef2
7
main.py
7
main.py
|
@ -330,7 +330,12 @@ async def extract_info(
|
|||
conf.CHAT_API,
|
||||
json={"model": conf.CHAT_MODEL, "prompt": prompt, "stream": False},
|
||||
)
|
||||
info = json.loads((r.json()["response"]))
|
||||
# info = json.loads((r.json()["response"]))
|
||||
try:
|
||||
# info = json.loads(r.json()["response"])
|
||||
info = r.json().get("response", {})
|
||||
except json.JSONDecodeError as e:
|
||||
print(f"JSONDecodeError: {e}")
|
||||
return JSONResponse(content=info)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue