microsoft / sample-app-aoai-chatGPT

Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.
MIT License
1.62k stars 2.53k forks source link

Azure Open AI - Create an Open AI, Cognitive Search Resource and datasource pointing to a custom blob storage using C# (Use your own data) #156

Open miguelisidoro opened 1 year ago

miguelisidoro commented 1 year ago

Hello,

I want to programmatically create using C#:

All of these must create resources in a specific resource group that I will specify in the code.

Where is the documentation that I can use to achieve this?

I've looked at https://learn.microsoft.com/en-us/dotnet/api/overview/azure/ai.openai-readme?view=azure-dotnet-preview and https://learn.microsoft.com/en-us/dotnet/api/azure.ai.openai.azureopenaimodelfactory?view=azure-dotnet-preview but none of these were able to point me into the right direction.

Another question, how can I make sure that the data source (add your own data in preview) is persisted? From the tests I made using the Portal, the data source disappears after closing the browser session.

Thanks

pamelafox commented 1 year ago

@miguelisidoro Since your goal is to use C#, I suggest starting from https://github.com/Azure-Samples/azure-search-openai-demo-csharp/ and asking in that issue tracker for any aspect that's missing.

miguelisidoro commented 1 year ago

@pamelafox thanks for sharing. Althoug useful, I don't see any option to programmatically create using C#:

The frontend will be Angular.

Any other ideias that can help?

davidm00 commented 1 year ago

Hi @miguelisidoro , I believe that you would benefit from using the API directly to achieve this. There is more information about this here: https://learn.microsoft.com/en-us/azure/ai-services/openai/use-your-data-quickstart?tabs=command-line&pivots=programming-language-csharp