simplify calling azure/commmand-r-plus

This commit is contained in:
Ishaan Jaff 2024-04-05 09:18:11 -07:00
parent 1ba1c84d83
commit cfe358abaa
2 changed files with 2 additions and 6 deletions

View file

@ -1,15 +1,12 @@
# Azure AI Studio
## Sample Usage
Call Azure Command R Plus in the OpenAI Format
- 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
The `azure/` prefix sends this to Azure
```python
import litellm
response = litellm.completion(
model="azure/command-r-plus",
model_id="Cohere-command-r-plus-gylpd",
model="azure/<your-deployment-name>",
api_base="https://Cohere-command-r-plus-gylpd-serverless.eastus2.inference.ai.azure.com/v1/"
api_key="eskk******"
messages=[{"role": "user", "content": "What is the meaning of life?"}],

View file

@ -59,7 +59,6 @@ def test_completion_azure_command_r():
response = completion(
model="azure/command-r-plus",
model_id="Cohere-command-r-plus-gylpd",
api_base=os.getenv("AZURE_COHERE_API_BASE"),
api_key=os.getenv("AZURE_COHERE_API_KEY"),
messages=[{"role": "user", "content": "What is the meaning of life?"}],