8000 fixes abetlen/llama-cpp-python #358 · colosieve/llama-cpp-python@3ea3193 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ea3193

Browse files
committed
fixes abetlen/llama-cpp-python abetlen#358
1 parent ad4479e commit 3ea3193

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

llama_cpp/server/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@
4646
app = create_app(settings=settings)
4747

4848
uvicorn.run(
49-
app, host=os.getenv("HOST", "localhost"), port=int(os.getenv("PORT", 8000))
49+
app, host=settings.host, port=settings.port
5050
)

llama_cpp/server/app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ class Settings(BaseSettings):
7272
verbose: bool = Field(
7373
default=True, description="Whether to print debug information."
7474
)
75+
host: str = Field(
76+
default="localhost", description="Listen address"
77+
)
78+
port: int = Field(
79+
default=8000, description="Listen port"
80+
)
7581

7682

7783
router = APIRouter()

0 commit comments

Comments
 (0)
0