mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Make all commands show server URL (#10801)
* Make all commands show server URL so users know which server they're accessing * Write msg to stderr & only if it's a tty
This commit is contained in:
parent
cd8ec4556f
commit
ad9b79259f
1 changed files with 3 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
# stdlib imports
|
||||
import sys
|
||||
from typing import Optional
|
||||
|
||||
# third party imports
|
||||
|
|
@ -60,6 +61,8 @@ def print_version(base_url: str, api_key: Optional[str]):
|
|||
def cli(ctx: click.Context, base_url: str, api_key: Optional[str]) -> None:
|
||||
"""LiteLLM Proxy CLI - Manage your LiteLLM proxy server"""
|
||||
ctx.ensure_object(dict)
|
||||
if sys.stderr.isatty():
|
||||
click.secho(f"Accessing LiteLLM server: {base_url} ...\n", fg="yellow", err=True)
|
||||
ctx.obj["base_url"] = base_url
|
||||
ctx.obj["api_key"] = api_key
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue