fixes abetlen/llama-cpp-python #358

This commit is contained in:
Gabor 2023-06-11 00:58:08 +01:00
parent ad4479e609
commit 3ea31930e5
2 changed files with 7 additions and 1 deletions

View file

@ -46,5 +46,5 @@ if __name__ == "__main__":
app = create_app(settings=settings)
uvicorn.run(
app, host=os.getenv("HOST", "localhost"), port=int(os.getenv("PORT", 8000))
app, host=settings.host, port=settings.port
)

View file

@ -72,6 +72,12 @@ class Settings(BaseSettings):
verbose: bool = Field(
default=True, description="Whether to print debug information."
)
host: str = Field(
default="localhost", description="Listen address"
)
port: int = Field(
default=8000, description="Listen port"
)
router = APIRouter()