mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-12 04:23:42 +00:00
Merge pull request #4292 from BerriAI/docs---step-by-step-team-budget-ui
docs - setting team budgets on ui
This commit is contained in:
@@ -12,6 +12,9 @@ Track spend, set budgets for your Internal Team
|
||||
- Set `max_budget=000000001` ($ value the team is allowed to spend)
|
||||
- Set `budget_duration="1d"` (How frequently the budget should update)
|
||||
|
||||
<Tabs>
|
||||
|
||||
<TabItem value="API" label="API">
|
||||
|
||||
Create a new team and set `max_budget` and `budget_duration`
|
||||
```shell
|
||||
@@ -35,8 +38,15 @@ Response
|
||||
"budget_reset_at": "2024-06-14T22:48:36.594000Z"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="UI" label="Admin UI">
|
||||
<Image img={require('../../img/create_team_gif_good.gif')} />
|
||||
|
||||
</TabItem>
|
||||
|
||||
|
||||
</Tabs>
|
||||
|
||||
Possible values for `budget_duration`
|
||||
|
||||
@@ -51,7 +61,11 @@ Possible values for `budget_duration`
|
||||
|
||||
### 2. Create a key for the `team`
|
||||
|
||||
Create a key for `team_id="de35b29e-6ca8-4f47-b804-2b79d07aa99a"` from Step 1
|
||||
Create a key for Team=`QA Prod Bot` and `team_id="de35b29e-6ca8-4f47-b804-2b79d07aa99a"` from Step 1
|
||||
|
||||
<Tabs>
|
||||
|
||||
<TabItem value="api" label="API">
|
||||
|
||||
💡 **The Budget for Team="QA Prod Bot" budget will apply to this team**
|
||||
|
||||
@@ -67,11 +81,21 @@ Response
|
||||
```shell
|
||||
{"team_id":"de35b29e-6ca8-4f47-b804-2b79d07aa99a", "key":"sk-5qtncoYjzRcxMM4bDRktNQ"}
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="UI" label="Admin UI">
|
||||
<Image img={require('../../img/create_key_in_team.gif')} />
|
||||
</TabItem>
|
||||
|
||||
</Tabs>
|
||||
|
||||
### 3. Test It
|
||||
|
||||
Use the key from step 2 and run this Request twice
|
||||
<Tabs>
|
||||
|
||||
<TabItem value="api" label="API">
|
||||
|
||||
```shell
|
||||
curl -X POST 'http://0.0.0.0:4000/chat/completions' \
|
||||
-H 'Authorization: Bearer sk-mso-JSykEGri86KyOvgxBw' \
|
||||
@@ -100,6 +124,13 @@ On the 2nd response - expect to see the following exception
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="UI" label="Admin UI">
|
||||
<Image img={require('../../img/test_key_budget.gif')} />
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Advanced
|
||||
|
||||
### Prometheus metrics for `remaining_budget`
|
||||
|
||||
@@ -62,6 +62,14 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \
|
||||
You can:
|
||||
- Add budgets to Teams
|
||||
|
||||
:::info
|
||||
|
||||
**Step-by step tutorial on setting, resetting budgets on Teams here (API or using Admin UI)**
|
||||
|
||||
👉 [https://docs.litellm.ai/docs/proxy/team_budgets](https://docs.litellm.ai/docs/proxy/team_budgets)
|
||||
|
||||
:::
|
||||
|
||||
|
||||
#### **Add budgets to teams**
|
||||
```shell
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
@@ -43,8 +43,8 @@ const sidebars = {
|
||||
"proxy/cost_tracking",
|
||||
"proxy/self_serve",
|
||||
"proxy/users",
|
||||
"proxy/customers",
|
||||
"proxy/team_budgets",
|
||||
"proxy/customers",
|
||||
"proxy/billing",
|
||||
"proxy/user_keys",
|
||||
"proxy/virtual_keys",
|
||||
|
||||
Reference in New Issue
Block a user