Skip to content

Commit a43d6bb

Browse files
Merge pull request #5968 from PatrickFarley/minor-updates
fix qs
2 parents 6c08062 + 812b96b commit a43d6bb

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

articles/ai-foundry/openai/includes/gpt-v-dotnet.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,14 @@ To run the quickstart, follow these steps:
100100
101101
var imageUrl = "YOUR_IMAGE_URL";
102102
103+
var textPart = ChatMessageContentPart.CreateTextPart("Describe this picture:");
104+
var imgPart = ChatMessageContentPart.CreateImagePart(imageUrl);
105+
103106
var chatMessages = new List<ChatMessage>
104107
{
105108
new SystemChatMessage("You are a helpful assistant."),
106-
new UserChatMessage($"Describe this picture: {imageUrl}")
109+
new UserChatMessage(textPart, imgPart)
110+
107111
};
108112
109113
ChatCompletion chatCompletion = await chatClient.CompleteChatAsync(chatMessages);

articles/ai-services/computer-vision/includes/how-to-guides/analyze-image-40-csharp.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ manager: nitinme
44
ms.service: ai-services
55
ms.subservice: computer-vision
66
ms.topic: include
7-
ms.date: 08/01/2023
7+
ms.date: 07/10/2025
88
ms.collection: "ce-skilling-fresh-tier2, ce-skilling-ai-copilot"
99
ms.update-cycle: 365-days
1010
ms.author: pafarley
@@ -17,6 +17,13 @@ This guide assumes you've followed the steps mentioned in the [quickstart](/azur
1717
* You have <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision" title="Created a Computer Vision resource" target="_blank">created a Computer Vision resource </a> and obtained a key and endpoint URL.
1818
* You have the appropriate SDK package installed and you have a running [quickstart](/azure/ai-services/computer-vision/quickstarts-sdk/image-analysis-client-library-40) application. You can modify this quickstart application based on code examples here.
1919

20+
## Add import statements
21+
22+
Make sure your code file has the following statements:
23+
24+
[!Code-csharp[](~/cognitive-services-quickstart-code/dotnet/ComputerVision/4-0/image-analysis-how-to/Program.cs?name=snippet_imports)]
25+
26+
2027
## Create and authenticate the client
2128

2229
To authenticate against the Image Analysis service, you need a Computer Vision key and endpoint URL. This guide assumes that you've defined the environment variables `VISION_KEY` and `VISION_ENDPOINT` with your key and endpoint.

0 commit comments

Comments
 (0)