diff --git a/docs/my-website/docs/simple_proxy.md b/docs/my-website/docs/simple_proxy.md index 6df34bad263..e6db9f7044c 100644 --- a/docs/my-website/docs/simple_proxy.md +++ b/docs/my-website/docs/simple_proxy.md @@ -6,9 +6,9 @@ import TabItem from '@theme/TabItem'; LiteLLM Server manages: -* Calling 100+ LLMs [Huggingface/Bedrock/TogetherAI/etc.](#other-supported-models) in the OpenAI `ChatCompletions` & `Completions` format -* Load balancing - between [Multiple Models](#multiple-models---quick-start) + [Deployments of the same model](#multiple-instances-of-1-model) **LiteLLM proxy can handle 1k+ requests/second during load tests** -* Authentication & Spend Tracking [Virtual Keys](#managing-auth---virtual-keys) +* **Unified Interface**: Calling 100+ LLMs [Huggingface/Bedrock/TogetherAI/etc.](#other-supported-models) in the OpenAI `ChatCompletions` & `Completions` format +* **Load Balancing**: between [Multiple Models](#multiple-models---quick-start) + [Deployments of the same model](#multiple-instances-of-1-model) - LiteLLM proxy can handle 1.5k+ requests/second during load tests. +* **Cost tracking**: Authentication & Spend Tracking [Virtual Keys](#managing-auth---virtual-keys) [**See LiteLLM Proxy code**](https://github.com/BerriAI/litellm/tree/main/litellm/proxy) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 08d6b723649..09ab175a182 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -955,10 +955,10 @@ async def info_key_fn(key: str = fastapi.Query(..., description="Key in the requ #### [BETA] - This is a beta endpoint, format might change based on user feedback. - https://github.com/BerriAI/litellm/issues/964 @router.post("/model/new", description="Allows adding new models to the model list in the config.yaml", tags=["model management"], dependencies=[Depends(user_api_key_auth)]) async def add_new_model(model_params: ModelParams): - global llm_router, llm_model_list, general_settings + global llm_router, llm_model_list, general_settings, user_config_file_path try: # Load existing config - with open(user_config_file_path, "r") as config_file: + with open(f"{user_config_file_path}", "r") as config_file: config = yaml.safe_load(config_file) # Add the new model to the config @@ -968,7 +968,7 @@ async def add_new_model(model_params: ModelParams): }) # Save the updated config - with open(user_config_file_path, "w") as config_file: + with open(f"{user_config_file_path}", "w") as config_file: yaml.dump(config, config_file, default_flow_style=False) # update Router @@ -983,9 +983,9 @@ async def add_new_model(model_params: ModelParams): #### [BETA] - This is a beta endpoint, format might change based on user feedback. - https://github.com/BerriAI/litellm/issues/933 @router.get("/model/info", description="Provides more info about each model in /models, including config.yaml descriptions (except api key and api base)", tags=["model management"], dependencies=[Depends(user_api_key_auth)]) async def model_info(request: Request): - global llm_model_list, general_settings + global llm_model_list, general_settings, user_config_file_path # Load existing config - with open(user_config_file_path, "r") as config_file: + with open(f"{user_config_file_path}", "r") as config_file: config = yaml.safe_load(config_file) all_models = config['model_list']