mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
use deploy flag
This commit is contained in:
parent
f4465e301f
commit
7804aa1ddf
2 changed files with 45 additions and 7 deletions
|
@ -30,15 +30,20 @@ def run_server(port, api_base, model, deploy, debug, temperature, max_tokens, te
|
|||
click.echo('No .env.template file found.')
|
||||
|
||||
# from .proxy_server import app, initialize
|
||||
from proxy_server import app, initialize
|
||||
initialize(model, api_base, debug, temperature, max_tokens, telemetry)
|
||||
from proxy_server import app, initialize, deploy_proxy
|
||||
if deploy == True:
|
||||
click.echo('LiteLLM: Deploying your proxy server')
|
||||
url = deploy_proxy(model, api_base, debug, temperature, max_tokens, telemetry, deploy)
|
||||
click.echo(f'LiteLLM: Your deployed url: {url}')
|
||||
else:
|
||||
initialize(model, api_base, debug, temperature, max_tokens, telemetry)
|
||||
|
||||
|
||||
try:
|
||||
import uvicorn
|
||||
except:
|
||||
raise ImportError("Uvicorn needs to be imported. Run - `pip install uvicorn`")
|
||||
uvicorn.run(app, host='0.0.0.0', port=port)
|
||||
try:
|
||||
import uvicorn
|
||||
except:
|
||||
raise ImportError("Uvicorn needs to be imported. Run - `pip install uvicorn`")
|
||||
uvicorn.run(app, host='0.0.0.0', port=port)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue