Azure / Azure/azureml-examples

Cohere Command R using Cohere SDK example does not work

Open
#3,539 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
2k
Forks
1.7k
Avg merge
18h 18m
Merged PRs (30d)
2

Description

### Operating System

Linux

### Version Information

Python Version: 3.11
azure-ai-inference package version: 1.0.0b9

### Steps to reproduce

The example for using Cohere Command R [here](https://github.com/Azure/azureml-examples/blob/main/sdk/python/foundation-models/cohere/cohere-cmdR.ipynb) seems to be out of date and no longer functional. It describes how to access an instantiated Cohere Command R model using the cohere SDK (as opposed to the azure-ai-inference SDK). I have created a Command R model deployment on Azure AI, and can access it through the azure-ai-inference SDK, but the approach described in the tutorial using the cohere SDK does not work as described, and any of the obvious changes I tried did not work either. At best I can get either a ``404: resource not found`` response or ``'401', 'message': 'Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.'`` when pointing directly to the listed endpoint (this endpoint and API key does work via the azure-ai-inference SDK, so it is not an issue with the key or endpoint).

### Expected behavior

The tutorial should work as expected and not throw errors.

### Actual behavior

Failure to be able to access the endpoint via the cohere SDK.

### Addition information

_No response_

Contributor guide

Open the contributing guide

Research direction

Open sdk/python/foundation-models/cohere/cohere-cmdR.ipynb and reproduce the documented Cohere SDK flow with Python 3.11 and azure-ai-inference 1.0.0b9. Compare its endpoint and authentication setup with the working azure-ai-inference access described in the issue. Done means the tutorial accesses the deployed Command R endpoint without 404 or authentication errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, jupyter-notebook, python
Domain
api, documentation, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.