Skip to content

Commit

Permalink
test endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mayarajan3 committed Jan 13, 2025
1 parent 8eafdbe commit 22d49ee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions extensions/src/doodlebot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ export default class DoodlebotBlocks extends extension(details, "ui", "indicator
}

async sendAudioFileToChatEndpoint() {
const url = "http://doodlebot.media.mit.edu/chat";
const url = "http://doodlebot.media.mit.edu/health";

// Create a simple WAV file buffer
const sampleRate = 44100; // Standard audio sample rate
Expand Down Expand Up @@ -740,11 +740,13 @@ export default class DoodlebotBlocks extends extension(details, "ui", "indicator

try {
const response = await fetch(url, {
method: "POST",
headers: { "Content-Type": "multipart/form-data" },
body: formData,
method: "GET",
// headers: { "Content-Type": "multipart/form-data" },
// body: formData,
mode: 'no-cors'
});

console.log(response);
const text = response.text();
console.log(text);

Expand Down

0 comments on commit 22d49ee

Please sign in to comment.