forked from phoenix/litellm-mirror
Merge pull request #3870 from BerriAI/litellm_rename_end_user
[Feat] Rename `/end/user/new` -> `/customer/new` (maintain backwards compatibility)
This commit is contained in:
commit
e1b46d4b6e
3 changed files with 310 additions and 78 deletions
|
@ -13,7 +13,7 @@ Requirements:
|
|||
You can set budgets at 3 levels:
|
||||
- For the proxy
|
||||
- For an internal user
|
||||
- For an end-user
|
||||
- For a customer (end-user)
|
||||
- For a key
|
||||
- For a key (model specific budgets)
|
||||
|
||||
|
@ -173,7 +173,7 @@ curl --location 'http://localhost:4000/chat/completions' \
|
|||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="per-user-chat" label="For End User">
|
||||
<TabItem value="per-user-chat" label="For Customers">
|
||||
|
||||
Use this to budget `user` passed to `/chat/completions`, **without needing to create a key for every user**
|
||||
|
||||
|
@ -452,7 +452,7 @@ curl --location 'http://0.0.0.0:4000/key/generate' \
|
|||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="per-end-user" label="For End User">
|
||||
<TabItem value="per-end-user" label="For customers">
|
||||
|
||||
:::info
|
||||
|
||||
|
@ -477,12 +477,12 @@ curl --location 'http://0.0.0.0:4000/budget/new' \
|
|||
```
|
||||
|
||||
|
||||
#### Step 2. Create `End-User` with Budget
|
||||
#### Step 2. Create `Customer` with Budget
|
||||
|
||||
We use `budget_id="free-tier"` from Step 1 when creating this new end user
|
||||
We use `budget_id="free-tier"` from Step 1 when creating this new customers
|
||||
|
||||
```shell
|
||||
curl --location 'http://0.0.0.0:4000/end_user/new' \
|
||||
curl --location 'http://0.0.0.0:4000/customer/new' \
|
||||
--header 'Authorization: Bearer sk-1234' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
|
@ -492,7 +492,7 @@ curl --location 'http://0.0.0.0:4000/end_user/new' \
|
|||
```
|
||||
|
||||
|
||||
#### Step 3. Pass end user id in `/chat/completions` requests
|
||||
#### Step 3. Pass `user_id` id in `/chat/completions` requests
|
||||
|
||||
Pass the `user_id` from Step 2 as `user="palantir"`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue