We're working on a migration guide from 1.0.0-beta* to 2.0.0-beta* and fully empathize with the hassle of needing to update code; we're confident that the new alignment with OpenAI and updated usability approaches will be substantial net positives, but that doesn't reduce the importance of minimizing how long and how frustrating it is to reach that net positive state.
Data_Juggler, the code you shared can be rewritten using 2.0.0-beta* as:
using Azure.AI.OpenAI;
using OpenAI.Chat;
AzureOpenAIClient azureClient = new();
ChatClient client = azureClient.GetChatClient(
deploymentName: "gpt-35-turbo");
const string textFromUser = "Hello, assistant!"; // PromptTextBox.Text
ChatCompletion completion = client.CompleteChat(
[
new SystemChatMessage("You are an AI assistant.")
{
ParticipantName = "Steve",
},
new UserChatMessage(textFromUser),
]);
Console.WriteLine(completion.Content[0].Text);
You can find more samples and walkthroughs of the API on both OpenAI's GitHub repository and the Azure.AI.OpenAI project: