diff --git a/samples/ChatGptBlazor.Wasm/Components/ChatGptStream.razor b/samples/ChatGptBlazor.Wasm/Components/ChatGptStream.razor index a4bdc31..f83be77 100644 --- a/samples/ChatGptBlazor.Wasm/Components/ChatGptStream.razor +++ b/samples/ChatGptBlazor.Wasm/Components/ChatGptStream.razor @@ -64,12 +64,13 @@ private bool CanSendMessage() => !string.IsNullOrWhiteSpace(message) && !isAsking; - private async Task OnTypingMessageAsync(KeyboardEventArgs keyboardEventArgs) { if (keyboardEventArgs.Code is "Enter") + { await AskAsync(); + } } private async Task AskAsync()