privateGPT/private_gpt/__main__.py
Pablo Orgaz 022bd718e3
fix: Remove global state (#1216)
* Remove all global settings state

* chore: remove autogenerated class

* chore: cleanup

* chore: merge conflicts
2023-11-12 22:20:36 +01:00

12 lines
421 B
Python

# start a fastapi server with uvicorn
import uvicorn
from private_gpt.main import app
from private_gpt.settings.settings import settings
# Set log_config=None to do not use the uvicorn logging configuration, and
# use ours instead. For reference, see below:
# https://github.com/tiangolo/fastapi/discussions/7457#discussioncomment-5141108
uvicorn.run(app, host="0.0.0.0", port=settings().server.port, log_config=None)