Skip to content

Commit d0fb5d8

Browse files
committed
fixing blockers
1 parent c796aca commit d0fb5d8

File tree

4 files changed

+105
-111
lines changed

4 files changed

+105
-111
lines changed

articles/ai-studio/how-to/deploy-models-cohere-command.md

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ Above mentioned Cohere models can be deployed as a service with pay-as-you-go, a
7777
> For Cohere family models, the pay-as-you-go model deployment offering is only available with AI hubs created in EastUS, EastUS2 or Sweden Central regions.
7878
7979
- An [Azure AI project](../how-to/create-projects.md) in Azure AI Studio.
80-
- Azure role-based access controls (Azure RBAC) are used to grant access to operations in Azure AI Studio. To perform the steps in this article, your user account must be assigned the __Azure AI Developer role__ on the resource group.
81-
82-
For more information on permissions, see [Role-based access control in Azure AI Studio](../concepts/rbac-ai-studio.md).
80+
- Azure role-based access controls (Azure RBAC) are used to grant access to operations in Azure AI Studio. To perform the steps in this article, your user account must be assigned the __Azure AI Developer role__ on the resource group. For more information on permissions, see [Role-based access control in Azure AI Studio](../concepts/rbac-ai-studio.md).
8381

8482

8583
### Create a new deployment
@@ -129,20 +127,21 @@ These models can be consumed using the chat API.
129127

130128
1. Cohere exposes two routes for inference with the Command R and Command R+ models. `v1/chat/completions` adheres to the Azure AI Generative Messages API schema, and `v1/chat` supports Cohere's native API schema.
131129

132-
For more information on using the APIs, see the [reference](#chat-api-reference-for-cohere-models-deployed-as-a-service) section.
130+
For more information on using the APIs, see the [reference](#chat-api-reference-for-cohere-models-deployed-as-a-service) section.
133131

134132
## Chat API reference for Cohere models deployed as a service
135133

136-
## v1/chat/completions
137-
### Request
134+
### v1/chat/completions
135+
136+
#### Request
138137
```
139138
POST /v1/chat/completions HTTP/1.1
140139
Host: <DEPLOYMENT_URI>
141140
Authorization: Bearer <TOKEN>
142141
Content-type: application/json
143142
```
144143

145-
### v1/chat/completions request schema
144+
#### v1/chat/completions request schema
146145

147146
Cohere Command R and Command R+ accept the following parameters for a `v1/chat/completions` response inference call:
148147

@@ -162,15 +161,15 @@ Cohere Command R and Command R+ accept the following parameters for a `v1/chat/c
162161
`response_format` and `tool_choice` aren't yet supported parameters for the Command R and Command R+ models.
163162

164163

165-
#### System or user message
164+
166165
A System or User Message supports the following properties:
167166

168167
| Property | Type | Default | Description |
169168
| --- | --- | --- | --- |
170169
| `role` | `enum` | Required | `role=system` or `role=user`. |
171170
|`content` |`string` |Required |Text input for the model to respond to. |
172171

173-
#### Assistant message
172+
174173
An Assistant Message supports the following properties:
175174

176175
| Property | Type | Default | Description |
@@ -179,7 +178,7 @@ An Assistant Message supports the following properties:
179178
|`content` |`string` |Required |The contents of the assistant message. |
180179
|`tool_calls` |`array` |None |The tool calls generated by the model, such as function calls. |
181180

182-
#### Tool message
181+
183182
A Tool Message supports the following properties:
184183

185184
| Property | Type | Default | Description |
@@ -189,7 +188,7 @@ A Tool Message supports the following properties:
189188
|`tool_call_id` |`string` |None |Tool call that this message is responding to. |
190189

191190

192-
### v1/chat/completions response schema
191+
#### v1/chat/completions response schema
193192

194193
The response payload is a dictionary with the following fields:
195194

@@ -219,9 +218,9 @@ The `usage` object is a dictionary with the following fields:
219218
| `total_tokens` | `integer` | Total tokens. |
220219

221220

222-
### Examples
221+
#### Examples
223222

224-
**Request**
223+
Request:
225224

226225
```json
227226
"messages": [
@@ -250,7 +249,7 @@ The `usage` object is a dictionary with the following fields:
250249
]
251250
```
252251

253-
**Response**
252+
Response:
254253

255254
```json
256255
{
@@ -276,8 +275,8 @@ The `usage` object is a dictionary with the following fields:
276275
}
277276
```
278277

279-
## v1/chat
280-
## Request
278+
### v1/chat
279+
#### Request
281280

282281
```
283282
POST /v1/chat HTTP/1.1
@@ -286,7 +285,7 @@ The `usage` object is a dictionary with the following fields:
286285
Content-type: application/json
287286
```
288287

289-
### v1/chat request schema
288+
#### v1/chat request schema
290289

291290
Cohere Command R and Command R+ accept the following parameters for a `v1/chat` response inference call:
292291

@@ -324,7 +323,7 @@ The `documents` object has the following optional fields:
324323
|`id` |`string` |`None` |Can be supplied to identify the document in the citations. This field isn't passed to the model. |
325324
|`_excludes` |`array of strings` |`None`| Can be optionally supplied to omit some key-value pairs from being shown to the model. The omitted fields still show up in the citation object. The `_excludes` field isn't passed to the model. |
326325

327-
### v1/chat response schema
326+
#### v1/chat response schema
328327

329328
Response fields are fully documented on [Cohere's Chat API reference](https://docs.cohere.com/reference/chat). The response object always contains:
330329

@@ -339,7 +338,7 @@ Response fields are fully documented on [Cohere's Chat API reference](https://do
339338

340339
<br/>
341340

342-
### Documents
341+
#### Documents
343342
If `documents` are specified in the request, there are two other fields in the response:
344343

345344
|Key |Type |Description |
@@ -356,7 +355,7 @@ If `documents` are specified in the request, there are two other fields in the r
356355
|`text` |`string` |The text of the citation. For example, a generation of `Hello, world!` with a citation of `world` would have a text value of `world`. |
357356
|`document_ids` |`array of strings` |Identifiers of documents cited by this section of the generated reply. |
358357

359-
### Tools
358+
#### Tools
360359
If `tools` are specified and invoked by the model, there's another field in the response:
361360

362361
|Key |Type |Description |
@@ -370,7 +369,7 @@ If `tools` are specified and invoked by the model, there's another field in the
370369
|`name` |`string` |Name of the tool to call. |
371370
|`parameters` |`object` |The name and value of the parameters to use when invoking a tool. |
372371

373-
### Search_queries_only
372+
#### Search_queries_only
374373
If `search_queries_only=TRUE` is specified in the request, there are two other fields in the response:
375374

376375
|Key |Type |Description |
@@ -385,12 +384,12 @@ If `search_queries_only=TRUE` is specified in the request, there are two other f
385384
|`text` |`string` |The text of the search query. |
386385
|`generation_id` |`string` |Unique identifier for the generated search query. Useful for submitting feedback. |
387386

388-
### Examples
387+
#### Examples
389388

390-
### Chat - Completions
389+
##### Chat - Completions
391390
The following example is a sample request call to get chat completions from the Cohere Command model. Use when generating a chat completion.
392391

393-
**Request**
392+
Request:
394393

395394
```json
396395
{
@@ -402,7 +401,7 @@ The following example is a sample request call to get chat completions from the
402401
}
403402
```
404403

405-
**Response**
404+
Response:
406405

407406
```json
408407
{
@@ -428,11 +427,11 @@ The following example is a sample request call to get chat completions from the
428427
}
429428
```
430429

431-
### Chat - Grounded generation and RAG capabilities
430+
##### Chat - Grounded generation and RAG capabilities
432431

433432
Command R and Command R+ are trained for RAG via a mixture of supervised fine-tuning and preference fine-tuning, using a specific prompt template. We introduce that prompt template via the `documents` parameter. The document snippets should be chunks, rather than long documents, typically around 100-400 words per chunk. Document snippets consist of key-value pairs. The keys should be short descriptive strings. The values can be text or semi-structured.
434433

435-
**Request**
434+
Request:
436435

437436
```json
438437
{
@@ -450,7 +449,7 @@ Command R and Command R+ are trained for RAG via a mixture of supervised fine-tu
450449
}
451450
```
452451

453-
**Response**
452+
Response:
454453

455454
```json
456455
{
@@ -506,11 +505,11 @@ Command R and Command R+ are trained for RAG via a mixture of supervised fine-tu
506505
}
507506
```
508507

509-
### Chat - Tool Use
508+
##### Chat - Tool Use
510509

511510
If invoking tools or generating a response based on tool results, use the following parameters.
512511

513-
**Request**
512+
Request:
514513

515514
```json
516515
{
@@ -569,7 +568,7 @@ If invoking tools or generating a response based on tool results, use the follow
569568
}
570569
```
571570

572-
**Response**
571+
Response:
573572

574573
```json
575574
{
@@ -634,7 +633,7 @@ If invoking tools or generating a response based on tool results, use the follow
634633

635634
Once you run your function and received tool outputs, you can pass them back to the model to generate a response for the user.
636635

637-
**Request**
636+
Request:
638637

639638
```json
640639
{
@@ -693,7 +692,7 @@ Once you run your function and received tool outputs, you can pass them back to
693692
}
694693
```
695694

696-
**Response**
695+
Response:
697696

698697
```json
699698
{
@@ -756,11 +755,11 @@ Once you run your function and received tool outputs, you can pass them back to
756755
}
757756
```
758757

759-
### Chat - Search queries
758+
##### Chat - Search queries
760759
If you're building a RAG agent, you can also use Cohere's Chat API to get search queries from Command. Specify `search_queries_only=TRUE` in your request.
761760

762761

763-
**Request**
762+
Request:
764763

765764
```json
766765
{
@@ -769,7 +768,7 @@ If you're building a RAG agent, you can also use Cohere's Chat API to get search
769768
}
770769
```
771770

772-
**Response**
771+
Response:
773772

774773
```json
775774
{
@@ -791,7 +790,7 @@ If you're building a RAG agent, you can also use Cohere's Chat API to get search
791790
}
792791
```
793792

794-
#### More inference examples
793+
##### More inference examples
795794

796795
| **Sample Type** | **Sample Notebook** |
797796
|----------------|----------------------------------------|

0 commit comments

Comments
 (0)