Skip to content

Commit 04fae0a

Browse files
Added configuration await
1 parent 45236ac commit 04fae0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

App/kernel-memory/extensions/Anthropic/AnthropicTextGeneration.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Net.Http;
66
using System.Runtime.CompilerServices;
77
using System.Threading;
8+
using System.Threading.Tasks;
89
using Microsoft.Extensions.Logging;
910
using Microsoft.KernelMemory.AI.Anthropic.Client;
1011
using Microsoft.KernelMemory.AI.OpenAI;
@@ -106,7 +107,7 @@ public async IAsyncEnumerable<string> GenerateTextAsync(
106107

107108
IAsyncEnumerable<StreamingResponseMessage> streamedResponse = this._client.CallClaudeStreamingAsync(parameters, cancellationToken);
108109

109-
await foreach (StreamingResponseMessage response in streamedResponse)
110+
await foreach (StreamingResponseMessage response in streamedResponse.ConfigureAwait(false))
110111
{
111112
//now we simply yield the response
112113
switch (response)

0 commit comments

Comments
 (0)