Skip to content

Commit

Permalink
stream configuration await
Browse files Browse the repository at this point in the history
  • Loading branch information
xbotter committed Mar 19, 2024
1 parent 759dee6 commit 9b1e76a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/DashScope.KernelMemory/DashScopeTextGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public async IAsyncEnumerable<string> GenerateTextAsync(string prompt, TextGener
},
Model = _options.Model,
Parameters = MergeCompletionParameters(options, _options.DefaultCompletionParameters)
}, cancellationToken);
}, cancellationToken).ConfigureAwait(false);

await foreach (var result in streamResult)
{
Expand Down
4 changes: 2 additions & 2 deletions src/DashScope.SemanticKernel/DashScopeTextCompletion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public async IAsyncEnumerable<StreamingChatMessageContent> GetStreamingChatMessa
},
Parameters = ToParameters(settings, true),
Model = this._model
}, cancellationToken);
}, cancellationToken).ConfigureAwait(false);
await foreach (var response in responses)
{
var metadata = GetResponseMetadata(response);
Expand Down Expand Up @@ -117,7 +117,7 @@ public async IAsyncEnumerable<StreamingTextContent> GetStreamingTextContentsAsyn
},
Parameters = ToParameters(settings, true),
Model = this._model
}, cancellationToken);
}, cancellationToken).ConfigureAwait(false);
await foreach (var response in responses)
{
var metadata = GetResponseMetadata(response);
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<PackageId>$(AssemblyName)</PackageId>
<Version>0.9.2</Version>
<Version>0.9.3</Version>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<Authors>Custouch</Authors>
Expand Down

0 comments on commit 9b1e76a

Please sign in to comment.