Merge pull request #360 from Orfeous/main
fixes abetlen/llama-cpp-python #358
This commit is contained in:
commit
6517900623
2 changed files with 7 additions and 1 deletions
|
@ -46,5 +46,5 @@ if __name__ == "__main__":
|
||||||
app = create_app(settings=settings)
|
app = create_app(settings=settings)
|
||||||
|
|
||||||
uvicorn.run(
|
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))
|
||||||
)
|
)
|
||||||
|
|
|
@ -72,6 +72,12 @@ class Settings(BaseSettings):
|
||||||
verbose: bool = Field(
|
verbose: bool = Field(
|
||||||
default=True, description="Whether to print debug information."
|
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()
|
router = APIRouter()
|
||||||
|
|
Loading…
Reference in a new issue