[ASSISTANT]: The image depicts a dramatic scene of a dragon with red scales and glowing eyes emerging from the clouds. Sunlight beams illuminate the creature, highlighting its sharp features and wings. The setting gives a mystical and powerful atmosphere.
Last active
September 22, 2024 08:55
-
-
Save vman/627f07413cf4d3997236bfb61a946e56 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var chatClient = openAiClient.GetChatClient(deploymentName); | |
| string dataURI = "data:image/jpeg;base64,<long-data-uri-of-image>"; | |
| //convert data uri to binary data | |
| byte[] binaryData = Convert.FromBase64String(dataURI.Split(',')[1]); | |
| List<ChatMessage> messages = [ | |
| new UserChatMessage( | |
| ChatMessageContentPart.CreateImageMessageContentPart(BinaryData.FromBytes(binaryData), "image/jpeg", | |
| ImageChatMessageContentPartDetail.High) | |
| ), | |
| new UserChatMessage("What is in this image?") | |
| ]; | |
| ChatCompletion chatCompletion = chatClient.CompleteChat(messages); | |
| Console.WriteLine($"[ASSISTANT]: {chatCompletion}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment