Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.57k stars 4.83k forks source link

[FEATURE REQ][Azure OpenAI] Support ChatGPT Prompt Structure Builder #34830

Closed Danieladu closed 10 months ago

Danieladu commented 1 year ago

Library name

Azure.AI.OpenAI

Please describe the feature.

As the Azure OpenAI said, https://learn.microsoft.com/en-us/azure/cognitive-services/openai/chatgpt-quickstart?tabs=command-line&pivots=rest-api#understanding-the-prompt-structure, Azure OpenAI now support the GPT 3.5-turbe model and ChatGPT API. It seems that the CHATGPT API is same with other completions, so if the SDK could add some utils to help build the ChatGpt prompt structure, It would be awesome.

trrwilson commented 1 year ago

Hello, @Danieladu! Thanks for getting in touch about Azure OpenAI.

Today, the specifics of what's supported for Chat between public OpenAI and Azure OpenAI are a little tricky:

So you can use the new gpt-3.5-model today with Azure OpenAI (including via the preview .NET SDK) but not the role-assigned prompt structure (.NET or not). If and when Azure OpenAI supports the new Chat message format, the .NET SDK will adopt support for it.

But aside from that, as a non-ML-science-specialist engineer myself, I very much agree that having helpful utilities to build and maintain prompt state in a ChatGPT-style experience is something we need a lot more of. Fortunately, that's an area with an enormous amount of effort going into it (across Azure and across the industry/community as a whole), and we'll doubtlessly see a lot of movement soon!