Cognitive Search for Azure OpenAI does not work for custom app developed using ASP.net C# MVC code

Neeraj Kumar 51 Reputation points
2023-07-10T11:59:05.97+00:00

Hello Experts,

I have developed an app using ASP.Net C# MVC web app in which I have used Azure OpenAI ChatCompletions. This web app has been deployed as an Azure App Service WebApp.

I have the below 2 questions:

  1. When I try to create a custom data source within Azure OpenAI studio and deploy the web app, it does not recognize the existing web app that I created. On the other hand, it only recognizes the app created from with the AI studio. Why?
  2. I have used the Azure OpenAI endpoint and Key within my code and the code runs, but it never brings the results back from the custom data source that I created, i.e., it never brings the data from the cognitive search that I have configured. Why? Is there a setting missing in the code. Below is the sample code:

I am trying to choose the language to ASP.Net C# for the below code block, but it is only taking it as PowerShell. Sorry about that.

public async Task
Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
994 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,756 questions
{count} votes

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.