Skip to content

Commit

Permalink
add missing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Swimburger committed Aug 1, 2024
1 parent e6f3b05 commit 85b7bd3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Samples/BlazorSample/BlazorSample.Wasm/AskLemur.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Net.Http.Json;
using System.Text.Json;
using AssemblyAI.Lemur;
using BlazorSample.Shared;
using Microsoft.AspNetCore.Components.Forms;

Expand All @@ -13,10 +14,10 @@ public async Task<string> AskQuestionAsync(string transcriptId, string question)
var csrfToken = antiforgeryStateProvider.GetAntiforgeryToken()!;
var request = new HttpRequestMessage(HttpMethod.Post, "/api/ask-lemur");
request.Headers.Add("RequestVerificationToken", csrfToken.Value);
request.Content = JsonContent.Create(new
request.Content = JsonContent.Create(new LemurTaskParams
{
transcriptId,
question
TranscriptIds = [transcriptId],
Prompt = question
});
var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
Expand Down

0 comments on commit 85b7bd3

Please sign in to comment.