mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
(docs) replicate deployments
This commit is contained in:
parent
c2b263e66d
commit
ff9233879e
1 changed files with 11 additions and 2 deletions
|
@ -8,11 +8,9 @@ import os
|
|||
os.environ["REPLICATE_API_KEY"] = ""
|
||||
```
|
||||
|
||||
|
||||
### Example Call
|
||||
|
||||
```python
|
||||
# !pip install litellm
|
||||
from litellm import completion
|
||||
import os
|
||||
## set ENV variables
|
||||
|
@ -25,6 +23,17 @@ response = completion(
|
|||
)
|
||||
```
|
||||
|
||||
### Example - Calling Replicate Deployments
|
||||
Calling a [deployed replicate LLM](https://replicate.com/deployments)
|
||||
Add the `replicate/deployments/` prefix to your model, so litellm will call the `deployments` endpoint. This will call `ishaan-jaff/ishaan-mistral` deployment on replicate
|
||||
|
||||
```python
|
||||
response = completion(
|
||||
model="replicate/deployments/ishaan-jaff/ishaan-mistral",
|
||||
messages= [{ "content": "Hello, how are you?","role": "user"}]
|
||||
)
|
||||
```
|
||||
|
||||
### Replicate Models
|
||||
liteLLM supports all replicate LLMs
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue