mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
simplify calling azure/commmand-r-plus
This commit is contained in:
parent
1ba1c84d83
commit
cfe358abaa
2 changed files with 2 additions and 6 deletions
|
@ -1,15 +1,12 @@
|
||||||
# Azure AI Studio
|
# Azure AI Studio
|
||||||
|
|
||||||
## Sample Usage
|
## Sample Usage
|
||||||
Call Azure Command R Plus in the OpenAI Format
|
The `azure/` prefix sends this to Azure
|
||||||
- model=`azure/command-r-plus`. The `azure/` prefix sends this to Azure. The `command-r-plus` indicates the base model being called
|
|
||||||
- `model_id` = This is your deployment name on Azure AI studio
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import litellm
|
import litellm
|
||||||
response = litellm.completion(
|
response = litellm.completion(
|
||||||
model="azure/command-r-plus",
|
model="azure/<your-deployment-name>",
|
||||||
model_id="Cohere-command-r-plus-gylpd",
|
|
||||||
api_base="https://Cohere-command-r-plus-gylpd-serverless.eastus2.inference.ai.azure.com/v1/"
|
api_base="https://Cohere-command-r-plus-gylpd-serverless.eastus2.inference.ai.azure.com/v1/"
|
||||||
api_key="eskk******"
|
api_key="eskk******"
|
||||||
messages=[{"role": "user", "content": "What is the meaning of life?"}],
|
messages=[{"role": "user", "content": "What is the meaning of life?"}],
|
||||||
|
|
|
@ -59,7 +59,6 @@ def test_completion_azure_command_r():
|
||||||
|
|
||||||
response = completion(
|
response = completion(
|
||||||
model="azure/command-r-plus",
|
model="azure/command-r-plus",
|
||||||
model_id="Cohere-command-r-plus-gylpd",
|
|
||||||
api_base=os.getenv("AZURE_COHERE_API_BASE"),
|
api_base=os.getenv("AZURE_COHERE_API_BASE"),
|
||||||
api_key=os.getenv("AZURE_COHERE_API_KEY"),
|
api_key=os.getenv("AZURE_COHERE_API_KEY"),
|
||||||
messages=[{"role": "user", "content": "What is the meaning of life?"}],
|
messages=[{"role": "user", "content": "What is the meaning of life?"}],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue