Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

运行python3.9 api.py WARNING: You must pass the application as an import string to enable 'reload' or 'workers'.

Open cristianohello opened this issue 1 year ago • 3 comments

cristianohello avatar Apr 26 '23 09:04 cristianohello

api.py文件最下面改成这样试试:

if name == "main": uvicorn.run( app="mp_main:app", host='0.0.0.0', port=8082, reload=True, )

JohnHello avatar Apr 26 '23 10:04 JohnHello

改完后显示找不到名为mp_main的module怎么办?@JohnHello

JingyiZhang0225 avatar Apr 27 '23 05:04 JingyiZhang0225

修改: uvicorn.run(app, host='127.0.0.1', port=8100, workers=1) 这样可以运行了

eeric avatar Apr 27 '23 10:04 eeric