Skip to content

Commit ad003fc

Browse files
Merge pull request #217580 from dereklegenzoff/main
fixing typo for deployments API and adding types to all code blocks
2 parents e47e3d1 + eaf3a86 commit ad003fc

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

articles/cognitive-services/openai/reference.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The Azure OpenAI service provides two methods for authentication. you can use e
3939

4040
The service APIs are versioned using the ```api-version``` query parameter. All versions follow the YYYY-MM-DD date structure, with a -preview suffix for a preview service. For example:
4141

42-
```
42+
```http
4343
POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/completions?api-version=2022-06-01-preview
4444
```
4545

@@ -50,7 +50,7 @@ With the Completions operation, the model will generate one or more predicted co
5050

5151
**Create a completion**
5252

53-
```
53+
```http
5454
POST https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/completions?api-version={api-version}
5555
```
5656

@@ -120,7 +120,7 @@ Get a vector representation of a given input that can be easily consumed by mach
120120

121121
**Create an embedding**
122122

123-
```
123+
```http
124124
POST https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/embeddings?api-version={api-version}
125125
```
126126

@@ -179,7 +179,7 @@ curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYM
179179
#### List all available models
180180
This API will return the list of all available models in your resource. This includes both 'base models' that are available by default and models you've created from fine-tuning jobs.
181181

182-
```
182+
```http
183183
GET https://{your-resource-name}.openai.azure.com/openai/models?api-version={api-version}
184184
```
185185

@@ -196,7 +196,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/models?api-version={api
196196

197197
#### Example request
198198

199-
```
199+
```console
200200
curl -X GET https://example_resource_name.openai.azure.com/openai/models?api-version=2022-06-01-preview \
201201
-H "api-key: YOUR_API_KEY"
202202
```
@@ -241,7 +241,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/models?api-ver
241241

242242
This API will retrieve information on a specific model
243243

244-
```
244+
```http
245245
GET https://{your-resource-name}.openai.azure.com/openai/models/{model_id}?api-version={api-version}
246246
```
247247

@@ -259,7 +259,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/models/{model_id}?api-v
259259

260260
#### Example request
261261

262-
```
262+
```console
263263
curl -X GET https://example_resource_name.openai.azure.com/openai/models/ada?api-version=2022-06-01-preview \
264264
-H "api-key: YOUR_API_KEY"
265265
```
@@ -291,7 +291,7 @@ You can create customized versions of our models using the fine-tuning APIs. The
291291

292292
This API will list your resource's fine-tuning jobs
293293

294-
```
294+
```http
295295
GET https://{your-resource-name}.openai.azure.com/openai/fine-tunes?api-version={api-version}
296296
```
297297

@@ -403,7 +403,7 @@ curl -X GET https://your_resource_name.openai.azure.com/openai/fine-tunes?api-ve
403403

404404
This API will create a new job to fine-tune a specified model with the specified dataset.
405405

406-
```
406+
```http
407407
POST https://{your-resource-name}.openai.azure.com/openai/fine-tunes?api-version={api-version}
408408
```
409409

@@ -500,7 +500,7 @@ curl https://your-resource-name.openai.azure.com/openai/fine-tunes?api-version=2
500500

501501
This API will retrieve information about a specific fine tuning job
502502

503-
```
503+
```http
504504
GET https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_id}?api-version={api-version}
505505
```
506506

@@ -606,7 +606,7 @@ curl https://example_resource_name.openai.azure.com/openai/fine-tunes/ft-d3f2a65
606606

607607
This API will delete a specific fine tuning job
608608

609-
```
609+
```http
610610
DELETE https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_id}?api-version={api-version}
611611
```
612612

@@ -635,7 +635,7 @@ curl https://example_resource_name.openai.azure.com/openai/fine-tunes/ft-d3f2a65
635635
This API will retrieve the events associated with the specified fine tuning job. To stream events as they become available, use the query parameter “stream” and pass true value (&stream=true)
636636

637637

638-
```
638+
```http
639639
GET https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_id}/events?api-version={api-version}
640640
```
641641

@@ -653,7 +653,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_i
653653
- `2022-06-01-preview`
654654

655655
#### Example request
656-
```
656+
```console
657657
curl -X GET https://your_resource_name.openai.azure.com/openai/fine-tunes/ft-d3f2a65d49d34e74a80f6328ba6d8d08/events?stream=true&api-version=2022-06-01-preview \
658658
-H "api-key: YOUR_API_KEY"
659659
```
@@ -696,7 +696,7 @@ curl -X GET https://your_resource_name.openai.azure.com/openai/fine-tunes/ft-d3f
696696

697697
This API will cancel the specified job
698698

699-
```
699+
```http
700700
POST https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_id}/cancel?api-version={api-version}
701701
```
702702

@@ -712,7 +712,7 @@ POST https://{your-resource-name}.openai.azure.com/openai/fine-tunes/{fine_tune_
712712
- `2022-06-01-preview`
713713

714714
#### Example request
715-
```
715+
```console
716716
curl -X POST https://your_resource_name.openai.azure.com/openai/fine-tunes/ft-d3f2a65d49d34e74a80f6328ba6d8d08/cancel?api-version=2022-06-01-preview \
717717
-H "api-key: YOUR_API_KEY"
718718
```
@@ -768,7 +768,7 @@ curl -X POST https://your_resource_name.openai.azure.com/openai/fine-tunes/ft-d3
768768

769769
This API will list all the Files that have been uploaded to the resource
770770

771-
```
771+
```http
772772
GET https://{your-resource-name}.openai.azure.com/openai/files?api-version={api-version}
773773
```
774774

@@ -785,7 +785,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/files?api-version={api-
785785

786786
#### Example request
787787

788-
```
788+
```console
789789
curl -X GET https://example_resource_name.openai.azure.com/openai/files?api-version=2022-06-01-preview \
790790
-H "api-key: YOUR_API_KEY"
791791
```
@@ -825,7 +825,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/files?api-vers
825825

826826
This API will upload a file that contains the examples used for fine-tuning a model.
827827

828-
```
828+
```http
829829
GET https://{your-resource-name}.openai.azure.com/openai/files?api-version={api-version}
830830
```
831831

@@ -859,7 +859,7 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/files?api-ver
859859

860860
#### Example response
861861

862-
```JSON
862+
```json
863863
{
864864
"bytes": 405898,
865865
"purpose": "fine-tune",
@@ -876,7 +876,7 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/files?api-ver
876876

877877
This API will return information on the specified file
878878

879-
```
879+
```http
880880
GET https://{your-resource-name}.openai.azure.com/openai/files/{file_id}?api-version={api-version}
881881
```
882882

@@ -918,7 +918,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/files/file-6ca
918918

919919
This API will delete the specified file
920920

921-
```
921+
```http
922922
DELETE https://{your-resource-name}.openai.azure.com/openai/files/{file_id}?api-version={api-version}
923923
```
924924

@@ -944,7 +944,7 @@ curl -X DELETE https://example_resource_name.openai.azure.com/openai/files/file-
944944

945945
This API will download the specified file.
946946

947-
```
947+
```http
948948
GET https://{your-resource-name}.openai.azure.com/openai/files/{file_id}/content?api-version={api-version}
949949
```
950950

@@ -961,7 +961,7 @@ GET https://{your-resource-name}.openai.azure.com/openai/files/{file_id}/content
961961
- `2022-06-01-preview`
962962

963963
#### Example request
964-
```
964+
```console
965965
curl -X GET https://example_resource_name.openai.azure.com/openai/files/file-6ca9bd640c8e4eaa9ec922604226ab6c/content?api-version=2022-06-01-preview \
966966
-H "api-key: YOUR_API_KEY"
967967
```
@@ -970,7 +970,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/files/file-6ca
970970

971971
Import files from blob storage or other web locations. We recommend you use this option for importing large files. Large files can become unstable when uploaded through multipart forms because the requests are atomic and can't be retried or resumed.
972972

973-
```
973+
```http
974974
POST https://{your-resource-name}.openai.azure.com/openai/files/import?api-version={api-version}
975975
```
976976

@@ -1008,7 +1008,7 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/files/files/i
10081008

10091009
### Example response
10101010

1011-
```JSON
1011+
```json
10121012
{
10131013
"purpose": "fine-tune",
10141014
"filename": "validationfiletest.jsonl",
@@ -1026,8 +1026,8 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/files/files/i
10261026

10271027
This API will return a list of all the deployments in the resource.
10281028

1029-
```
1030-
POST https://{your-resource-name}.openai.azure.com/openai/deployments?api-version={api-version}
1029+
```http
1030+
GET https://{your-resource-name}.openai.azure.com/openai/deployments?api-version={api-version}
10311031
```
10321032

10331033
**Path parameters**
@@ -1077,7 +1077,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/deployments?ap
10771077

10781078
This API will create a new deployment in the resource. This will enable you to make completions and embeddings calls with the model.
10791079

1080-
```
1080+
```http
10811081
POST https://{your-resource-name}.openai.azure.com/openai/deployments?api-version={api-version}
10821082
```
10831083

@@ -1135,7 +1135,7 @@ curl -X POST https://example_resource_name.openai.azure.com/openai/deployments?a
11351135

11361136
This API will retrieve information about the specified deployment
11371137

1138-
```
1138+
```http
11391139
GET https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment_id}?api-version={api-version}
11401140
```
11411141

@@ -1178,7 +1178,7 @@ curl -X GET https://example_resource_name.openai.azure.com/openai/deployments/{d
11781178

11791179
This API will update an existing deployment. Make sure to set the content-type to `application/merge-patch+json`
11801180

1181-
```
1181+
```http
11821182
PATCH https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment_id}?api-version={api-version}
11831183
```
11841184

@@ -1219,7 +1219,7 @@ curl -X PATCH https://example_resource_name.openai.azure.com/openai/deployments
12191219

12201220
This API will delete the specified deployment
12211221

1222-
```
1222+
```http
12231223
DELETE https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment_id}?api-version={api-version}
12241224
```
12251225

@@ -1237,7 +1237,7 @@ DELETE https://{your-resource-name}.openai.azure.com/openai/deployments/{deploym
12371237

12381238
#### Example request
12391239

1240-
```Console
1240+
```console
12411241
curl -X DELETE https://example_resource_name.openai.azure.com/openai/deployments/{deployment_id}?api-version=2022-06-01-preview \
12421242
-H "api-key: YOUR_API_KEY"
12431243
```

0 commit comments

Comments
 (0)