Fixed async warning

This commit is contained in:
Thorsten Sommer 2024-07-01 20:00:59 +02:00
parent fc2cdd46bb
commit 92748f0ba2
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -23,7 +23,7 @@ public sealed class ProviderMistral() : BaseProvider("https://api.mistral.ai/v1/
public string InstanceName { get; set; } = "Mistral"; public string InstanceName { get; set; } = "Mistral";
/// <inheritdoc /> /// <inheritdoc />
public async IAsyncEnumerable<string> StreamChatCompletion(IJSRuntime jsRuntime, SettingsManager settings, Provider.Model chatModel, ChatThread chatThread, CancellationToken token = default) public async IAsyncEnumerable<string> StreamChatCompletion(IJSRuntime jsRuntime, SettingsManager settings, Provider.Model chatModel, ChatThread chatThread, [EnumeratorCancellation] CancellationToken token = default)
{ {
// Get the API key: // Get the API key:
var requestedSecret = await settings.GetAPIKey(jsRuntime, this); var requestedSecret = await settings.GetAPIKey(jsRuntime, this);