Merge pull request #360 from Orfeous/main

fixes abetlen/llama-cpp-python #358
This commit is contained in:
Andrei 2023-06-14 00:25:04 -04:00 committed by GitHub
commit 6517900623
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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=os.getenv("HOST", settings.host), port=int(os.getenv("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()