Skip to content

Commit f9c21ea

Browse files
committed
cspell tidying and temp snippet tag collision workaround
1 parent e0d0002 commit f9c21ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+365
-361
lines changed

.vscode/cspell.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@
220220
"azureai",
221221
"bleu",
222222
"gleu",
223+
"includable",
224+
"inpaint",
225+
"inpainting",
226+
"logprobs",
223227
"ubinary"
224228
]
225229
},

sdk/ai/Azure.AI.Agents/README.md

Lines changed: 38 additions & 38 deletions
Large diffs are not rendered by default.

sdk/ai/Azure.AI.Agents/samples/Sample10_ComputerUse.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To enable your Agent to Computer Use tool, you need to use `ComputerTool` while creating `PromptAgentDefinition`.
44
1. First, we need to create an Agent client and read the environment variables, which will be used in the next steps.
55

6-
```C# Snippet:Sample_CreateAgentClient_ComputerUse
6+
```C# Snippet:Sample_CreateAgentClient_ComputerUse_2
77
var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT");
88
var modelDeploymentName = System.Environment.GetEnvironmentVariable("COMPUTER_USE_DEPLOYMENT_NAME");
99
AgentClient client = new(endpoint: new Uri(projectEndpoint), tokenProvider: new DefaultAzureCredential());
@@ -13,7 +13,7 @@ OpenAIClient openAIClient = client.GetOpenAIClient();
1313
2. To use the tool, we need to read image files using `ReadImageFile` method.
1414

1515
Synchronous sample:
16-
```C# Snippet:Sample_ReadImageFile_ComputerUse
16+
```C# Snippet:Sample_ReadImageFile_ComputerUse_2
1717
private static BinaryData ReadImageFile(string name, [CallerFilePath] string pth = "")
1818
{
1919
var dirName = Path.GetDirectoryName(pth) ?? "";
@@ -23,7 +23,7 @@ private static BinaryData ReadImageFile(string name, [CallerFilePath] string pth
2323

2424
3. In this example we will read in three toy schreenshots and place them into dictionary.
2525

26-
```C# Snippet:Sample_ReadImageFilesToDictionaries_ComputerUse
26+
```C# Snippet:Sample_ReadImageFilesToDictionaries_ComputerUse_2
2727
Dictionary<string, BinaryData> screenshots = new() {
2828
{ "browser_search", ReadImageFile("Assets/cua_browser_search.png")},
2929
{ "search_typed", ReadImageFile("Assets/cua_search_typed.png")},
@@ -34,7 +34,7 @@ Dictionary<string, BinaryData> screenshots = new() {
3434
4. Create a `PromptAgentDefinition` with `ComputerTool`.
3535

3636
Synchronous sample:
37-
```C# Snippet:Sample_CreateAgent_ComputerUse_Sync
37+
```C# Snippet:Sample_CreateAgent_ComputerUse_Sync_2
3838
PromptAgentDefinition agentDefinition = new(model: modelDeploymentName)
3939
{
4040
Instructions = "You are a computer automation assistant.\n\n" +
@@ -54,7 +54,7 @@ AgentVersion agentVersion = client.CreateAgentVersion(
5454
```
5555

5656
Asynchronous sample:
57-
```C# Snippet:Sample_CreateAgent_ComputerUse_Async
57+
```C# Snippet:Sample_CreateAgent_ComputerUse_Async_2
5858
PromptAgentDefinition agentDefinition = new(model: modelDeploymentName)
5959
{
6060
Instructions = "You are a computer automation assistant.\n\n" +
@@ -75,7 +75,7 @@ AgentVersion agentVersion = await client.CreateAgentVersionAsync(
7575

7676
4. Create a helper method to parse the ComputerTool outputs and to respond to Agents queries with new screenshots. Please note that throughout this sample we set the media type for image. Agents support `image/jpeg`, `image/png`, `image/gif` and `image/webp` media types.
7777

78-
```C# Snippet:Sample_ProcessComputerUseCall_ComputerUse
78+
```C# Snippet:Sample_ProcessComputerUseCall_ComputerUse_2
7979
private static string ProcessComputerUseCall(ComputerCallResponseItem item, string oldScreenshot)
8080
{
8181
string currentScreenshot = "browser_search";
@@ -141,7 +141,7 @@ private static string ProcessComputerUseCall(ComputerCallResponseItem item, stri
141141
5. For brevity create the methods to wait for response to be returned.
142142

143143
Synchronous sample:
144-
```C# Snippet:Sample_WaitForResponse_ComputerUse_Sync
144+
```C# Snippet:Sample_WaitForResponse_ComputerUse_Sync_2
145145
public static OpenAIResponse CreateAndWaitForResponse(OpenAIResponseClient responseClient, IEnumerable<ResponseItem> items, ResponseCreationOptions options)
146146
{
147147
OpenAIResponse response = responseClient.CreateResponse(
@@ -158,7 +158,7 @@ public static OpenAIResponse CreateAndWaitForResponse(OpenAIResponseClient respo
158158
```
159159

160160
Asynchronous sample:
161-
```C# Snippet:Sample_WaitForResponse_ComputerUse_Async
161+
```C# Snippet:Sample_WaitForResponse_ComputerUse_Async_2
162162
public static async Task<OpenAIResponse> CreateAndWaitForResponseAsync(OpenAIResponseClient responseClient, IEnumerable<ResponseItem> items, ResponseCreationOptions options)
163163
{
164164
OpenAIResponse response = await responseClient.CreateResponseAsync(
@@ -177,7 +177,7 @@ public static async Task<OpenAIResponse> CreateAndWaitForResponseAsync(OpenAIRes
177177
6. Create an `OpenAIResponse` using `ResponseItem`, containing two `ResponseContentPart`: one with the image and another with the text. In the loop we will request Agent while it is continuing to browse web. Finally, print the tool output message.
178178

179179
Synchronous sample:
180-
```C# Snippet:Sample_CreateResponse_ComputerUse_Sync
180+
```C# Snippet:Sample_CreateResponse_ComputerUse_Sync_2
181181
OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(modelDeploymentName);
182182
ResponseCreationOptions responseOptions = new();
183183
responseOptions.SetAgentReference(new AgentReference(name: agentVersion.Name));
@@ -218,7 +218,7 @@ Console.WriteLine(response.GetOutputText());
218218
```
219219

220220
Asynchronous sample:
221-
```C# Snippet:Sample_CreateResponse_ComputerUse_Async
221+
```C# Snippet:Sample_CreateResponse_ComputerUse_Async_2
222222
OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(modelDeploymentName);
223223
ResponseCreationOptions responseOptions = new();
224224
responseOptions.SetAgentReference(new AgentReference(name: agentVersion.Name));
@@ -262,11 +262,11 @@ Console.WriteLine(response.GetOutputText());
262262
7. Clean up resources by deleting Agent and uploaded files.
263263

264264
Synchronous sample:
265-
```C# Snippet:Sample_Cleanup_ComputerUse_Sync
265+
```C# Snippet:Sample_Cleanup_ComputerUse_Sync_2
266266
client.DeleteAgentVersion(agentName: agentVersion.Name, agentVersion: agentVersion.Version);
267267
```
268268

269269
Asynchronous sample:
270-
```C# Snippet:Sample_Cleanup_ComputerUse_Async
270+
```C# Snippet:Sample_Cleanup_ComputerUse_Async_2
271271
await client.DeleteAgentVersionAsync(agentName: agentVersion.Name, agentVersion: agentVersion.Version);
272272
```

sdk/ai/Azure.AI.Agents/samples/Sample11_FileSearch_Streaming.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In this example we will create the local file, upload it to Azure and will use i
44

55
1. First, we need to create agent client and read the environment variables, which will be used in the next steps.
66

7-
```C# Snippet:Sample_CreateAgentClient_FileSearch_Streaming
7+
```C# Snippet:Sample_CreateAgentClient_FileSearch_Streaming_2
88
var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT");
99
var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME");
1010
AgentClient client = new(endpoint: new Uri(projectEndpoint), tokenProvider: new DefaultAzureCredential());
@@ -14,7 +14,7 @@ OpenAIClient openAIClient = client.GetOpenAIClient();
1414
2. We will create a toy example file and upload it using OpenAI mechanism.
1515

1616
Synchronous sample:
17-
```C# Snippet:Sample_UploadFile_FileSearch_Streaming_Sync
17+
```C# Snippet:Sample_UploadFile_FileSearch_Streaming_Sync_2
1818
string filePath = "sample_file_for_upload.txt";
1919
File.WriteAllText(
2020
path: filePath,
@@ -25,7 +25,7 @@ File.Delete(filePath);
2525
```
2626

2727
Asynchronous sample:
28-
```C# Snippet:Sample_UploadFile_FileSearch_Streaming_Async
28+
```C# Snippet:Sample_UploadFile_FileSearch_Streaming_Async_2
2929
string filePath = "sample_file_for_upload.txt";
3030
File.WriteAllText(
3131
path: filePath,
@@ -38,7 +38,7 @@ File.Delete(filePath);
3838
3. Create the `VectorStore` and provide it with uploaded file ID.
3939

4040
Synchronous sample:
41-
```C# Snippet:Sample_CreateVectorStore_FileSearch_Streaming_Sync
41+
```C# Snippet:Sample_CreateVectorStore_FileSearch_Streaming_Sync_2
4242
VectorStoreClient vctStoreClient = openAIClient.GetVectorStoreClient();
4343
VectorStoreCreationOptions options = new()
4444
{
@@ -49,7 +49,7 @@ VectorStore vectorStore = vctStoreClient.CreateVectorStore(options);
4949
```
5050

5151
Asynchronous sample:
52-
```C# Snippet:Sample_CreateVectorStore_FileSearch_Streaming_Async
52+
```C# Snippet:Sample_CreateVectorStore_FileSearch_Streaming_Async_2
5353
VectorStoreClient vctStoreClient = openAIClient.GetVectorStoreClient();
5454
VectorStoreCreationOptions options = new()
5555
{
@@ -62,7 +62,7 @@ VectorStore vectorStore = await vctStoreClient.CreateVectorStoreAsync(options);
6262
2. Now we can create an agent capable of using File search.
6363

6464
Synchronous sample:
65-
```C# Snippet:Sample_CreateAgent_FileSearch_Streaming_Sync
65+
```C# Snippet:Sample_CreateAgent_FileSearch_Streaming_Sync_2
6666
PromptAgentDefinition agentDefinition = new(model: modelDeploymentName)
6767
{
6868
Instructions = "You are a helpful agent that can help fetch data from files you know about.",
@@ -75,7 +75,7 @@ AgentVersion agentVersion = client.CreateAgentVersion(
7575
```
7676

7777
Asynchronous sample:
78-
```C# Snippet:Sample_CreateAgent_FileSearch_Streaming_Async
78+
```C# Snippet:Sample_CreateAgent_FileSearch_Streaming_Async_2
7979
PromptAgentDefinition agentDefinition = new(model: modelDeploymentName)
8080
{
8181
Instructions = "You are a helpful agent that can help fetch data from files you know about.",
@@ -90,7 +90,7 @@ AgentVersion agentVersion = await client.CreateAgentVersionAsync(
9090
3. In this example we will ask a question to the file contents.
9191

9292
Synchronous sample:
93-
```C# Snippet:Sample_CreateResponse_FileSearch_Streaming_Sync
93+
```C# Snippet:Sample_CreateResponse_FileSearch_Streaming_Sync_2
9494
OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(modelDeploymentName);
9595
ResponseCreationOptions responseOptions = new();
9696
ConversationClient conversationClient = client.GetConversationClient();
@@ -102,7 +102,7 @@ ResponseItem request = ResponseItem.CreateUserMessageItem("Can you give me the d
102102
```
103103

104104
Asynchronous sample:
105-
```C# Snippet:Sample_CreateResponse_FileSearch_Streaming_Async
105+
```C# Snippet:Sample_CreateResponse_FileSearch_Streaming_Async_2
106106
OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(modelDeploymentName);
107107
ResponseCreationOptions responseOptions = new();
108108
ConversationClient conversationClient = client.GetConversationClient();
@@ -115,7 +115,7 @@ ResponseItem request = ResponseItem.CreateUserMessageItem("Can you give me the d
115115

116116
4. To format streaming response output we will create a helper method `ParseResponse`. If the stream ends up in error state, it will throw an error.
117117

118-
```C# Snippet:Sample_ParseResponse_FileSearch_Streaming
118+
```C# Snippet:Sample_ParseResponse_FileSearch_Streaming_2
119119
private static void ParseResponse(StreamingResponseUpdate streamResponse)
120120
{
121121
if (streamResponse is StreamingResponseCreatedUpdate createUpdate)
@@ -158,15 +158,15 @@ private static void ParseResponse(StreamingResponseUpdate streamResponse)
158158
5. Wait for the stream to complete.
159159

160160
Synchronous sample:
161-
```C# Snippet:Sample_StreamingResponse_FileSearch_Streaming_Sync
161+
```C# Snippet:Sample_StreamingResponse_FileSearch_Streaming_Sync_2
162162
foreach (StreamingResponseUpdate streamResponse in responseClient.CreateResponseStreaming([request], responseOptions))
163163
{
164164
ParseResponse(streamResponse);
165165
}
166166
```
167167

168168
Asynchronous sample:
169-
```C# Snippet:Sample_StreamingResponse_FileSearch_Streaming_Async
169+
```C# Snippet:Sample_StreamingResponse_FileSearch_Streaming_Async_2
170170
await foreach (StreamingResponseUpdate streamResponse in responseClient.CreateResponseStreamingAsync([request], responseOptions))
171171
{
172172
ParseResponse(streamResponse);
@@ -176,7 +176,7 @@ await foreach (StreamingResponseUpdate streamResponse in responseClient.CreateRe
176176
6. Ask follow up question and start a new stream.
177177

178178
Synchronous sample:
179-
```C# Snippet:Sample_FollowUp_FileSearch_Streaming_Sync
179+
```C# Snippet:Sample_FollowUp_FileSearch_Streaming_Sync_2
180180
Console.WriteLine("Demonstrating follow-up query with streaming...");
181181
request = ResponseItem.CreateUserMessageItem("What was my previous question about?");
182182
foreach (StreamingResponseUpdate streamResponse in responseClient.CreateResponseStreaming([request], responseOptions))
@@ -186,7 +186,7 @@ foreach (StreamingResponseUpdate streamResponse in responseClient.CreateResponse
186186
```
187187

188188
Asynchronous sample:
189-
```C# Snippet:Sample_FollowUp_FileSearch_Streaming_Async
189+
```C# Snippet:Sample_FollowUp_FileSearch_Streaming_Async_2
190190
Console.WriteLine("Demonstrating follow-up query with streaming...");
191191
request = ResponseItem.CreateUserMessageItem("What was my previous question about?");
192192
await foreach (StreamingResponseUpdate streamResponse in responseClient.CreateResponseStreamingAsync([request], responseOptions))
@@ -198,14 +198,14 @@ await foreach (StreamingResponseUpdate streamResponse in responseClient.CreateRe
198198
5. Finally, delete all the resources, we have created in this sample.
199199

200200
Synchronous sample:
201-
```C# Snippet:Sample_Cleanup_FileSearch_Streaming_Sync
201+
```C# Snippet:Sample_Cleanup_FileSearch_Streaming_Sync_2
202202
client.DeleteAgentVersion(agentName: agentVersion.Name, agentVersion: agentVersion.Version);
203203
vctStoreClient.DeleteVectorStore(vectorStoreId: vectorStore.Id);
204204
fileClient.DeleteFile(uploadedFile.Id);
205205
```
206206

207207
Asynchronous sample:
208-
```C# Snippet:Sample_Cleanup_FileSearch_Streaming_Async
208+
```C# Snippet:Sample_Cleanup_FileSearch_Streaming_Async_2
209209
await client.DeleteAgentVersionAsync(agentName: agentVersion.Name, agentVersion: agentVersion.Version);
210210
await vctStoreClient.DeleteVectorStoreAsync(vectorStoreId: vectorStore.Id);
211211
await fileClient.DeleteFileAsync(uploadedFile.Id);

sdk/ai/Azure.AI.Agents/samples/Sample12_ResponseStreaming.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In this example we will demonstrate how to get a response without an Agent in st
44

55
1. First, we need to create agent client and read the environment variables, which will be used in the next steps.
66

7-
```C# Snippet:Sample_CreateAgentClient_ResponseStreaming
7+
```C# Snippet:Sample_CreateAgentClient_ResponseStreaming_2
88
var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT");
99
var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME");
1010
AgentClient client = new(endpoint: new Uri(projectEndpoint), tokenProvider: new DefaultAzureCredential());
@@ -13,15 +13,15 @@ AgentClient client = new(endpoint: new Uri(projectEndpoint), tokenProvider: new
1313
2. Use the client to create a `Responses`, which will be used to create `AgentResponse` object.
1414

1515
Synchronous sample:
16-
```C# Snippet:Sample_CreateResponseStreaming
16+
```C# Snippet:Sample_CreateResponseStreaming_2
1717
OpenAIClient openAIClient = client.GetOpenAIClient();
1818
OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(modelDeploymentName);
1919
```
2020

2121
3. Stream the results; raise the error if the request was not successful.
2222

2323
Synchronous sample:
24-
```C# Snippet:Sample_WriteOutput_ResponseStreaming_Sync
24+
```C# Snippet:Sample_WriteOutput_ResponseStreaming_Sync_2
2525
foreach (StreamingResponseUpdate streamResponse in responsesClient.CreateResponseStreaming("What is the size of France in square miles?"))
2626
{
2727
if (streamResponse is StreamingResponseCreatedUpdate createUpdate)
@@ -44,7 +44,7 @@ foreach (StreamingResponseUpdate streamResponse in responsesClient.CreateRespons
4444
```
4545

4646
Asynchronous sample:
47-
```C# Snippet:Sample_WriteOutput_ResponseStreaming_Async
47+
```C# Snippet:Sample_WriteOutput_ResponseStreaming_Async2
4848
await foreach (StreamingResponseUpdate streamResponse in responseClient.CreateResponseStreamingAsync("What is the size of France in square miles?"))
4949
{
5050
if (streamResponse is StreamingResponseCreatedUpdate createUpdate)

sdk/ai/Azure.AI.Agents/samples/Sample13_Image_Generation.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In this example we will demonstrate how to generate an image based on prompt.
44

55
1. First, we need to create agent client and read the environment variables, which will be used in the next steps.
66

7-
```C# Snippet:Sample_CreateClient_ImageGeneration
7+
```C# Snippet:Sample_CreateClient_ImageGeneration_2
88
var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT");
99
var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME");
1010
var imageGenerationModelName = System.Environment.GetEnvironmentVariable("IMAGE_GENERATION_DEPLOYMENT_NAME");
@@ -14,7 +14,7 @@ AgentClient client = new(endpoint: new Uri(projectEndpoint), tokenProvider: new
1414
2. Use the client to create the versioned agent object. To generate images, we need to provide agent with the `ImageGenerationTool` when we are creating this tool. The `ImageGenerationTool` parameters include the image generation model, image quality and resolution. Supported image generation models are `gpt-image-1` and `gpt-image-1-mini`.
1515

1616
Synchronous sample:
17-
```C# Snippet:Sample_CreateAgent_ImageGeneration_Sync
17+
```C# Snippet:Sample_CreateAgent_ImageGeneration_Sync_2
1818
PromptAgentDefinition agentDefinition = new(model: modelDeploymentName)
1919
{
2020
Instructions = "Generate images based on user prompts.",
@@ -32,7 +32,7 @@ AgentVersion agentVersion = client.CreateAgentVersion(
3232
```
3333

3434
Asynchronous sample:
35-
```C# Snippet:Sample_CreateAgent_ImageGeneration_Async
35+
```C# Snippet:Sample_CreateAgent_ImageGeneration_Async_2
3636
PromptAgentDefinition agentDefinition = new(model: modelDeploymentName)
3737
{
3838
Instructions = "Generate images based on user prompts.",
@@ -51,7 +51,7 @@ AgentVersion agentVersion = await client.CreateAgentVersionAsync(
5151

5252
3. To use image generation, we will need to provide the custom header to web requests, containing model deployment name, for example `x-ms-oai-image-generation-deployment: gpt-image-1`. To implement it we need to create custom header policy.
5353

54-
```C# Snippet:Sample_CustomHeader_ImageGeneration
54+
```C# Snippet:Sample_CustomHeader_ImageGeneration_2
5555
internal class HeaderPolicy(string image_deployment) : PipelinePolicy
5656
{
5757
private const string image_deployment_header = "x-ms-oai-image-generation-deployment";
@@ -74,7 +74,7 @@ internal class HeaderPolicy(string image_deployment) : PipelinePolicy
7474
4. Use the policy to create the `OpenAIClient` object and create the `OpenAIResponseClient` by asking the Agent to generate the image.
7575

7676
Synchronous sample:
77-
```C# Snippet:Sample_GetResponse_ImageGeneration_Sync
77+
```C# Snippet:Sample_GetResponse_ImageGeneration_Sync_2
7878
OpenAIClientOptions options = new();
7979
options.AddPolicy(new HeaderPolicy(imageGenerationModelName), PipelinePosition.PerCall);
8080
OpenAIClient openAIClient = client.GetOpenAIClient(options: options);
@@ -89,7 +89,7 @@ OpenAIResponse response = responseClient.CreateResponse(
8989
```
9090

9191
Asynchronous sample:
92-
```C# Snippet:Sample_GetResponse_ImageGeneration_Async
92+
```C# Snippet:Sample_GetResponse_ImageGeneration_Async_2
9393
OpenAIClientOptions options = new();
9494
options.AddPolicy(new HeaderPolicy(imageGenerationModelName), PipelinePosition.PerCall);
9595
OpenAIClient openAIClient = client.GetOpenAIClient(options: options);
@@ -106,7 +106,7 @@ OpenAIResponse response = await responseClient.CreateResponseAsync(
106106
5. Waiting for response.
107107

108108
Synchronous sample:
109-
```C# Snippet:Sample_WaitForRun_ImageGeneration_Sync
109+
```C# Snippet:Sample_WaitForRun_ImageGeneration_Sync_2
110110
while (response.Status != ResponseStatus.Incomplete && response.Status != ResponseStatus.Failed && response.Status != ResponseStatus.Completed)
111111
{
112112
Thread.Sleep(TimeSpan.FromMilliseconds(500));
@@ -115,7 +115,7 @@ while (response.Status != ResponseStatus.Incomplete && response.Status != Respon
115115
```
116116

117117
Asynchronous sample:
118-
```C# Snippet:Sample_WaitForRun_ImageGeneration_Async
118+
```C# Snippet:Sample_WaitForRun_ImageGeneration_Async_2
119119
while (response.Status != ResponseStatus.Incomplete && response.Status != ResponseStatus.Failed && response.Status != ResponseStatus.Completed){
120120
await Task.Delay(TimeSpan.FromMilliseconds(500));
121121
response = await responseClient.GetResponseAsync(responseId: response.Id);
@@ -124,7 +124,7 @@ while (response.Status != ResponseStatus.Incomplete && response.Status != Respon
124124

125125
6. Parse the `OpenAIResponse` object and save the generated image.
126126

127-
```C# Snippet:Sample_SaveImage_ImageGeneration
127+
```C# Snippet:Sample_SaveImage_ImageGeneration_2
128128
foreach (ResponseItem item in response.OutputItems)
129129
{
130130
if (item is ImageGenerationCallResponseItem imageItem)
@@ -138,11 +138,11 @@ foreach (ResponseItem item in response.OutputItems)
138138
7. Clean up resources by deleting the Agent.
139139

140140
Synchronous sample:
141-
```C# Snippet:Sample_Cleanup_ImageGeneration_Sync
141+
```C# Snippet:Sample_Cleanup_ImageGeneration_Sync_2
142142
client.DeleteAgentVersion(agentName: agentVersion.Name, agentVersion: agentVersion.Version);
143143
```
144144

145145
Asynchronous sample:
146-
```C# Snippet:Sample_Cleanup_ImageGeneration_Async
146+
```C# Snippet:Sample_Cleanup_ImageGeneration_Async_2
147147
await client.DeleteAgentVersionAsync(agentName: agentVersion.Name, agentVersion: agentVersion.Version);
148148
```

0 commit comments

Comments
 (0)