Skip to content

Commit

Permalink
chore: delete supabase call
Browse files Browse the repository at this point in the history
  • Loading branch information
ohazda committed Feb 13, 2024
1 parent b41e34e commit 50a3332
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/app/components/HelpPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ import React, { useState } from 'react';
import ReactMarkdown from 'react-markdown';

const aksAi = async (query: string) => {
return fetch(
'https://riuhfaprzoechxritfub.functions.supabase.co/cds-search',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization:
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJpdWhmYXByem9lY2h4cml0ZnViIiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODM1NjQ0MjQsImV4cCI6MTk5OTE0MDQyNH0.981A7UGwLKvfowemqZJ6mDR5Iubt467ukOOopH4MBTk',
},
body: JSON.stringify({ query }),
}
).then((res) => res.json());
return new Promise<{ data: any }>((resolve, reject) => {
setTimeout(() => {
resolve({
data: {
choices: [
{
message: {
content: `I'm sorry, I don't have an answer for that question. 😔`,
},
},
],
},
});
}, 2000);
});
};

export default function HelpPage() {
Expand Down

0 comments on commit 50a3332

Please sign in to comment.