mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
add usage example to sagemaker docs
This commit is contained in:
parent
38bdb9335c
commit
225d0fb703
1 changed files with 17 additions and 0 deletions
|
@ -10,6 +10,23 @@ os.environ["AWS_SECRET_ACCESS_KEY"] = ""
|
|||
os.environ["AWS_REGION_NAME"] = ""
|
||||
```
|
||||
|
||||
### Usage
|
||||
```python
|
||||
import os
|
||||
from litellm import completion
|
||||
|
||||
os.environ["AWS_ACCESS_KEY_ID"] = ""
|
||||
os.environ["AWS_SECRET_ACCESS_KEY"] = ""
|
||||
os.environ["AWS_REGION_NAME"] = ""
|
||||
|
||||
response = completion(
|
||||
model="sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b",
|
||||
messages=[{ "content": "Hello, how are you?","role": "user"}],
|
||||
temperature=0.2,
|
||||
max_tokens=80
|
||||
)
|
||||
```
|
||||
|
||||
### AWS Sagemaker Models
|
||||
Here's an example of using a sagemaker model with LiteLLM
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue