Skip to content

Commit 92ebdb6

Browse files
committed
update
1 parent d530600 commit 92ebdb6

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

articles/ai-services/openai/how-to/stored-completions.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions?api-ver
381381
{
382382
"data": [
383383
{
384-
"id": "chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh",
384+
"id": "chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u",
385385
"choices": [
386386
{
387387
"finish_reason": null,
@@ -409,7 +409,7 @@ curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions?api-ver
409409
"completion_tokens_details": null,
410410
"prompt_tokens_details": null
411411
},
412-
"request_id": "cd0334e8-7541-4ec2-bab7-49ae8cf3c87a",
412+
"request_id": "0000aaaa-11bb-cccc-dd22-eeeeee333333",
413413
"seed": -430976584126747957,
414414
"top_p": 1,
415415
"temperature": 1,
@@ -424,8 +424,8 @@ curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions?api-ver
424424
"has_more": false,
425425
"object": "list",
426426
"total": 1,
427-
"first_id": "chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh",
428-
"last_id": "chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh"
427+
"first_id": "chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u",
428+
"last_id": "chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u"
429429
}
430430
```
431431

@@ -451,7 +451,7 @@ client = AzureOpenAI(
451451
api_version="2025-02-01-preview"
452452
)
453453

454-
response = client.chat.completions.retrieve("chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh")
454+
response = client.chat.completions.retrieve("chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u")
455455

456456
print(response.model_dump_json(indent=2))
457457
```
@@ -467,7 +467,7 @@ client = AzureOpenAI(
467467
api_version="2025-02-01-preview"
468468
)
469469

470-
response = client.chat.completions.retrieve("chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh")
470+
response = client.chat.completions.retrieve("chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u")
471471

472472
print(response.model_dump_json(indent=2))
473473
```
@@ -477,15 +477,15 @@ print(response.model_dump_json(indent=2))
477477
### Microsoft Entra ID
478478

479479
```bash
480-
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh?api-version=2025-02-01-preview \
480+
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u?api-version=2025-02-01-preview \
481481
-H "Content-Type: application/json" \
482482
-H "Authorization: Bearer $AZURE_OPENAI_AUTH_TOKEN" \
483483
```
484484

485485
### API Key
486486

487487
```bash
488-
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh?api-version=2025-02-01-preview \
488+
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u?api-version=2025-02-01-preview \
489489
-H "Content-Type: application/json" \
490490
-H "api-key: $AZURE_OPENAI_API_KEY" \
491491
```
@@ -494,7 +494,7 @@ curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmp
494494

495495
```json
496496
{
497-
"id": "chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh",
497+
"id": "chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u",
498498
"choices": [
499499
{
500500
"finish_reason": null,
@@ -522,7 +522,7 @@ curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmp
522522
"completion_tokens_details": null,
523523
"prompt_tokens_details": null
524524
},
525-
"request_id": "cd0334e8-7541-4ec2-bab7-49ae8cf3c87a",
525+
"request_id": "0000aaaa-11bb-cccc-dd22-eeeeee333333",
526526
"seed": -430976584126747957,
527527
"top_p": 1,
528528
"temperature": 1,
@@ -561,7 +561,7 @@ client = AzureOpenAI(
561561
api_version="2025-02-01-preview"
562562
)
563563

564-
response = client.chat.completions.messages.list("chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh", limit=2)
564+
response = client.chat.completions.messages.list("chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", limit=2)
565565

566566
print(response.model_dump_json(indent=2))
567567
```
@@ -577,7 +577,7 @@ client = AzureOpenAI(
577577
api_version="2025-02-01-preview"
578578
)
579579

580-
response = client.chat.completions.messages.list("chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh", limit=2)
580+
response = client.chat.completions.messages.list("chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", limit=2)
581581

582582
print(response.model_dump_json(indent=2))
583583
```
@@ -587,15 +587,15 @@ print(response.model_dump_json(indent=2))
587587
### Microsoft Entra ID
588588

589589
```bash
590-
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh/messages?api-version=2025-02-01-preview \
590+
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u/messages?api-version=2025-02-01-preview \
591591
-H "Content-Type: application/json" \
592592
-H "Authorization: Bearer $AZURE_OPENAI_AUTH_TOKEN" \
593593
```
594594

595595
### API Key
596596

597597
```bash
598-
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh/messages?api-version=2025-02-01-preview \
598+
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u/messages?api-version=2025-02-01-preview \
599599
-H "Content-Type: application/json" \
600600
-H "api-key: $AZURE_OPENAI_API_KEY" \
601601
```
@@ -612,7 +612,7 @@ curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmp
612612
"audio": null,
613613
"function_call": null,
614614
"tool_calls": null,
615-
"id": "chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh-0"
615+
"id": "chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u-0"
616616
},
617617
{
618618
"content": "Ensemble methods combine multiple machine learning models to create a more robust and accurate predictor. Common techniques include bagging (training models on random subsets of data), boosting (sequentially training models to correct previous errors), and stacking (using a meta-model to combine base model predictions). Random Forests, a popular bagging method, create multiple decision trees using random feature subsets. Gradient Boosting builds trees sequentially, with each tree focusing on correcting the errors of previous trees. These methods often achieve better performance than single models by reducing overfitting and variance while capturing different aspects of the data.",
@@ -621,14 +621,14 @@ curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmp
621621
"audio": null,
622622
"function_call": null,
623623
"tool_calls": null,
624-
"id": "chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh-1"
624+
"id": "chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u-1"
625625
}
626626
],
627627
"has_more": false,
628628
"object": "list",
629629
"total": 2,
630-
"first_id": "chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh-0",
631-
"last_id": "chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh-1"
630+
"first_id": "chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u-0",
631+
"last_id": "chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u-1"
632632
}
633633
```
634634

@@ -655,7 +655,7 @@ client = AzureOpenAI(
655655
)
656656

657657
response = client.chat.completions.update(
658-
"chatcmpl-B4g4TYatiSBUZbl5Uv938zXpYBqKL",
658+
"chatcmpl-C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w",
659659
metadata={"fizz": "buzz"}
660660
)
661661

@@ -674,7 +674,7 @@ client = AzureOpenAI(
674674
)
675675

676676
response = client.chat.completions.update(
677-
"chatcmpl-B4g4TYatiSBUZbl5Uv938zXpYBqKL",
677+
"chatcmpl-C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w",
678678
metadata={"fizz": "buzz"}
679679
)
680680

@@ -686,7 +686,7 @@ print(response.model_dump_json(indent=2))
686686
### Microsoft Entra ID
687687

688688
```bash
689-
curl -X https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh?api-version=2025-02-01-preview \
689+
curl -X https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u?api-version=2025-02-01-preview \
690690
-H "Content-Type: application/json" \
691691
-H "Authorization: Bearer $AZURE_OPENAI_AUTH_TOKEN"
692692
-d '{
@@ -699,7 +699,7 @@ curl -X https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chat
699699
### API Key
700700

701701
```bash
702-
curl -X https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh?api-version=2025-02-01-preview \
702+
curl -X https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u?api-version=2025-02-01-preview \
703703
-H "Content-Type: application/json" \
704704
-H "api-key: $AZURE_OPENAI_API_KEY"
705705
-d '{
@@ -712,7 +712,7 @@ curl -X https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chat
712712
# [Output](#tab/output)
713713

714714
```json
715-
"id": "chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh",
715+
"id": "chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u",
716716
"choices": [
717717
{
718718
"finish_reason": null,
@@ -740,7 +740,7 @@ curl -X https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chat
740740
"completion_tokens_details": null,
741741
"prompt_tokens_details": null
742742
},
743-
"request_id": "cd0334e8-7541-4ec2-bab7-49ae8cf3c87a",
743+
"request_id": "0000aaaa-11bb-cccc-dd22-eeeeee333333",
744744
"seed": -430976584126747957,
745745
"top_p": 1,
746746
"temperature": 1,
@@ -778,7 +778,7 @@ client = AzureOpenAI(
778778
api_version="2025-02-01-preview"
779779
)
780780

781-
response = client.chat.completions.delete("chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh")
781+
response = client.chat.completions.delete("chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u")
782782

783783
print(response.model_dump_json(indent=2))
784784

@@ -795,31 +795,31 @@ client = AzureOpenAI(
795795
api_version="2025-02-01-preview"
796796
)
797797

798-
response = client.chat.completions.delete("chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh")
798+
response = client.chat.completions.delete("chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u")
799799

800800
print(response.model_dump_json(indent=2))
801801
```
802802

803803
# [REST API](#tab/rest-api)
804804

805805
```bash
806-
curl -X DELETE -D - https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh?api-version=2025-02-01-preview \
806+
curl -X DELETE -D - https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u?api-version=2025-02-01-preview \
807807
-H "Content-Type: application/json" \
808808
-H "Authorization: Bearer $AZURE_OPENAI_AUTH_TOKEN"
809809
```
810810

811811
### API Key
812812

813813
```bash
814-
curl -X DELETE -D - https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-B4eEKDztBNE2XH9bWB8AMQh2hO3Sh?api-version=2025-02-01-preview \
814+
curl -X DELETE -D - https://YOUR-RESOURCE-NAME.openai.azure.com/openai/chat/completions/chatcmpl-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u?api-version=2025-02-01-preview \
815815
-H "Content-Type: application/json" \
816816
-H "api-key: $AZURE_OPENAI_API_KEY"
817817
```
818818

819819
# [Output](#tab/output)
820820

821821
```json
822-
"id"• "chatcmp1-B4eEKDztBNE2XH9bWB8AMQh2h03Sh",
822+
"id"• "chatcmp1-A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u",
823823
"deleted": true,
824824
"object": "chat. completion. deleted"
825825
```

0 commit comments

Comments
 (0)