azure-search-openai-demo: Invalid AzureCognitiveSearch configuration detected: 403 Client Error: Forbidden for url

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

When deployed to Azure, the example works, but when I tryied to run locally, using the same input variables, I am receiving the following error message "Invalid AzureCognitiveSearch configuration detected: 403 Client Error: Forbidden for url: https://AZURE_SEARCH_SERVICE.search.windows.net/indexes/azureblob-index-v3?api-version=2021-04-30-Preview. Given it works on Azure, the problem is not with my credentials (I used these credentials oustside azure directly on AzureCognitiveSearch SDK and it worked).

Is there any documentation on how to integrate AzureCognitiveSearch with ChatGPT API? I can’t find anything detailing the inputs of the data source entry.

Minimal steps to reproduce

Install the application following the documentation and export the following environment variables:

AZURE_OPENAI_KEY
AZURE_OPENAI_RESOURCE
AZURE_OPENAI_PREVIEW_API_VERSION
AZURE_OPENAI_MODEL
AZURE_OPENAI_MODEL_NAME
AZURE_OPENAI_TEMPERATURE
AZURE_SEARCH_SERVICE
AZURE_SEARCH_INDEX
AZURE_SEARCH_TOP_K
AZURE_SEARCH_CONTENT_COLUMNS
AZURE_SEARCH_TITLE_COLUMN
AZURE_SEARCH_KEY
AZURE_OPENAI_STREAM


AZURE_SEARCH_SERVICE_ENDPOINT
AZURE_SEARCH_INDEX_NAME
AZURE_SEARCH_API_KEY

Any log messages given by the failure

Just the error message:

 "Invalid AzureCognitiveSearch configuration detected: 403 Client Error: Forbidden for url: https://AZURE_SEARCH_SERVICE.search.windows.net/indexes/azureblob-index-v3?api-version=2021-04-30-Preview"
  }

Expected/desired behavior

The API call should succeed, the same as it is on Azure environment

OS and Version?

Linux (Ubuntu 22.04)

azd version?

Runing python directly, no azd installed

Versions

Mention any other details that might be useful


Thanks! We’ll be in touch soon.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 21

Most upvoted comments

Yes, sorry, didn’t update here, but shared the issue on other canal and they updated it 😃 So it’s fixed 😃