68
69 try {
70 const response = await fetch('/analyze', {
71 method: 'POST',
72 body: formData
23
24 try {
25 const response = await fetch('/analyze', {
26 method: 'POST',
27 body: formData
1console.log("hi");
2await fetch("https://shouser--83d37324cc6c11efb88ce6cdfca9ef9f.web.val.run?normalscriptval=true")
3 .then(response => console.log(response.json()))
4 .then(data => console.log(data))
81
82 try {
83 const response = await fetch("/chat", {
84 method: "POST",
85 headers: { "Content-Type": "application/json" },
170 }
171
172 const response = await fetch(url.toString());
173 if (!response.ok) {
174 throw new Error(`Google Maps API error: ${response.statusText}`);
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)