Created
June 10, 2024 06:54
-
-
Save Adolfi/e11ba7e49d753b6553ccc756d155a4f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Azure; | |
using Azure.AI.OpenAI; | |
using OpenAI.Chat; | |
AzureOpenAIClient azureClient = new( | |
new Uri("YOUR_API_ENDPOINT"), | |
new AzureKeyCredential("YOUR_API_KEY")); | |
ChatCompletion completion = azureClient.GetChatClient("YOUR_DEPLOYMENT_NAME").CompleteChat([ | |
new UserChatMessage("What is the capital of France?"), | |
]); | |
Console.WriteLine(completion.Content[0].Text); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment