Skip to content

Commit

Permalink
Main: Add logging for API routes
Browse files Browse the repository at this point in the history
Helps users get started with accessing the docs.

Signed-off-by: kingbri <[email protected]>
  • Loading branch information
bdashore3 committed Jan 11, 2024
1 parent 7a29664 commit 902e841
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,17 @@ def entrypoint(args: Optional[dict] = None):
lora_dir = pathlib.Path(unwrap(lora_config.get("lora_dir"), "loras"))
MODEL_CONTAINER.load_loras(lora_dir.resolve(), **lora_config)

host = unwrap(network_config.get("host"), "127.0.0.1")
port = unwrap(network_config.get("port"), 5000)

logger.info(f"Developer documentation: http://{host}:{port}/docs")
logger.info(f"Completions: http://{host}:{port}/v1/completions")
logger.info(f"Chat completions: http://{host}:{port}/v1/chat/completions")

uvicorn.run(
app,
host=network_config.get("host", "127.0.0.1"),
port=network_config.get("port", 5000),
host=host,
port=port,
log_level="debug",
)

Expand Down

0 comments on commit 902e841

Please sign in to comment.