Can't "Turn on CORS" from adding data source dialog in Azure OpenAI Studio

Braydon 15 Reputation points
2023-07-13T10:57:31.4366667+00:00

Hoping the community can help. In Azure OpenAI Studio I am attempting to set up a data source. I have my storage resource set up, but when I attempt to add it, I can't click the option to turn on CORS. I've even gone into the resource and added the wildcards and allowed the methods, but it still doesn't work. And I've gone through the AI Gen support recommendation (and confirmed there is no slash at the end of the url in the CORS list). I am the admin for my account.

Thank you!

Screenshot 2023-07-12 at 12.48.36 PM

Screenshot 2023-07-12 at 12.48.56 PM

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

3 answers

Sort by: Most helpful
  1. Q&A Assist
    2023-07-13T10:57:31.4366667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Based on the context provided, the user is having trouble turning on CORS while adding a data source in Azure OpenAI Studio. The user has already set up the storage resource and attempted to turn on CORS, but the option is disabled. As an admin for the account, the user needs to enable CORS to allow cross-origin requests from their Azure OpenAI Studio application.

    To enable CORS for a storage account, follow these steps:

    1. Go to the Azure portal, open your storage account, and select Settings.
    2. Under "Resource sharing (CORS)", select the "+ Add" button.
    3. In the "Allowed origins" field, enter the origin for your OpenAI Studio application. This may be https://*.openai.azure.com or https://<your-app-name>.openai.azure.com.
    4. In the "Allowed methods" field, select "GET", "HEAD", "OPTIONS", "PUT", or "POST" as required by your application.
    5. In the "Allowed headers" field, enter any headers that your application needs to send with the request. It is recommended to use "*" for all headers, or to only include the headers necessary for your application.
    6. In the "Exposed headers" field, enter any headers that your application expects to receive in the response. Again, it is recommended to use "*" for all headers, or to only include the headers necessary for your application.
    7. In the "Max age" field, enter the number of seconds that the client should cache preflight requests. Typically, this value is set to 3600 or higher.

    Note: Wildcards in the domain name, such as https://*.openai.azure.com, are currently not supported by Azure Cosmos DB.

    After enabling CORS, you can go back to Azure OpenAI Studio and try adding the data source again. The option to turn on CORS should now be enabled, allowing you to select the storage account as a data source. If you are still having issues, ensure that the correct security settings and credentials are in place to access the storage account.

    References:

    3 people found this answer helpful.
    0 comments No comments

  2. 袁军(KevinYuan) 0 Reputation points
    2023-07-26T07:48:24.1+00:00

    +1

    Same issue

    0 comments No comments

  3. Tyrone Vriesde 0 Reputation points
    2023-09-04T07:22:36.6333333+00:00

    Hi there,

    I would advise you to select Azure Blob Storage as an option. No need for CORS configuration then.

    Make sure you:

    • Create a container in your storage account
    • Create an Azure Cognitive Search instance with the SKU - basic or higher to get started.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.