(docs) replicate deployments

This commit is contained in:
ishaan-jaff 2023-11-09 18:08:59 -08:00
parent c2b263e66d
commit ff9233879e

View file

@ -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