|
11 | 11 |
|
12 | 12 | /*
|
13 | 13 | Get the embeddings for the input text by calling the OpenAI API
|
| 14 | + Note: <deployment-id> needs to be replaced with the deployment name of your embedding model in Azure OpenAI |
14 | 15 | */
|
15 | 16 | declare @inputText nvarchar(max) = 'the foundation series by isaac asimov';
|
16 | 17 | declare @retval int, @response nvarchar(max);
|
17 | 18 | declare @payload nvarchar(max) = json_object('input': @inputText);
|
18 | 19 | exec @retval = sp_invoke_external_rest_endpoint
|
19 | | - @url = 'https://<your-app-name>.openai.azure.com/openai/deployments/<deployment-id>?api-version=2023年03月15日-preview', |
| 20 | + @url = 'https://<your-app-name>.openai.azure.com/openai/deployments/<deployment-id>/embeddings?api-version=2023年03月15日-preview', |
20 | 21 | @method = 'POST',
|
21 | 22 | @credential = [https://<your-app-name>.openai.azure.com],
|
22 | 23 | @payload = @payload,
|
|
0 commit comments