Skip to content

Commit 7ff0036

Browse files
Merge pull request #2238 from aahill/oyd-qs
updating rest api
2 parents 8bae9c8 + adb0064 commit 7ff0036

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

articles/ai-services/openai/includes/use-your-data-rest.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: aahill
55
ms.author: aahi
66
ms.service: azure-ai-openai
77
ms.topic: include
8-
ms.date: 03/07/2024
8+
ms.date: 01/10/2025
99
---
1010

1111
[!INCLUDE [Set up required variables](./use-your-data-common-variables.md)]
@@ -20,7 +20,7 @@ To trigger a response from the model, you should end with a user message indicat
2020
> There are several parameters you can use to change the model's response, such as `temperature` or `top_p`. See the [reference documentation](../reference.md#completions-extensions) for more information.
2121
2222
```bash
23-
curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYMENT_ID/chat/completions?api-version=2024-02-15-preview \
23+
curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYMENT_ID/chat/completions?api-version=2024-10-21 \
2424
-H "Content-Type: application/json" \
2525
-H "api-key: $AZURE_OPENAI_API_KEY" \
2626
-d \
@@ -31,8 +31,11 @@ curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYME
3131
"type": "azure_search",
3232
"parameters": {
3333
"endpoint": "'$AZURE_AI_SEARCH_ENDPOINT'",
34-
"key": "'$AZURE_AI_SEARCH_API_KEY'",
35-
"index_name": "'$AZURE_AI_SEARCH_INDEX'"
34+
"index_name": "'$AZURE_AI_SEARCH_INDEX'",
35+
"authentication": {
36+
"type": "api_key",
37+
"key": "'$AZURE_AI_SEARCH_API_KEY'"
38+
}
3639
}
3740
}
3841
],
@@ -81,7 +84,8 @@ curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYME
8184
"prompt_tokens": 3779,
8285
"completion_tokens": 105,
8386
"total_tokens": 3884
84-
}
87+
},
88+
"system_fingerprint": "fp_65792305e4"
8589
}
8690
```
8791

0 commit comments

Comments
 (0)