Skip to content

Commit 7037ee6

Browse files
Merge and resolve conflicts
2 parents c11d486 + 2e831ab commit 7037ee6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dotnet/samples/GettingStartedWithAgents/AzureAIAgent/Step08_AzureAIAgent_Declarative.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ private async Task InvokeAgentAsync(AzureAIAgent agent, string input)
182182
// Create a thread for the agent conversation.
183183
AgentThread thread = await agent.Client.CreateThreadAsync(metadata: SampleMetadata);
184184

185-
// Respond to user input
186185
try
187186
{
187+
// Invoke agent and display the response.
188188
await InvokeAsync(input);
189189
}
190190
finally

dotnet/src/Agents/OpenAI/Extensions/KernelExtensions.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ public static OpenAIClient GetOpenAIClient(this Kernel kernel, AgentDefinition a
3838
throw new InvalidOperationException("OpenAI client type must be specified.");
3939
}
4040

41-
#pragma warning disable CA2000 // Dispose objects before losing scope, not applicable because the HttpClient is created elsewhere
41+
#pragma warning disable CA2000 // Dispose objects before losing scope, not applicable because the HttpClient is created and may be used elsewhere
4242
var httpClient = HttpClientProvider.GetHttpClient(kernel.Services);
4343
#pragma warning restore CA2000 // Dispose objects before losing scope
44+
4445
if (configuration.Type.Equals(OpenAI, StringComparison.OrdinalIgnoreCase))
4546
{
4647
OpenAIClientOptions clientOptions = OpenAIClientProvider.CreateOpenAIClientOptions(configuration.GetEndpointUri(), httpClient);

0 commit comments

Comments
 (0)