Merge pull request #2039 from BerriAI/litellm_customizationroot_path

[FEAT] Set FastAPI root path
This commit is contained in:
Ishaan Jaff 2024-02-17 13:23:31 -08:00 committed by GitHub
commit ab8df9c284
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View file

@ -183,7 +183,22 @@ Your OpenAI proxy server is now running on `http://127.0.0.1:8000`.
</TabItem>
</Tabs>
## Setting SSL Certification
## Advanced Deployment Settings
### Customization of the server root path
:::info
In a Kubernetes deployment, it's possible to utilize a shared DNS to host multiple applications by modifying the virtual service
:::
Customize the root path to eliminate the need for employing multiple DNS configurations during deployment.
👉 Set `SERVER_ROOT_PATH` in your .env and this will be set as your server root path
### Setting SSL Certification
Use this, If you need to set ssl certificates for your on prem litellm proxy

View file

@ -143,6 +143,9 @@ app = FastAPI(
title="LiteLLM API",
description=f"Proxy Server to call 100+ LLMs in the OpenAI format\n\n{ui_message}",
version=version,
root_path=os.environ.get(
"SERVER_ROOT_PATH", ""
), # check if user passed root path, FastAPI defaults this value to ""
)