63
64 try {
65 const response = await fetch("/process-voice", {
66 method: "POST",
67 body: formData,
137 const stopConversation = async () => {
138 try {
139 const response = await fetch("/stop-conversation", {
140 method: "POST",
141 headers: { "Content-Type": "application/json" },
286 // Convert File to Blob explicitly
287 const audioBlob = await audioFile.arrayBuffer();
288 const deepgramResponse = await fetch("https://api.deepgram.com/v1/listen", {
289 method: "POST",
290 headers: {
386
387 // Eleven Labs Text to Speech
388 const elevenLabsResponse = await fetch(
389 `https://api.elevenlabs.io/v1/text-to-speech/${Deno.env.get("ELEVENLABS_VOICE_ID")}`,
390 {
234
235 try {
236 const response = await fetch("/", {
237 method: "POST",
238 body: JSON.stringify({
521)
522
523export default app.fetch
234
235 try {
236 const response = await fetch("/", {
237 method: "POST",
238 body: JSON.stringify({
20
21 try {
22 const response = await fetch("/chat", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },
71
72 try {
73 const response = await fetch("/debug", {
74 method: "POST",
75 headers: { "Content-Type": "application/json" },
174 async function searchStackOverflow(query: string) {
175 try {
176 const response = await fetch(
177 `https://api.stackexchange.com/2.3/search/advanced?order=desc&sort=relevance&q=${
178 encodeURIComponent(query)
234
235 try {
236 const response = await fetch("/", {
237 method: "POST",
238 body: JSON.stringify({
234
235 try {
236 const response = await fetch("/", {
237 method: "POST",
238 body: JSON.stringify({
234
235 try {
236 const response = await fetch("/", {
237 method: "POST",
238 body: JSON.stringify({
234
235 try {
236 const response = await fetch("/", {
237 method: "POST",
238 body: JSON.stringify({