Servicio de Azure que se usa para administrar y proteger las claves criptográficas y otros secretos que usan las aplicaciones y los servicios en la nube.
Hello
Direct calls not working
Solved with package.
using OpenAI.Chat;
using Azure.Core;
using Azure.AI.OpenAI;
var endpoint = new Uri("https://av-euwest-aitest.openai.azure.com/");
var model = "gpt-4o-mini";
var deploymentName = "gpt-4o-mini";
var apiKey = "<your-api-key>";
AzureOpenAIClient azureClient = new(
endpoint,
new AzureKeyCredential(apiKey));
ChatClient chatClient = azureClient.GetChatClient(deploymentName);
List<ChatMessage> messages = new List<ChatMessage>()
{
new SystemChatMessage("You are a helpful assistant."),
new UserChatMessage("I am going to Paris, what should I see?"),
};
var response = chatClient.CompleteChat(messages);
System.Console.WriteLine(response.Value.Content[0].Text);
