How to set correct parameters of Azure OpenAI REST API with on your data?

武田 勇 0 Reputation points

I have added my data in my OpenAI playground "add your data", and enabled vector embedding, the search type is "Hybrid + semantic".

I tried to access Azure OpenAI via REST API.

The API URL is

The "dataSources" in the API request is

            "type": "AzureCognitiveSearch",
            "parameters": {
                "endpoint": "",
                "embeddingEndpoint": "",
                "embeddingKey": "my-cognitivesearch-key",
                "key": "my-cognitivesearch-key",
                "indexName": "my-index-name",
                "inScope": "true",
                "roleInformation": "role-description"

The value of cognitive search endpoint and embedding Endpoint is same, the key is also same. (I don't know if the setting is correct)

I can do the chat in playground and get the expected answer in my data.

But when I access the API use the dataSources above, I get a error response of API version:

{'error': {'requestid': 'xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx', 'code': 400, 'message': '(400, \'Server responded with status 400. Error message: {"error":{"code":"","message":"Invalid or missing api-version query string parameter."}}\')'}}

I have set the OpenAI REST API version in the API URL, should I add API version parameter at other places?

Is it possible to use vector search via OpenAI REST API?

If it is yes, how resolve the api-version error above?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
1,023 questions
{count} votes