forked from phoenix/litellm-mirror
docs(token_usage.md): adding registering model via url to docs
This commit is contained in:
parent
b3dc1eccc3
commit
59ddda5c4b
1 changed files with 10 additions and 0 deletions
|
@ -145,8 +145,10 @@ print(model_cost) # {'gpt-3.5-turbo': {'max_tokens': 4000, 'input_cost_per_token
|
|||
|
||||
### 8. `register_model`
|
||||
|
||||
* Input: Provide EITHER a model cost dictionary or a url to a hosted json blob
|
||||
* Output: Returns updated model_cost dictionary + updates litellm.model_cost with model details.
|
||||
|
||||
**Dictionary**
|
||||
```python
|
||||
from litellm import register_model
|
||||
|
||||
|
@ -161,6 +163,14 @@ litellm.register_model({
|
|||
})
|
||||
```
|
||||
|
||||
**URL for json blob**
|
||||
```python
|
||||
import litellm
|
||||
|
||||
litellm.register_model(model_cost=
|
||||
"https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json")
|
||||
```
|
||||
|
||||
### 9. `api.litellm.ai`
|
||||
|
||||
**Example Curl Request**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue