forked from phoenix/litellm-mirror
add doc on config management
This commit is contained in:
parent
50dccce508
commit
4a465aff1c
3 changed files with 61 additions and 2 deletions
59
docs/my-website/docs/proxy/config_management.md
Normal file
59
docs/my-website/docs/proxy/config_management.md
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
# File Management
|
||||||
|
|
||||||
|
## `include` external YAML files in a config.yaml
|
||||||
|
|
||||||
|
You can use `include` to include external YAML files in a config.yaml.
|
||||||
|
|
||||||
|
**Quick Start Usage:**
|
||||||
|
|
||||||
|
To include a config file, use `include` with either a single file or a list of files.
|
||||||
|
|
||||||
|
Contents of `parent_config.yaml`:
|
||||||
|
```yaml
|
||||||
|
include:
|
||||||
|
- model_config.yaml # 👈 Key change, will include the contents of model_config.yaml
|
||||||
|
|
||||||
|
litellm_settings:
|
||||||
|
callbacks: ["prometheus"]
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Contents of `model_config.yaml`:
|
||||||
|
```yaml
|
||||||
|
model_list:
|
||||||
|
- model_name: gpt-4o
|
||||||
|
litellm_params:
|
||||||
|
model: openai/gpt-4o
|
||||||
|
api_base: https://exampleopenaiendpoint-production.up.railway.app/
|
||||||
|
- model_name: fake-anthropic-endpoint
|
||||||
|
litellm_params:
|
||||||
|
model: anthropic/fake
|
||||||
|
api_base: https://exampleanthropicendpoint-production.up.railway.app/
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Start proxy server
|
||||||
|
|
||||||
|
This will start the proxy server with config `parent_config.yaml`. Since the `include` directive is used, the server will also include the contents of `model_config.yaml`.
|
||||||
|
```
|
||||||
|
litellm --config parent_config.yaml --detailed_debug
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Examples using `include`
|
||||||
|
|
||||||
|
Include a single file:
|
||||||
|
```yaml
|
||||||
|
include:
|
||||||
|
- model_config.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
Include multiple files:
|
||||||
|
```yaml
|
||||||
|
include:
|
||||||
|
- model_config.yaml
|
||||||
|
- another_config.yaml
|
||||||
|
```
|
|
@ -2,7 +2,7 @@ import Image from '@theme/IdealImage';
|
||||||
import Tabs from '@theme/Tabs';
|
import Tabs from '@theme/Tabs';
|
||||||
import TabItem from '@theme/TabItem';
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
# Proxy Config.yaml
|
# Overview
|
||||||
Set model list, `api_base`, `api_key`, `temperature` & proxy server settings (`master-key`) on the config.yaml.
|
Set model list, `api_base`, `api_key`, `temperature` & proxy server settings (`master-key`) on the config.yaml.
|
||||||
|
|
||||||
| Param Name | Description |
|
| Param Name | Description |
|
||||||
|
|
|
@ -32,7 +32,7 @@ const sidebars = {
|
||||||
{
|
{
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"label": "Config.yaml",
|
"label": "Config.yaml",
|
||||||
"items": ["proxy/configs", "proxy/config_settings"]
|
"items": ["proxy/configs", "proxy/config_management", "proxy/config_settings"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue