From ddbb967c4f8de2b7daa13a74c4cd2c32159f24ff Mon Sep 17 00:00:00 2001 From: Silen Naihin Date: Sat, 17 Feb 2024 13:18:45 -0500 Subject: [PATCH] remove non-ui stacks --- stacks/.DS_Store | Bin 6148 -> 0 bytes stacks/.gitignore | 2 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 23 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 23 - .../index.test.ts | 7 - .../index.test.txt | 4 - stacks/ListAllPredictionInReplicate/index.ts | 21 - .../ListAllUsersUsingAdminAuth/index.test.ts | 11 - .../ListAllUsersUsingAdminAuth/index.test.txt | 4 - stacks/ListAllUsersUsingAdminAuth/index.ts | 24 - stacks/LoginUserUsingSupabase/index.test.ts | 6 - stacks/LoginUserUsingSupabase/index.test.txt | 4 - stacks/LoginUserUsingSupabase/index.ts | 20 - stacks/SignupUserUsingSupabase/index.test.ts | 6 - stacks/SignupUserUsingSupabase/index.test.txt | 4 - stacks/SignupUserUsingSupabase/index.ts | 20 - stacks/answerQuestionUsingOpenAI.ts | 17 - .../answerQuestionUsingOpenAI/index.test.ts | 12 - .../answerQuestionUsingOpenAI/index.test.txt | 6 - stacks/answerQuestionUsingOpenAI/index.ts | 18 - .../index.test.ts | 6 - .../index.test.txt | 5 - .../answerQuestionUsingOpenAIAndGPT4/index.ts | 27 - stacks/answerQuestionWithRetry/index.test.ts | 12 - stacks/answerQuestionWithRetry/index.test.txt | 12 - stacks/answerQuestionWithRetry/index.ts | 20 - stacks/arrayMove/index.test.ts | 35 - stacks/arrayMove/index.test.txt | 32 - stacks/arrayMove/index.ts | 9 - stacks/callOpenAI/index.test.ts | 7 - stacks/callOpenAI/index.ts | 17 - stacks/callOpenAIUsingLangchain/index.ts | 14 - .../package-lock.json | 1124 ----------------- stacks/callOpenAIUsingLangchain/package.json | 16 - stacks/callOpenAIUsingLangchain/test.ts | 7 - stacks/callOpenAIUsingLangchain/test.txt | 7 - stacks/callOrca2/index.test.ts | 4 - stacks/callOrca2/index.test.txt | 3 - stacks/callOrca2/index.ts | 35 - .../cancelPredictionInReplicate/index.test.ts | 8 - .../index.test.txt | 5 - stacks/cancelPredictionInReplicate/index.ts | 25 - stacks/createABucketOnSupabase/index.test.ts | 13 - stacks/createABucketOnSupabase/index.test.txt | 4 - stacks/createABucketOnSupabase/index.ts | 25 - stacks/createAModelInReplicate/index.test.ts | 14 - stacks/createAModelInReplicate/index.test.txt | 11 - stacks/createAModelInReplicate/index.ts | 29 - .../index.test.ts | 13 - .../index.test.txt | 10 - .../index.ts | 29 - stacks/createRandomUser/index.test.ts | 8 - stacks/createRandomUser/index.test.txt | 7 - stacks/createRandomUser/index.ts | 13 - stacks/createUserUsingAdminAuth/index.test.ts | 11 - .../createUserUsingAdminAuth/index.test.txt | 9 - stacks/createUserUsingAdminAuth/index.ts | 25 - stacks/defineWordusingOpenAI/index.ts | 17 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 16 - stacks/deleteUserUsingAdminAuth/index.test.ts | 8 - .../deleteUserUsingAdminAuth/index.test.txt | 6 - stacks/deleteUserUsingAdminAuth/index.ts | 26 - .../deleteVoiceByIDElevenLabs/index.test.ts | 6 - .../deleteVoiceByIDElevenLabs/index.test.txt | 4 - stacks/deleteVoiceByIDElevenLabs/index.ts | 15 - .../index.test.txt | 4 - .../index.ts | 19 - .../index.test.ts | 7 - .../index.test.txt | 4 - stacks/fetchDataFromTableInCSVFormat/index.ts | 20 - .../index.test.ts | 7 - .../index.test.txt | 4 - .../fetchDataFromTableUsingSupabase/index.ts | 19 - .../fileUploadUsingPocketbase/index.test.ts | 49 - .../fileUploadUsingPocketbase/index.test.txt | 57 - stacks/fileUploadUsingPocketbase/index.ts | 39 - .../index.test.ts | 6 - .../index.test.txt | 4 - stacks/generateAnImageUsingReplicate/index.ts | 25 - stacks/generateAnimeQuote/index.test.ts | 7 - stacks/generateAnimeQuote/index.test.txt | 7 - stacks/generateAnimeQuote/index.ts | 10 - stacks/generateCatImage/index.test.ts | 2 - stacks/generateCatImage/index.ts | 9 - stacks/generateDogImage/index.test.ts | 7 - stacks/generateDogImage/index.test.txt | 7 - stacks/generateDogImage/index.ts | 11 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../getAllAvailableModelsElevenlabs/index.ts | 15 - .../index.test.ts | 7 - .../index.test.txt | 5 - .../index.ts | 15 - stacks/getCountryData/index.test.ts | 7 - stacks/getCountryData/index.test.txt | 8 - stacks/getCountryData/index.ts | 14 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 16 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 16 - stacks/getOneRecordOnPocketBase/index.test.ts | 13 - .../getOneRecordOnPocketBase/index.test.txt | 22 - stacks/getOneRecordOnPocketBase/index.ts | 14 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 15 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 15 - stacks/getWhatString/index.ts | 6 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 23 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 22 - .../index.test.ts | 8 - .../index.test.txt | 5 - stacks/initializeClientFromSupabase/index.ts | 17 - stacks/jest.config.js | 6 - stacks/jest.setup.js | 1 - stacks/listAllBucketsOnSupabase/index.test.ts | 7 - .../listAllBucketsOnSupabase/index.test.txt | 4 - stacks/listAllBucketsOnSupabase/index.ts | 21 - .../index.test.ts | 18 - .../index.test.txt | 18 - .../index.ts | 56 - .../retrieveABucketOnSupabase/index.test.ts | 9 - .../retrieveABucketOnSupabase/index.test.txt | 4 - stacks/retrieveABucketOnSupabase/index.ts | 20 - .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 23 - stacks/searchUsingDuckDuckGo/index.test.ts | 10 - stacks/searchUsingDuckDuckGo/index.test.txt | 14 - stacks/searchUsingDuckDuckGo/index.ts | 13 - .../index.test.ts | 9 - .../index.test.txt | 5 - .../streamingGpt4QuestionAnswerTTS/index.ts | 17 - stacks/tsconfig.json | 113 -- .../index.test.ts | 6 - .../index.test.txt | 4 - .../index.ts | 23 - stacks/useOpenAIstreamEndpoint/index.test.ts | 25 - stacks/useOpenAIstreamEndpoint/index.test.txt | 11 - stacks/useOpenAIstreamEndpoint/index.ts | 24 - 154 files changed, 3139 deletions(-) delete mode 100644 stacks/.DS_Store delete mode 100644 stacks/.gitignore delete mode 100644 stacks/DeleteDataFromTheTableUsingSupabase/index.test.ts delete mode 100644 stacks/DeleteDataFromTheTableUsingSupabase/index.test.txt delete mode 100644 stacks/DeleteDataFromTheTableUsingSupabase/index.ts delete mode 100644 stacks/InsertDataFromTheTableUsingSupabase/index.test.ts delete mode 100644 stacks/InsertDataFromTheTableUsingSupabase/index.test.txt delete mode 100644 stacks/InsertDataFromTheTableUsingSupabase/index.ts delete mode 100644 stacks/ListAllPredictionInReplicate/index.test.ts delete mode 100644 stacks/ListAllPredictionInReplicate/index.test.txt delete mode 100644 stacks/ListAllPredictionInReplicate/index.ts delete mode 100644 stacks/ListAllUsersUsingAdminAuth/index.test.ts delete mode 100644 stacks/ListAllUsersUsingAdminAuth/index.test.txt delete mode 100644 stacks/ListAllUsersUsingAdminAuth/index.ts delete mode 100644 stacks/LoginUserUsingSupabase/index.test.ts delete mode 100644 stacks/LoginUserUsingSupabase/index.test.txt delete mode 100644 stacks/LoginUserUsingSupabase/index.ts delete mode 100644 stacks/SignupUserUsingSupabase/index.test.ts delete mode 100644 stacks/SignupUserUsingSupabase/index.test.txt delete mode 100644 stacks/SignupUserUsingSupabase/index.ts delete mode 100644 stacks/answerQuestionUsingOpenAI.ts delete mode 100644 stacks/answerQuestionUsingOpenAI/index.test.ts delete mode 100644 stacks/answerQuestionUsingOpenAI/index.test.txt delete mode 100644 stacks/answerQuestionUsingOpenAI/index.ts delete mode 100644 stacks/answerQuestionUsingOpenAIAndGPT4/index.test.ts delete mode 100644 stacks/answerQuestionUsingOpenAIAndGPT4/index.test.txt delete mode 100644 stacks/answerQuestionUsingOpenAIAndGPT4/index.ts delete mode 100644 stacks/answerQuestionWithRetry/index.test.ts delete mode 100644 stacks/answerQuestionWithRetry/index.test.txt delete mode 100644 stacks/answerQuestionWithRetry/index.ts delete mode 100644 stacks/arrayMove/index.test.ts delete mode 100644 stacks/arrayMove/index.test.txt delete mode 100644 stacks/arrayMove/index.ts delete mode 100644 stacks/callOpenAI/index.test.ts delete mode 100644 stacks/callOpenAI/index.ts delete mode 100644 stacks/callOpenAIUsingLangchain/index.ts delete mode 100644 stacks/callOpenAIUsingLangchain/package-lock.json delete mode 100644 stacks/callOpenAIUsingLangchain/package.json delete mode 100644 stacks/callOpenAIUsingLangchain/test.ts delete mode 100644 stacks/callOpenAIUsingLangchain/test.txt delete mode 100644 stacks/callOrca2/index.test.ts delete mode 100644 stacks/callOrca2/index.test.txt delete mode 100644 stacks/callOrca2/index.ts delete mode 100644 stacks/cancelPredictionInReplicate/index.test.ts delete mode 100644 stacks/cancelPredictionInReplicate/index.test.txt delete mode 100644 stacks/cancelPredictionInReplicate/index.ts delete mode 100644 stacks/createABucketOnSupabase/index.test.ts delete mode 100644 stacks/createABucketOnSupabase/index.test.txt delete mode 100644 stacks/createABucketOnSupabase/index.ts delete mode 100644 stacks/createAModelInReplicate/index.test.ts delete mode 100644 stacks/createAModelInReplicate/index.test.txt delete mode 100644 stacks/createAModelInReplicate/index.ts delete mode 100644 stacks/createNewPredictionUsingReplicate/index.test.ts delete mode 100644 stacks/createNewPredictionUsingReplicate/index.test.txt delete mode 100644 stacks/createNewPredictionUsingReplicate/index.ts delete mode 100644 stacks/createRandomUser/index.test.ts delete mode 100644 stacks/createRandomUser/index.test.txt delete mode 100644 stacks/createRandomUser/index.ts delete mode 100644 stacks/createUserUsingAdminAuth/index.test.ts delete mode 100644 stacks/createUserUsingAdminAuth/index.test.txt delete mode 100644 stacks/createUserUsingAdminAuth/index.ts delete mode 100644 stacks/defineWordusingOpenAI/index.ts delete mode 100644 stacks/deleteOneItemInHistoryInElevelLabs/index.test.ts delete mode 100644 stacks/deleteOneItemInHistoryInElevelLabs/index.test.txt delete mode 100644 stacks/deleteOneItemInHistoryInElevelLabs/index.ts delete mode 100644 stacks/deleteUserUsingAdminAuth/index.test.ts delete mode 100644 stacks/deleteUserUsingAdminAuth/index.test.txt delete mode 100644 stacks/deleteUserUsingAdminAuth/index.ts delete mode 100644 stacks/deleteVoiceByIDElevenLabs/index.test.ts delete mode 100644 stacks/deleteVoiceByIDElevenLabs/index.test.txt delete mode 100644 stacks/deleteVoiceByIDElevenLabs/index.ts delete mode 100644 stacks/fetchAllDataFromTableUsingSupabase/index.test.txt delete mode 100644 stacks/fetchAllDataFromTableUsingSupabase/index.ts delete mode 100644 stacks/fetchDataFromTableInCSVFormat/index.test.ts delete mode 100644 stacks/fetchDataFromTableInCSVFormat/index.test.txt delete mode 100644 stacks/fetchDataFromTableInCSVFormat/index.ts delete mode 100644 stacks/fetchDataFromTableUsingSupabase/index.test.ts delete mode 100644 stacks/fetchDataFromTableUsingSupabase/index.test.txt delete mode 100644 stacks/fetchDataFromTableUsingSupabase/index.ts delete mode 100644 stacks/fileUploadUsingPocketbase/index.test.ts delete mode 100644 stacks/fileUploadUsingPocketbase/index.test.txt delete mode 100644 stacks/fileUploadUsingPocketbase/index.ts delete mode 100644 stacks/generateAnImageUsingReplicate/index.test.ts delete mode 100644 stacks/generateAnImageUsingReplicate/index.test.txt delete mode 100644 stacks/generateAnImageUsingReplicate/index.ts delete mode 100644 stacks/generateAnimeQuote/index.test.ts delete mode 100644 stacks/generateAnimeQuote/index.test.txt delete mode 100644 stacks/generateAnimeQuote/index.ts delete mode 100644 stacks/generateCatImage/index.test.ts delete mode 100644 stacks/generateCatImage/index.ts delete mode 100644 stacks/generateDogImage/index.test.ts delete mode 100644 stacks/generateDogImage/index.test.txt delete mode 100644 stacks/generateDogImage/index.ts delete mode 100644 stacks/getAllAvailableModelsElevenlabs/index.test.ts delete mode 100644 stacks/getAllAvailableModelsElevenlabs/index.test.txt delete mode 100644 stacks/getAllAvailableModelsElevenlabs/index.ts delete mode 100644 stacks/getAudioFromHistoryItemInElevenLabs/index.test.ts delete mode 100644 stacks/getAudioFromHistoryItemInElevenLabs/index.test.txt delete mode 100644 stacks/getAudioFromHistoryItemInElevenLabs/index.ts delete mode 100644 stacks/getCountryData/index.test.ts delete mode 100644 stacks/getCountryData/index.test.txt delete mode 100644 stacks/getCountryData/index.ts delete mode 100644 stacks/getHistoryOfGeneratedItemsInElevenLabs/index.test.ts delete mode 100644 stacks/getHistoryOfGeneratedItemsInElevenLabs/index.test.txt delete mode 100644 stacks/getHistoryOfGeneratedItemsInElevenLabs/index.ts delete mode 100644 stacks/getOneItemFromHistoryInElevenLabs/index.test.ts delete mode 100644 stacks/getOneItemFromHistoryInElevenLabs/index.test.txt delete mode 100644 stacks/getOneItemFromHistoryInElevenLabs/index.ts delete mode 100644 stacks/getOneRecordOnPocketBase/index.test.ts delete mode 100644 stacks/getOneRecordOnPocketBase/index.test.txt delete mode 100644 stacks/getOneRecordOnPocketBase/index.ts delete mode 100644 stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.test.ts delete mode 100644 stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.test.txt delete mode 100644 stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.ts delete mode 100644 stacks/getUserSubscriptionInfoElevenLabs/index.test.ts delete mode 100644 stacks/getUserSubscriptionInfoElevenLabs/index.test.txt delete mode 100644 stacks/getUserSubscriptionInfoElevenLabs/index.ts delete mode 100644 stacks/getWhatString/index.ts delete mode 100644 stacks/getWhoIsRecordOfDomainUsingCloudflare/index.test.ts delete mode 100644 stacks/getWhoIsRecordOfDomainUsingCloudflare/index.test.txt delete mode 100644 stacks/getWhoIsRecordOfDomainUsingCloudflare/index.ts delete mode 100644 stacks/initializeClientAsAdminAuthUsingSupabase/index.test.ts delete mode 100644 stacks/initializeClientAsAdminAuthUsingSupabase/index.test.txt delete mode 100644 stacks/initializeClientAsAdminAuthUsingSupabase/index.ts delete mode 100644 stacks/initializeClientFromSupabase/index.test.ts delete mode 100644 stacks/initializeClientFromSupabase/index.test.txt delete mode 100644 stacks/initializeClientFromSupabase/index.ts delete mode 100644 stacks/jest.config.js delete mode 100644 stacks/jest.setup.js delete mode 100644 stacks/listAllBucketsOnSupabase/index.test.ts delete mode 100644 stacks/listAllBucketsOnSupabase/index.test.txt delete mode 100644 stacks/listAllBucketsOnSupabase/index.ts delete mode 100644 stacks/listenToDatabaseChangesUsingSupabase/index.test.ts delete mode 100644 stacks/listenToDatabaseChangesUsingSupabase/index.test.txt delete mode 100644 stacks/listenToDatabaseChangesUsingSupabase/index.ts delete mode 100644 stacks/retrieveABucketOnSupabase/index.test.ts delete mode 100644 stacks/retrieveABucketOnSupabase/index.test.txt delete mode 100644 stacks/retrieveABucketOnSupabase/index.ts delete mode 100644 stacks/retrieveExistingUserUsingSupabase/index.test.ts delete mode 100644 stacks/retrieveExistingUserUsingSupabase/index.test.txt delete mode 100644 stacks/retrieveExistingUserUsingSupabase/index.ts delete mode 100644 stacks/searchUsingDuckDuckGo/index.test.ts delete mode 100644 stacks/searchUsingDuckDuckGo/index.test.txt delete mode 100644 stacks/searchUsingDuckDuckGo/index.ts delete mode 100644 stacks/streamingGpt4QuestionAnswerTTS/index.test.ts delete mode 100644 stacks/streamingGpt4QuestionAnswerTTS/index.test.txt delete mode 100644 stacks/streamingGpt4QuestionAnswerTTS/index.ts delete mode 100644 stacks/tsconfig.json delete mode 100644 stacks/updateDataFromTheTableUsingSupabase/index.test.ts delete mode 100644 stacks/updateDataFromTheTableUsingSupabase/index.test.txt delete mode 100644 stacks/updateDataFromTheTableUsingSupabase/index.ts delete mode 100644 stacks/useOpenAIstreamEndpoint/index.test.ts delete mode 100644 stacks/useOpenAIstreamEndpoint/index.test.txt delete mode 100644 stacks/useOpenAIstreamEndpoint/index.ts diff --git a/stacks/.DS_Store b/stacks/.DS_Store deleted file mode 100644 index 0ad7616b86a1e4ab8fedaa6bd18b5a44738d1876..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyH3O~5FEo5CsA-6l>P<&z&afTB~Z}90TM_jB0)}wE*+l@vkwqafRX~uO6#%L zJ9aWfHVdFEw>L+?0>GSZh*uk?X8Yz7+sQ~F(s{-$9&w5-@oAF%eZaT}xWWS&&m(@1 zdvuIn5PRI=jJrM0e>vH7*XvEUCet2!-~26&bD0#70#ZNOHKx~OaAS1LARANv|wiqSojMvO-i9=w} zQT%3}lQ);_P>SEqc=dFY7N}7QNP)2eyRlqY{XeGv(EpD~T1f#Z@UIjov(@=($ydtS zI(a#(wUvHJ|1joyItMSsL@&i$SSddIl2>ic{gyZcI-PN+6ZIoty2zx!UnuYn3brCa diff --git a/stacks/.gitignore b/stacks/.gitignore deleted file mode 100644 index 1dcef2d9..00000000 --- a/stacks/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.env \ No newline at end of file diff --git a/stacks/DeleteDataFromTheTableUsingSupabase/index.test.ts b/stacks/DeleteDataFromTheTableUsingSupabase/index.test.ts deleted file mode 100644 index 94d88c3e..00000000 --- a/stacks/DeleteDataFromTheTableUsingSupabase/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import deleteDataFromTheTable from '.'; - -test('Delete data from the table using supabase client', async () => { - const response = await deleteDataFromTheTable({table_name:'your_table', filter_name:'your_id',filter_value:1}); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/DeleteDataFromTheTableUsingSupabase/index.test.txt b/stacks/DeleteDataFromTheTableUsingSupabase/index.test.txt deleted file mode 100644 index dd813564..00000000 --- a/stacks/DeleteDataFromTheTableUsingSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Delete data from the table using supabase client', async () => { - const response = stack('Delete data from the table using supabase client'); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/DeleteDataFromTheTableUsingSupabase/index.ts b/stacks/DeleteDataFromTheTableUsingSupabase/index.ts deleted file mode 100644 index 4628bf86..00000000 --- a/stacks/DeleteDataFromTheTableUsingSupabase/index.ts +++ /dev/null @@ -1,23 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Delete data from the table using supabase - */ -export default async function deleteDataFromTheTable({table_name, filter_name, filter_value}:{table_name:string, filter_name:any, filter_value:any}): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - - const { data } = await supabase - .from(table_name) - .delete() - .eq(filter_name, filter_value) - .select() - - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/InsertDataFromTheTableUsingSupabase/index.test.ts b/stacks/InsertDataFromTheTableUsingSupabase/index.test.ts deleted file mode 100644 index d9292144..00000000 --- a/stacks/InsertDataFromTheTableUsingSupabase/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import insertDataFromTheTable from '.'; - -test('Insert data from the table using supabase client', async () => { - const response = await insertDataFromTheTable({table_name:'your_table', column_name:'your_data',column_value:'new value'}); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/InsertDataFromTheTableUsingSupabase/index.test.txt b/stacks/InsertDataFromTheTableUsingSupabase/index.test.txt deleted file mode 100644 index 4de0f3ff..00000000 --- a/stacks/InsertDataFromTheTableUsingSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Insert data from the table using supabase client', async () => { - const response = stack('Insert data from the table using supabase client'); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/InsertDataFromTheTableUsingSupabase/index.ts b/stacks/InsertDataFromTheTableUsingSupabase/index.ts deleted file mode 100644 index 7983dea0..00000000 --- a/stacks/InsertDataFromTheTableUsingSupabase/index.ts +++ /dev/null @@ -1,23 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Insert data from the table using supabase - */ -export default async function insertDataFromTheTable({ table_name, column_name, column_value }: { table_name: string, column_name: any, column_value: any }): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - - const { data } = await supabase - .from(table_name) - .insert([ - { [column_name]: column_value}, - ]) - .select() - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/ListAllPredictionInReplicate/index.test.ts b/stacks/ListAllPredictionInReplicate/index.test.ts deleted file mode 100644 index 5112b8b3..00000000 --- a/stacks/ListAllPredictionInReplicate/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ - -import getAllPrediction from '.'; - -test('get all list of predictions made in replicate', async () => { - const response = await getAllPrediction(); - expect(response.results).toBeTruthy(); -}); \ No newline at end of file diff --git a/stacks/ListAllPredictionInReplicate/index.test.txt b/stacks/ListAllPredictionInReplicate/index.test.txt deleted file mode 100644 index 2b11bd49..00000000 --- a/stacks/ListAllPredictionInReplicate/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('get all list of predictions made in replicate', async () => { - const response = stack('get all list of predictions made in replicate', { in : '', out: ''}) - expect(response.results).toBeTruthy(); -}); \ No newline at end of file diff --git a/stacks/ListAllPredictionInReplicate/index.ts b/stacks/ListAllPredictionInReplicate/index.ts deleted file mode 100644 index 076a1c88..00000000 --- a/stacks/ListAllPredictionInReplicate/index.ts +++ /dev/null @@ -1,21 +0,0 @@ - -import axios from 'axios'; -/** - * Brief: get all list of predictions made in replicate - */ - -export default async function getAllPrediction(): Promise { - try { - - const config = { - headers: { - 'Authorization': `Token ${process.env.REPLICATE_API_TOKEN}`, - 'Content-Type': 'application/json' - } - }; - const response = await axios.get('https://api.replicate.com/v1/predictions', config); - return response.data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/ListAllUsersUsingAdminAuth/index.test.ts b/stacks/ListAllUsersUsingAdminAuth/index.test.ts deleted file mode 100644 index 1aa5fd32..00000000 --- a/stacks/ListAllUsersUsingAdminAuth/index.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import retrieveAlluser from '.'; - -test('Retrieve all user of the project using Admin Auth', async () => { - const response = await retrieveAlluser({ - paginate: { - page: 1, - perPage: 1000 - } - }) - expect(response.length).toBeGreaterThan(1) -}); \ No newline at end of file diff --git a/stacks/ListAllUsersUsingAdminAuth/index.test.txt b/stacks/ListAllUsersUsingAdminAuth/index.test.txt deleted file mode 100644 index 165fb2a5..00000000 --- a/stacks/ListAllUsersUsingAdminAuth/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Retrieve all user of the project using Admin Auth', async () => { - const response = stack("Retrieve all user of the project using Admin Auth") - expect(response.length).toBeGreaterThan(1) -}); \ No newline at end of file diff --git a/stacks/ListAllUsersUsingAdminAuth/index.ts b/stacks/ListAllUsersUsingAdminAuth/index.ts deleted file mode 100644 index 9321946c..00000000 --- a/stacks/ListAllUsersUsingAdminAuth/index.ts +++ /dev/null @@ -1,24 +0,0 @@ - -import { PageParams, createClient } from '@supabase/supabase-js' -require('dotenv').config(); - -/** - * Brief: Retrieve all user of the project using Admin Auth - */ -export default async function retrieveAlluser({paginate}:{paginate:PageParams}): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseServiceRole = String(process.env.SUPABASE_SERVICE_ROLE) - const supabase = createClient(supabaseUrl, supabaseServiceRole, { - auth: { - autoRefreshToken: false, - persistSession: false - } - }) - - const { data: { users }, error } = await supabase.auth.admin.listUsers(paginate) - return users; - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/LoginUserUsingSupabase/index.test.ts b/stacks/LoginUserUsingSupabase/index.test.ts deleted file mode 100644 index cada611d..00000000 --- a/stacks/LoginUserUsingSupabase/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import loginExistingUserWithEmailPassword from '.'; - -test('Login existing user using email and password on supabase', async () => { - const response = await loginExistingUserWithEmailPassword({email:"anytest@test.com", password:"123456"}); - expect(response.session.access_token).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/LoginUserUsingSupabase/index.test.txt b/stacks/LoginUserUsingSupabase/index.test.txt deleted file mode 100644 index 804f34e6..00000000 --- a/stacks/LoginUserUsingSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Login existing user using email and password on supabase', async () => { - const response = stack('Login existing user using email and password on supabase'); - expect(response.session.access_token).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/LoginUserUsingSupabase/index.ts b/stacks/LoginUserUsingSupabase/index.ts deleted file mode 100644 index 2b2bccd1..00000000 --- a/stacks/LoginUserUsingSupabase/index.ts +++ /dev/null @@ -1,20 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Authenticate and login existing user using email and password on supabase - */ -export default async function loginExistingUserWithEmailPassword({email,password}:{email:string,password:string}): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - const { data } = await supabase.auth.signInWithPassword({ - email: email, - password: password, - }) - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/SignupUserUsingSupabase/index.test.ts b/stacks/SignupUserUsingSupabase/index.test.ts deleted file mode 100644 index 52e4b01a..00000000 --- a/stacks/SignupUserUsingSupabase/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import signupAndCreateAccountOnProject from '.'; - -test('Sign Up and Create a New Account on a Project in Supabase Client', async () => { - const response = await signupAndCreateAccountOnProject({email:"any@test.com", password:"hello123"}); - expect(response.user.created_at).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/SignupUserUsingSupabase/index.test.txt b/stacks/SignupUserUsingSupabase/index.test.txt deleted file mode 100644 index f656f216..00000000 --- a/stacks/SignupUserUsingSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Sign Up and Create a New Account on a Project in Supabase Client', async () => { - const response = stack('Sign Up and Create a New Account on a Project in Supabase Client'); - expect(response.user.created_at).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/SignupUserUsingSupabase/index.ts b/stacks/SignupUserUsingSupabase/index.ts deleted file mode 100644 index 58ba7d7b..00000000 --- a/stacks/SignupUserUsingSupabase/index.ts +++ /dev/null @@ -1,20 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Sign Up and Create a New Account on a Project in Supabase Client - */ -export default async function signupAndCreateAccountOnProject({email,password}:{email:string,password:string}): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - let { data } = await supabase.auth.signUp({ - email: email, - password: password - }) - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/answerQuestionUsingOpenAI.ts b/stacks/answerQuestionUsingOpenAI.ts deleted file mode 100644 index f6e06c01..00000000 --- a/stacks/answerQuestionUsingOpenAI.ts +++ /dev/null @@ -1,17 +0,0 @@ -import OpenAI from 'openai'; - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY -}); - -/** - * Brief: answer my question using OpenAI - */ -export default async function answerQuestionUsingOpenAI(input: string): Promise { - const response = await openai.chat.completions.create({ - messages: [{ role: 'user', content: input }], - model: 'gpt-3.5-turbo', - }); - - return response.choices[0].message.content; -} \ No newline at end of file diff --git a/stacks/answerQuestionUsingOpenAI/index.test.ts b/stacks/answerQuestionUsingOpenAI/index.test.ts deleted file mode 100644 index 7c980b68..00000000 --- a/stacks/answerQuestionUsingOpenAI/index.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import answerQuestionUsingOpenAI from '../../stacks/answerQuestionUsingOpenAI'; - - -test('flattenInputJson correctly', async () => { - const question = 'what is the meaning of life?'; - const response = await answerQuestionUsingOpenAI(question); - console.log(response); - }); - - - - \ No newline at end of file diff --git a/stacks/answerQuestionUsingOpenAI/index.test.txt b/stacks/answerQuestionUsingOpenAI/index.test.txt deleted file mode 100644 index edcce1bf..00000000 --- a/stacks/answerQuestionUsingOpenAI/index.test.txt +++ /dev/null @@ -1,6 +0,0 @@ -test('flattenInputJson correctly', async () => { - const question = 'what is the meaning of life?'; - const response = stack('answer my question using OpenAI', {in: question, out: '42'}) - console.log(response); -}); - diff --git a/stacks/answerQuestionUsingOpenAI/index.ts b/stacks/answerQuestionUsingOpenAI/index.ts deleted file mode 100644 index 26c1e1d9..00000000 --- a/stacks/answerQuestionUsingOpenAI/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import OpenAI from 'openai'; -require('dotenv').config(); - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY -}); - -/** - * Brief: answer my question using OpenAI - */ -export default async function answerQuestionUsingOpenAI(input: string): Promise { - const response = await openai.chat.completions.create({ - messages: [{ role: 'user', content: input }], - model: 'gpt-3.5-turbo', - }); - - return response.choices[0].message.content; -} \ No newline at end of file diff --git a/stacks/answerQuestionUsingOpenAIAndGPT4/index.test.ts b/stacks/answerQuestionUsingOpenAIAndGPT4/index.test.ts deleted file mode 100644 index 2e4b3972..00000000 --- a/stacks/answerQuestionUsingOpenAIAndGPT4/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import answerQuestionUsingOpenAIAndGPT4 from '.'; -test('callOpenAI correctly', async () => { - const question = 'what is the meaning of life?'; - const response = await answerQuestionUsingOpenAIAndGPT4(question); - console.log(response); -}); \ No newline at end of file diff --git a/stacks/answerQuestionUsingOpenAIAndGPT4/index.test.txt b/stacks/answerQuestionUsingOpenAIAndGPT4/index.test.txt deleted file mode 100644 index 68b71352..00000000 --- a/stacks/answerQuestionUsingOpenAIAndGPT4/index.test.txt +++ /dev/null @@ -1,5 +0,0 @@ -test('answerQuestionUsingOpenAIAndGPT4 correctly', async () => { - const question = 'what is the meaning of life?'; - const response = await stack('answer my question using OpenAI and gpt-4', {in: question, out: '42'}) - console.log(response); -}); \ No newline at end of file diff --git a/stacks/answerQuestionUsingOpenAIAndGPT4/index.ts b/stacks/answerQuestionUsingOpenAIAndGPT4/index.ts deleted file mode 100644 index 94972b44..00000000 --- a/stacks/answerQuestionUsingOpenAIAndGPT4/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import OpenAI from 'openai'; - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY -}); - -/** - * Brief: answer my question using OpenAI and gpt-4 - */ -export default async function answerQuestionUsingOpenAIAndGPT4(input: string): Promise { - const response = await openai.chat.completions.create({ - model: 'gpt-4', - messages: [ - { - role: 'system', - content: 'You are a helpful assistant.' - }, - { - role: 'user', - content: input - } - ] - }); - - const answer = response.choices[0].message.content; - return answer; -} \ No newline at end of file diff --git a/stacks/answerQuestionWithRetry/index.test.ts b/stacks/answerQuestionWithRetry/index.test.ts deleted file mode 100644 index b5bce608..00000000 --- a/stacks/answerQuestionWithRetry/index.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import answerQuestionWithRetry from '.'; - -test('answerQuestionWithRetry correctly retries after failures', async () => { - const question = 'what is the meaning of life?'; - try { - const response = await answerQuestionWithRetry(question); - console.log(response); - expect(response).toBe('42 is the answer to the meaning of life.'); - } catch (error) { - console.error('Test failed:', error); - } -}); diff --git a/stacks/answerQuestionWithRetry/index.test.txt b/stacks/answerQuestionWithRetry/index.test.txt deleted file mode 100644 index f6624e7b..00000000 --- a/stacks/answerQuestionWithRetry/index.test.txt +++ /dev/null @@ -1,12 +0,0 @@ -test('flattenInputJson correctly', async () => { - const question = 'what is the meaning of life?'; - const response = stack( - 'answer my question using OpenAI and if it fails retry twice (3 times in total)', - { - in: question, - out: '42' - }); - console.log(response); -}); - - diff --git a/stacks/answerQuestionWithRetry/index.ts b/stacks/answerQuestionWithRetry/index.ts deleted file mode 100644 index f8e7b3b4..00000000 --- a/stacks/answerQuestionWithRetry/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import OpenAI from 'openai'; -require('dotenv').config(); - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY, - maxRetries: 3, // default is 2 - -}); - -/** - * Brief: answer my question using OpenAI and if it fails retry twice (3 times in total) - */ -export default async function answerQuestionWithRetry(input: string): Promise { - const response = await openai.chat.completions.create({ - messages: [{ role: 'user', content: input }], - model: 'gpt-3.5-turbo', - }); - - return response.choices[0].message.content; -} \ No newline at end of file diff --git a/stacks/arrayMove/index.test.ts b/stacks/arrayMove/index.test.ts deleted file mode 100644 index 1d2de468..00000000 --- a/stacks/arrayMove/index.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -test("flattenInputJson correctly", async () => { - const array = [ - { _id: "1", todo: "DO work" }, - { _id: "2", todo: "Walk the dog" }, - { _id: "3", todo: "Buy Mangoes" }, - { _id: "4", todo: "Paint the Walls" }, - ]; - - const from = 0; - const to = 2; - - const response = stack( - "Make a function that moves an item from an index to another index.", - { - in: { - array, - from, - to, - }, - out: [ - { _id: "2", todo: "Walk the dog" }, - { _id: "1", todo: "DO work" }, - { _id: "3", todo: "Buy Mangoes" }, - { _id: "4", todo: "Paint the Walls" }, - ], - } - ); - - expect(response).toEqual([ - { _id: "2", todo: "Walk the dog" }, - { _id: "1", todo: "DO work" }, - { _id: "3", todo: "Buy Mangoes" }, - { _id: "4", todo: "Paint the Walls" }, - ]); -}); diff --git a/stacks/arrayMove/index.test.txt b/stacks/arrayMove/index.test.txt deleted file mode 100644 index 84b39fd1..00000000 --- a/stacks/arrayMove/index.test.txt +++ /dev/null @@ -1,32 +0,0 @@ -test("flattenInputJson correctly", async () => { - const array = [ - { _id: "1", todo: "DO work" }, - { _id: "2", todo: "Walk the dog" }, - { _id: "3", todo: "Buy Mangoes" }, - { _id: "4", todo: "Paint the Walls" }, - ]; - - const from = 0; - const to = 2; - - const response = stack("make a function that ", { - in: { - array, - from, - to, - }, - out: [ - { _id: "2", todo: "Walk the dog" }, - { _id: "1", todo: "DO work" }, - { _id: "3", todo: "Buy Mangoes" }, - { _id: "4", todo: "Paint the Walls" }, - ], - }); - - expect(response).toEqual([ - { _id: "2", todo: "Walk the dog" }, - { _id: "1", todo: "DO work" }, - { _id: "3", todo: "Buy Mangoes" }, - { _id: "4", todo: "Paint the Walls" }, - ]); -}); diff --git a/stacks/arrayMove/index.ts b/stacks/arrayMove/index.ts deleted file mode 100644 index 504ebaf9..00000000 --- a/stacks/arrayMove/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Brief: Make a function that moves an item from an index to another index. - */ -export default async function arrayMove(array, from, to) { - const newArray = [...array]; - const [movedItem] = newArray.splice(from, 1); - newArray.splice(to, 0, movedItem); - return newArray; -} diff --git a/stacks/callOpenAI/index.test.ts b/stacks/callOpenAI/index.test.ts deleted file mode 100644 index 2995b15a..00000000 --- a/stacks/callOpenAI/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import answerQuestionUsingOpenAI from '.'; - -test('callOpenAI correctly', async () => { - const question = 'what is the meaning of life?'; - const response = await answerQuestionUsingOpenAI(question); - console.log(response); -}); \ No newline at end of file diff --git a/stacks/callOpenAI/index.ts b/stacks/callOpenAI/index.ts deleted file mode 100644 index 76273a1d..00000000 --- a/stacks/callOpenAI/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import OpenAI from 'openai'; -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY -}); - -/** - * Brief: answer my question using OpenAI - */ -export default async function answerQuestionUsingOpenAI(input: string): Promise { - const response = await openai.chat.completions.create({ - messages: [{ role: 'user', content: input }], - model: 'gpt-3.5-turbo', - }); - - return response.choices[0].message.content ?? ''; -} - diff --git a/stacks/callOpenAIUsingLangchain/index.ts b/stacks/callOpenAIUsingLangchain/index.ts deleted file mode 100644 index f0dada14..00000000 --- a/stacks/callOpenAIUsingLangchain/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -require("dotenv").config(); -import { OpenAI } from "langchain/llms/openai"; - -const llm = new OpenAI({ - openAIApiKey: process.env.OPENAI_API_KEY, - temperature: 0.9, -}); - -/** - * Brief: call OpenAI using langchain - */ -export default async function callOpenAIUsingLangchain(question: string): Promise { - return await llm.predict(question); -} \ No newline at end of file diff --git a/stacks/callOpenAIUsingLangchain/package-lock.json b/stacks/callOpenAIUsingLangchain/package-lock.json deleted file mode 100644 index 5131d919..00000000 --- a/stacks/callOpenAIUsingLangchain/package-lock.json +++ /dev/null @@ -1,1124 +0,0 @@ -{ - "name": "callopenaiusinglangchain", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "callopenaiusinglangchain", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "axios": "^1.6.2", - "dotenv": "^16.3.1", - "langchain": "^0.0.201" - } - }, - "node_modules/@anthropic-ai/sdk": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.9.1.tgz", - "integrity": "sha512-wa1meQ2WSfoY8Uor3EdrJq0jTiZJoKoSii2ZVWRY1oN4Tlr5s59pADg9T79FTbPe1/se5c3pBeZgJL63wmuoBA==", - "dependencies": { - "@types/node": "^18.11.18", - "@types/node-fetch": "^2.6.4", - "abort-controller": "^3.0.0", - "agentkeepalive": "^4.2.1", - "digest-fetch": "^1.3.0", - "form-data-encoder": "1.7.2", - "formdata-node": "^4.3.2", - "node-fetch": "^2.6.7", - "web-streams-polyfill": "^3.2.1" - } - }, - "node_modules/@langchain/core": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.0.8.tgz", - "integrity": "sha512-v6Uuc+LwgX24QiThMU19+31o7ZZlsl58P6vpvvFac4jayeth4tKIYfc1zLWAKPpmkbLCirFRf73C23JrbuwF6w==", - "dependencies": { - "ansi-styles": "^5.0.0", - "camelcase": "6", - "decamelize": "1.2.0", - "js-tiktoken": "^1.0.8", - "langsmith": "^0.0.48", - "p-queue": "^6.6.2", - "p-retry": "4", - "uuid": "^9.0.0", - "zod": "^3.22.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@langchain/core/node_modules/langsmith": { - "version": "0.0.48", - "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.0.48.tgz", - "integrity": "sha512-s0hW8iZ90Q9XLTnDK0Pgee245URV3b1cXQjPDj5OKm1+KN7iSK1pKx+4CO7RcFLz58Ixe7Mt+mVcomYqUuryxQ==", - "dependencies": { - "@types/uuid": "^9.0.1", - "commander": "^10.0.1", - "p-queue": "^6.6.2", - "p-retry": "4", - "uuid": "^9.0.0" - }, - "bin": { - "langsmith": "dist/cli/main.cjs" - } - }, - "node_modules/@types/node": { - "version": "18.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.2.tgz", - "integrity": "sha512-6wzfBdbWpe8QykUkXBjtmO3zITA0A3FIjoy+in0Y2K4KrCiRhNYJIdwAPDffZ3G6GnaKaSLSEa9ZuORLfEoiwg==", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA==", - "dependencies": { - "@types/node": "*", - "form-data": "^4.0.0" - } - }, - "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" - }, - "node_modules/@types/uuid": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", - "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==" - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/agentkeepalive": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", - "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", - "dependencies": { - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/base-64": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz", - "integrity": "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/binary-search": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/binary-search/-/binary-search-1.3.6.tgz", - "integrity": "sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA==" - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", - "engines": { - "node": "*" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "engines": { - "node": ">=14" - } - }, - "node_modules/crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", - "engines": { - "node": "*" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/digest-fetch": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/digest-fetch/-/digest-fetch-1.3.0.tgz", - "integrity": "sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==", - "dependencies": { - "base-64": "^0.1.0", - "md5": "^2.3.0" - } - }, - "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" - }, - "node_modules/expr-eval": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expr-eval/-/expr-eval-2.0.2.tgz", - "integrity": "sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg==" - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "bin": { - "flat": "cli.js" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/form-data-encoder": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", - "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==" - }, - "node_modules/formdata-node": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", - "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", - "dependencies": { - "node-domexception": "1.0.0", - "web-streams-polyfill": "4.0.0-beta.3" - }, - "engines": { - "node": ">= 12.20" - } - }, - "node_modules/formdata-node/node_modules/web-streams-polyfill": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", - "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", - "engines": { - "node": ">= 14" - } - }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "dependencies": { - "ms": "^2.0.0" - } - }, - "node_modules/is-any-array": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-2.0.1.tgz", - "integrity": "sha512-UtilS7hLRu++wb/WBAw9bNuP1Eg04Ivn1vERJck8zJthEvXCBEBpGR/33u/xLKWEQf95803oalHrVDptcAvFdQ==" - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "node_modules/js-tiktoken": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.8.tgz", - "integrity": "sha512-r7XK3E9/I+SOrbAGqb39pyO/rHAS1diAOSRAvaaLfHgXjkUSK9AiSd+r84Vn2f/GvXJYRAxKj8NHrUvqlaH5qg==", - "dependencies": { - "base64-js": "^1.5.1" - } - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsonpointer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", - "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/langchain": { - "version": "0.0.201", - "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.201.tgz", - "integrity": "sha512-zbmKpH3zbCgzbBxBq/YBXKS9xTLqUzQoBqW2j7ctiVYwNq+wIGHef8YuVnDXlli6Wx0+3T2b4kTI8506xkriMg==", - "dependencies": { - "@anthropic-ai/sdk": "^0.9.1", - "@langchain/core": "~0.0.8", - "binary-extensions": "^2.2.0", - "expr-eval": "^2.0.2", - "flat": "^5.0.2", - "js-tiktoken": "^1.0.7", - "js-yaml": "^4.1.0", - "jsonpointer": "^5.0.1", - "langchainhub": "~0.0.6", - "langsmith": "~0.0.48", - "ml-distance": "^4.0.0", - "openai": "^4.19.0", - "openapi-types": "^12.1.3", - "p-retry": "4", - "uuid": "^9.0.0", - "yaml": "^2.2.1", - "zod": "^3.22.3", - "zod-to-json-schema": "3.20.3" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@aws-crypto/sha256-js": "^5.0.0", - "@aws-sdk/client-bedrock-runtime": "^3.422.0", - "@aws-sdk/client-dynamodb": "^3.310.0", - "@aws-sdk/client-kendra": "^3.352.0", - "@aws-sdk/client-lambda": "^3.310.0", - "@aws-sdk/client-s3": "^3.310.0", - "@aws-sdk/client-sagemaker-runtime": "^3.310.0", - "@aws-sdk/client-sfn": "^3.310.0", - "@aws-sdk/credential-provider-node": "^3.388.0", - "@azure/storage-blob": "^12.15.0", - "@clickhouse/client": "^0.2.5", - "@cloudflare/ai": "^1.0.12", - "@elastic/elasticsearch": "^8.4.0", - "@getmetal/metal-sdk": "*", - "@getzep/zep-js": "^0.9.0", - "@gomomento/sdk": "^1.51.1", - "@gomomento/sdk-core": "^1.51.1", - "@gomomento/sdk-web": "^1.51.1", - "@google-ai/generativelanguage": "^0.2.1", - "@google-cloud/storage": "^6.10.1", - "@gradientai/nodejs-sdk": "^1.2.0", - "@huggingface/inference": "^2.6.4", - "@mozilla/readability": "*", - "@notionhq/client": "^2.2.10", - "@opensearch-project/opensearch": "*", - "@pinecone-database/pinecone": "^1.1.0", - "@planetscale/database": "^1.8.0", - "@qdrant/js-client-rest": "^1.2.0", - "@raycast/api": "^1.55.2", - "@rockset/client": "^0.9.1", - "@smithy/eventstream-codec": "^2.0.5", - "@smithy/protocol-http": "^3.0.6", - "@smithy/signature-v4": "^2.0.10", - "@smithy/util-utf8": "^2.0.0", - "@supabase/postgrest-js": "^1.1.1", - "@supabase/supabase-js": "^2.10.0", - "@tensorflow-models/universal-sentence-encoder": "*", - "@tensorflow/tfjs-converter": "*", - "@tensorflow/tfjs-core": "*", - "@upstash/redis": "^1.20.6", - "@vercel/kv": "^0.2.3", - "@vercel/postgres": "^0.5.0", - "@writerai/writer-sdk": "^0.40.2", - "@xata.io/client": "^0.25.1", - "@xenova/transformers": "^2.5.4", - "@zilliz/milvus2-sdk-node": ">=2.2.7", - "apify-client": "^2.7.1", - "assemblyai": "^2.0.2", - "axios": "*", - "cassandra-driver": "^4.7.2", - "cheerio": "^1.0.0-rc.12", - "chromadb": "*", - "closevector-common": "0.1.0-alpha.1", - "closevector-node": "0.1.0-alpha.10", - "closevector-web": "0.1.0-alpha.16", - "cohere-ai": ">=6.0.0", - "convex": "^1.3.1", - "d3-dsv": "^2.0.0", - "epub2": "^3.0.1", - "faiss-node": "^0.5.1", - "fast-xml-parser": "^4.2.7", - "firebase-admin": "^11.9.0", - "google-auth-library": "^8.9.0", - "googleapis": "^126.0.1", - "hnswlib-node": "^1.4.2", - "html-to-text": "^9.0.5", - "ignore": "^5.2.0", - "ioredis": "^5.3.2", - "jsdom": "*", - "llmonitor": "^0.5.9", - "lodash": "^4.17.21", - "mammoth": "*", - "mongodb": "^5.2.0", - "mysql2": "^3.3.3", - "neo4j-driver": "*", - "node-llama-cpp": "*", - "notion-to-md": "^3.1.0", - "officeparser": "^4.0.4", - "pdf-parse": "1.1.1", - "peggy": "^3.0.2", - "pg": "^8.11.0", - "pg-copy-streams": "^6.0.5", - "pickleparser": "^0.2.1", - "playwright": "^1.32.1", - "portkey-ai": "^0.1.11", - "puppeteer": "^19.7.2", - "pyodide": "^0.24.1", - "redis": "^4.6.4", - "replicate": "^0.18.0", - "sonix-speech-recognition": "^2.1.1", - "srt-parser-2": "^1.2.2", - "typeorm": "^0.3.12", - "typesense": "^1.5.3", - "usearch": "^1.1.1", - "vectordb": "^0.1.4", - "voy-search": "0.6.2", - "weaviate-ts-client": "^1.4.0", - "web-auth-library": "^1.0.3", - "ws": "^8.14.2", - "youtube-transcript": "^1.0.6", - "youtubei.js": "^5.8.0" - }, - "peerDependenciesMeta": { - "@aws-crypto/sha256-js": { - "optional": true - }, - "@aws-sdk/client-bedrock-runtime": { - "optional": true - }, - "@aws-sdk/client-dynamodb": { - "optional": true - }, - "@aws-sdk/client-kendra": { - "optional": true - }, - "@aws-sdk/client-lambda": { - "optional": true - }, - "@aws-sdk/client-s3": { - "optional": true - }, - "@aws-sdk/client-sagemaker-runtime": { - "optional": true - }, - "@aws-sdk/client-sfn": { - "optional": true - }, - "@aws-sdk/credential-provider-node": { - "optional": true - }, - "@azure/storage-blob": { - "optional": true - }, - "@clickhouse/client": { - "optional": true - }, - "@cloudflare/ai": { - "optional": true - }, - "@elastic/elasticsearch": { - "optional": true - }, - "@getmetal/metal-sdk": { - "optional": true - }, - "@getzep/zep-js": { - "optional": true - }, - "@gomomento/sdk": { - "optional": true - }, - "@gomomento/sdk-core": { - "optional": true - }, - "@gomomento/sdk-web": { - "optional": true - }, - "@google-ai/generativelanguage": { - "optional": true - }, - "@google-cloud/storage": { - "optional": true - }, - "@gradientai/nodejs-sdk": { - "optional": true - }, - "@huggingface/inference": { - "optional": true - }, - "@mozilla/readability": { - "optional": true - }, - "@notionhq/client": { - "optional": true - }, - "@opensearch-project/opensearch": { - "optional": true - }, - "@pinecone-database/pinecone": { - "optional": true - }, - "@planetscale/database": { - "optional": true - }, - "@qdrant/js-client-rest": { - "optional": true - }, - "@raycast/api": { - "optional": true - }, - "@rockset/client": { - "optional": true - }, - "@smithy/eventstream-codec": { - "optional": true - }, - "@smithy/protocol-http": { - "optional": true - }, - "@smithy/signature-v4": { - "optional": true - }, - "@smithy/util-utf8": { - "optional": true - }, - "@supabase/postgrest-js": { - "optional": true - }, - "@supabase/supabase-js": { - "optional": true - }, - "@tensorflow-models/universal-sentence-encoder": { - "optional": true - }, - "@tensorflow/tfjs-converter": { - "optional": true - }, - "@tensorflow/tfjs-core": { - "optional": true - }, - "@upstash/redis": { - "optional": true - }, - "@vercel/kv": { - "optional": true - }, - "@vercel/postgres": { - "optional": true - }, - "@writerai/writer-sdk": { - "optional": true - }, - "@xata.io/client": { - "optional": true - }, - "@xenova/transformers": { - "optional": true - }, - "@zilliz/milvus2-sdk-node": { - "optional": true - }, - "apify-client": { - "optional": true - }, - "assemblyai": { - "optional": true - }, - "axios": { - "optional": true - }, - "cassandra-driver": { - "optional": true - }, - "cheerio": { - "optional": true - }, - "chromadb": { - "optional": true - }, - "closevector-common": { - "optional": true - }, - "closevector-node": { - "optional": true - }, - "closevector-web": { - "optional": true - }, - "cohere-ai": { - "optional": true - }, - "convex": { - "optional": true - }, - "d3-dsv": { - "optional": true - }, - "epub2": { - "optional": true - }, - "faiss-node": { - "optional": true - }, - "fast-xml-parser": { - "optional": true - }, - "firebase-admin": { - "optional": true - }, - "google-auth-library": { - "optional": true - }, - "googleapis": { - "optional": true - }, - "hnswlib-node": { - "optional": true - }, - "html-to-text": { - "optional": true - }, - "ignore": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "jsdom": { - "optional": true - }, - "llmonitor": { - "optional": true - }, - "lodash": { - "optional": true - }, - "mammoth": { - "optional": true - }, - "mongodb": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "neo4j-driver": { - "optional": true - }, - "node-llama-cpp": { - "optional": true - }, - "notion-to-md": { - "optional": true - }, - "officeparser": { - "optional": true - }, - "pdf-parse": { - "optional": true - }, - "peggy": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-copy-streams": { - "optional": true - }, - "pickleparser": { - "optional": true - }, - "playwright": { - "optional": true - }, - "portkey-ai": { - "optional": true - }, - "puppeteer": { - "optional": true - }, - "pyodide": { - "optional": true - }, - "redis": { - "optional": true - }, - "replicate": { - "optional": true - }, - "sonix-speech-recognition": { - "optional": true - }, - "srt-parser-2": { - "optional": true - }, - "typeorm": { - "optional": true - }, - "typesense": { - "optional": true - }, - "usearch": { - "optional": true - }, - "vectordb": { - "optional": true - }, - "voy-search": { - "optional": true - }, - "weaviate-ts-client": { - "optional": true - }, - "web-auth-library": { - "optional": true - }, - "ws": { - "optional": true - }, - "youtube-transcript": { - "optional": true - }, - "youtubei.js": { - "optional": true - } - } - }, - "node_modules/langchainhub": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/langchainhub/-/langchainhub-0.0.6.tgz", - "integrity": "sha512-SW6105T+YP1cTe0yMf//7kyshCgvCTyFBMTgH2H3s9rTAR4e+78DA/BBrUL/Mt4Q5eMWui7iGuAYb3pgGsdQ9w==" - }, - "node_modules/langsmith": { - "version": "0.0.49", - "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.0.49.tgz", - "integrity": "sha512-TC2RkjDizxtubClLNjLkB0m53NHtom9LHIhbdRYJ5O6gqUpcXkN/pefb8w734lBp9VYfnYBk/JJ8AiCq+ooeDQ==", - "dependencies": { - "@types/uuid": "^9.0.1", - "commander": "^10.0.1", - "p-queue": "^6.6.2", - "p-retry": "4", - "uuid": "^9.0.0" - }, - "bin": { - "langsmith": "dist/cli/main.cjs" - } - }, - "node_modules/md5": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", - "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", - "dependencies": { - "charenc": "0.0.2", - "crypt": "0.0.2", - "is-buffer": "~1.1.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ml-array-mean": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/ml-array-mean/-/ml-array-mean-1.1.6.tgz", - "integrity": "sha512-MIdf7Zc8HznwIisyiJGRH9tRigg3Yf4FldW8DxKxpCCv/g5CafTw0RRu51nojVEOXuCQC7DRVVu5c7XXO/5joQ==", - "dependencies": { - "ml-array-sum": "^1.1.6" - } - }, - "node_modules/ml-array-sum": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/ml-array-sum/-/ml-array-sum-1.1.6.tgz", - "integrity": "sha512-29mAh2GwH7ZmiRnup4UyibQZB9+ZLyMShvt4cH4eTK+cL2oEMIZFnSyB3SS8MlsTh6q/w/yh48KmqLxmovN4Dw==", - "dependencies": { - "is-any-array": "^2.0.0" - } - }, - "node_modules/ml-distance": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/ml-distance/-/ml-distance-4.0.1.tgz", - "integrity": "sha512-feZ5ziXs01zhyFUUUeZV5hwc0f5JW0Sh0ckU1koZe/wdVkJdGxcP06KNQuF0WBTj8FttQUzcvQcpcrOp/XrlEw==", - "dependencies": { - "ml-array-mean": "^1.1.6", - "ml-distance-euclidean": "^2.0.0", - "ml-tree-similarity": "^1.0.0" - } - }, - "node_modules/ml-distance-euclidean": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ml-distance-euclidean/-/ml-distance-euclidean-2.0.0.tgz", - "integrity": "sha512-yC9/2o8QF0A3m/0IXqCTXCzz2pNEzvmcE/9HFKOZGnTjatvBbsn4lWYJkxENkA4Ug2fnYl7PXQxnPi21sgMy/Q==" - }, - "node_modules/ml-tree-similarity": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ml-tree-similarity/-/ml-tree-similarity-1.0.0.tgz", - "integrity": "sha512-XJUyYqjSuUQkNQHMscr6tcjldsOoAekxADTplt40QKfwW6nd++1wHWV9AArl0Zvw/TIHgNaZZNvr8QGvE8wLRg==", - "dependencies": { - "binary-search": "^1.3.5", - "num-sort": "^2.0.0" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/num-sort": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/num-sort/-/num-sort-2.1.0.tgz", - "integrity": "sha512-1MQz1Ed8z2yckoBeSfkQHHO9K1yDRxxtotKSJ9yvcTUUxSvfvzEq5GwBrjjHEpMlq/k5gvXdmJ1SbYxWtpNoVg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/openai": { - "version": "4.20.1", - "resolved": "https://registry.npmjs.org/openai/-/openai-4.20.1.tgz", - "integrity": "sha512-Dd3q8EvINfganZFtg6V36HjrMaihqRgIcKiHua4Nq9aw/PxOP48dhbsk8x5klrxajt5Lpnc1KTOG5i1S6BKAJA==", - "dependencies": { - "@types/node": "^18.11.18", - "@types/node-fetch": "^2.6.4", - "abort-controller": "^3.0.0", - "agentkeepalive": "^4.2.1", - "digest-fetch": "^1.3.0", - "form-data-encoder": "1.7.2", - "formdata-node": "^4.3.2", - "node-fetch": "^2.6.7", - "web-streams-polyfill": "^3.2.1" - }, - "bin": { - "openai": "bin/cli" - } - }, - "node_modules/openapi-types": { - "version": "12.1.3", - "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", - "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==" - }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "engines": { - "node": ">=4" - } - }, - "node_modules/p-queue": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", - "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", - "dependencies": { - "eventemitter3": "^4.0.4", - "p-timeout": "^3.2.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", - "dependencies": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "dependencies": { - "p-finally": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "engines": { - "node": ">= 4" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/yaml": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", - "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", - "engines": { - "node": ">= 14" - } - }, - "node_modules/zod": { - "version": "3.22.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", - "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-to-json-schema": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.20.3.tgz", - "integrity": "sha512-/Q3wnyxAfCt94ZcrGiXXoiAfRqasxl9CX64LZ9fj+4dKH68zulUtU0uk1WMxQPfAxQ0ZI70dKzcoW7hHj+DwSQ==", - "peerDependencies": { - "zod": "^3.20.0" - } - } - } -} diff --git a/stacks/callOpenAIUsingLangchain/package.json b/stacks/callOpenAIUsingLangchain/package.json deleted file mode 100644 index 5d8222c0..00000000 --- a/stacks/callOpenAIUsingLangchain/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "callopenaiusinglangchain", - "version": "1.0.0", - "description": "", - "main": "index.ts", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "axios": "^1.6.2", - "dotenv": "^16.3.1", - "langchain": "^0.0.201" - } -} diff --git a/stacks/callOpenAIUsingLangchain/test.ts b/stacks/callOpenAIUsingLangchain/test.ts deleted file mode 100644 index 0c95190d..00000000 --- a/stacks/callOpenAIUsingLangchain/test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import callOpenAIUsingLangchain from '../stacks/callOpenAIUsingLangchain'; -async function main() { - const response = await callOpenAIUsingLangchain("What would be a good company name for a company that makes colorful socks?") - console.log(response) -}; - -main() \ No newline at end of file diff --git a/stacks/callOpenAIUsingLangchain/test.txt b/stacks/callOpenAIUsingLangchain/test.txt deleted file mode 100644 index b688bfb8..00000000 --- a/stacks/callOpenAIUsingLangchain/test.txt +++ /dev/null @@ -1,7 +0,0 @@ -import callOpenAIUsingLangchain from "." - -async function main() { - const response = await stack("call OpenAI using langchain") - console.log(response) -}; -main() \ No newline at end of file diff --git a/stacks/callOrca2/index.test.ts b/stacks/callOrca2/index.test.ts deleted file mode 100644 index 40a55853..00000000 --- a/stacks/callOrca2/index.test.ts +++ /dev/null @@ -1,4 +0,0 @@ -import callOrcaModelAndGetResponse from '../stacks/callOrcaModelAndGetResponse'; -test('callOrca2 correctly', async () => { - await callOrcaModelAndGetResponse("Tell me some fun facts about orcas") -}); diff --git a/stacks/callOrca2/index.test.txt b/stacks/callOrca2/index.test.txt deleted file mode 100644 index 84183b26..00000000 --- a/stacks/callOrca2/index.test.txt +++ /dev/null @@ -1,3 +0,0 @@ -test('callOrca2 correctly', async () => { - stack("call the orca 2 model and get back a response") -}); diff --git a/stacks/callOrca2/index.ts b/stacks/callOrca2/index.ts deleted file mode 100644 index e5980218..00000000 --- a/stacks/callOrca2/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import Replicate from "replicate" -require("dotenv").config(); -const replicate = new Replicate({ - auth: process.env.REPLICATE_API_TOKEN as string, -}); - -/** - * Brief: call Orca2 and return its response\, using @replicate - */ -export default async function callOrca2(question: string): Promise { - try { - const response = await replicate.run( - "mattt/orca-2-13b:dac511fd566228a0dd189e95318523fccb6ba175f9f0ecd29214b579b00b64c7", - { - input: { - top_k: 50, - top_p: 1, - prompt: question, - temperature: 1, - max_new_tokens: 256 - } - } - ); - - // Assuming the actual array of strings is under the 'result' property of the response - if (response && Array.isArray(response)) { - return response.join('') - } else { - throw new Error('Unexpected response structure'); - } - } catch (error) { - console.error('Error querying Replicate:', error); - throw error - } -} \ No newline at end of file diff --git a/stacks/cancelPredictionInReplicate/index.test.ts b/stacks/cancelPredictionInReplicate/index.test.ts deleted file mode 100644 index e90b2a39..00000000 --- a/stacks/cancelPredictionInReplicate/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ - -import cancelPrediction from '.'; - -test('Cancel a predicition in replicate', async () => { - const id = 'qrrkkhdbgxdj7udh4ykhv3n7bi' - const response = await cancelPrediction({ id }); - expect(response.status).toBe('succeeded'); -}); \ No newline at end of file diff --git a/stacks/cancelPredictionInReplicate/index.test.txt b/stacks/cancelPredictionInReplicate/index.test.txt deleted file mode 100644 index 0ec280d6..00000000 --- a/stacks/cancelPredictionInReplicate/index.test.txt +++ /dev/null @@ -1,5 +0,0 @@ -test('Cancel a predicition in replicate', async () => { - const id = 'qrrkkhdbgxdj7udh4ykhv3n7bi' - const response = stack('cancel a prediction in replicate', { in: id, out: ''}); - expect(response.status).toBe('succeeded'); -}); \ No newline at end of file diff --git a/stacks/cancelPredictionInReplicate/index.ts b/stacks/cancelPredictionInReplicate/index.ts deleted file mode 100644 index 5fb1c799..00000000 --- a/stacks/cancelPredictionInReplicate/index.ts +++ /dev/null @@ -1,25 +0,0 @@ - -import axios from 'axios'; -/** - * Brief: Cancel a predicition in replicate - */ - -type predictionType = { - id: string - -} -export default async function cancelPrediction({ id }: predictionType): Promise { - try { - - const config = { - headers: { - 'Authorization': `Token ${process.env.REPLICATE_API_TOKEN}`, - 'Content-Type': 'application/json' - } - }; - const response = await axios.post(`https://api.replicate.com/v1/predictions/${id}/cancel`, null, config); - return response.data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/createABucketOnSupabase/index.test.ts b/stacks/createABucketOnSupabase/index.test.ts deleted file mode 100644 index e2a9f1e1..00000000 --- a/stacks/createABucketOnSupabase/index.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import createABucketOnSupabase from '.'; - - -test('Create a bucket using supabase', async () => { - const response = await createABucketOnSupabase({ - bucket_name: 'bucket_name', options: { - public: false, - allowedMimeTypes: ['image/jpg'], - fileSizeLimit: 1024 - } - }) - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/createABucketOnSupabase/index.test.txt b/stacks/createABucketOnSupabase/index.test.txt deleted file mode 100644 index 2e839075..00000000 --- a/stacks/createABucketOnSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Create a bucket using supabase', async () => { - const response = stack('Create a bucket using supabase') - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/createABucketOnSupabase/index.ts b/stacks/createABucketOnSupabase/index.ts deleted file mode 100644 index 47aae27e..00000000 --- a/stacks/createABucketOnSupabase/index.ts +++ /dev/null @@ -1,25 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Fetch data from table in SUPABASE in CSV Format - */ -type options = { - public: boolean; - fileSizeLimit?: string | number | null | undefined; - allowedMimeTypes?: string[] | null | undefined; -} -export default async function createABucketOnSupabase({ bucket_name, options }: { bucket_name: string, options: options }): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - const { data, error } = await supabase - .storage - .createBucket(bucket_name, options) - console.log(error); - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/createAModelInReplicate/index.test.ts b/stacks/createAModelInReplicate/index.test.ts deleted file mode 100644 index 8b70cb55..00000000 --- a/stacks/createAModelInReplicate/index.test.ts +++ /dev/null @@ -1,14 +0,0 @@ - -import createNewPrediction from '.'; - -test('Create a model in replicate', async () => { - const data = { - owner: "pagebook1", - name: "my-model2", - description: "An example model", - visibility: "public", - hardware: "cpu" - }; - const response = await createNewPrediction({ data }); - expect(response.name).toBe(data.name); -}); \ No newline at end of file diff --git a/stacks/createAModelInReplicate/index.test.txt b/stacks/createAModelInReplicate/index.test.txt deleted file mode 100644 index cf099148..00000000 --- a/stacks/createAModelInReplicate/index.test.txt +++ /dev/null @@ -1,11 +0,0 @@ -test('Create a model in replicate', async () => { - const data = { - owner: "pagebook1", - name: "my-model2", - description: "An example model", - visibility: "public", - hardware: "cpu" - }; - const response = stack('Create a model in replicate', { in: data, out: 'data but output'}) - expect(response.name).toBe(data.name); -}); \ No newline at end of file diff --git a/stacks/createAModelInReplicate/index.ts b/stacks/createAModelInReplicate/index.ts deleted file mode 100644 index d46d53d5..00000000 --- a/stacks/createAModelInReplicate/index.ts +++ /dev/null @@ -1,29 +0,0 @@ - -import axios from 'axios'; -/** - * Brief: Create a model in replicate - */ - -interface modelInterface { - data: { - owner: string, - name: string, - description?: string, - visibility: string, - hardware: string - } -} -export default async function createNewPrediction({ data }: modelInterface): Promise { - try { - const config = { - headers: { - 'Authorization': 'Token r8_NjJI0tpo0pG1EkO8xJ9KEmrwYd5U2vB45cmmj', - 'Content-Type': 'application/json' - } - }; - const response = await axios.post('https://api.replicate.com/v1/models', data, config) - return response.data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/createNewPredictionUsingReplicate/index.test.ts b/stacks/createNewPredictionUsingReplicate/index.test.ts deleted file mode 100644 index 930acbcb..00000000 --- a/stacks/createNewPredictionUsingReplicate/index.test.ts +++ /dev/null @@ -1,13 +0,0 @@ - -import createNewPrediction from '.'; - -test('Create a new predicition in replicate', async () => { - const data = { - "version": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa", - "input": { - "text": "Alice" - } - } - const response = await createNewPrediction({ data }); - expect(response.statusText).toBe('Created'); -}); \ No newline at end of file diff --git a/stacks/createNewPredictionUsingReplicate/index.test.txt b/stacks/createNewPredictionUsingReplicate/index.test.txt deleted file mode 100644 index 044ebb4d..00000000 --- a/stacks/createNewPredictionUsingReplicate/index.test.txt +++ /dev/null @@ -1,10 +0,0 @@ -test('Create a new predicition in replicate', async () => { - const data = { - "version": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa", - "input": { - "text": "Alice" - } - } - const response = stack('create a new prediction in replicate', {in: data, out: ''}) - expect(response.statusText).toBe('Created'); -}); \ No newline at end of file diff --git a/stacks/createNewPredictionUsingReplicate/index.ts b/stacks/createNewPredictionUsingReplicate/index.ts deleted file mode 100644 index af6c9a8d..00000000 --- a/stacks/createNewPredictionUsingReplicate/index.ts +++ /dev/null @@ -1,29 +0,0 @@ - -import axios from 'axios'; -/** - * Brief: Create a new predicition in replicate - */ - -interface predictionModel { - data: { - version: string, - input: { - text: string - } - } -} -export default async function createNewPrediction({ data }: predictionModel): Promise { - try { - - const config = { - headers: { - 'Authorization': `Token ${process.env.REPLICATE_API_TOKEN}`, - 'Content-Type': 'application/json' - } - }; - const response = await axios.post('https://api.replicate.com/v1/predictions', data, config); - return response - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/createRandomUser/index.test.ts b/stacks/createRandomUser/index.test.ts deleted file mode 100644 index 9c5ebce2..00000000 --- a/stacks/createRandomUser/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import createRandomUser from '../../stacks/createRandomUser'; - -test('Create a random user using the radom.me api', async () => { - - const response = await createRandomUser(); - - expect(response.dob.age).toBeTruthy(); -}); \ No newline at end of file diff --git a/stacks/createRandomUser/index.test.txt b/stacks/createRandomUser/index.test.txt deleted file mode 100644 index 71c47381..00000000 --- a/stacks/createRandomUser/index.test.txt +++ /dev/null @@ -1,7 +0,0 @@ -test('Create a random user using the radom.me api', async () => { - - const response = stack("Create a random user using the radom.me api"); - - expect(response).toEqual('September 8, 2022'); -}); - diff --git a/stacks/createRandomUser/index.ts b/stacks/createRandomUser/index.ts deleted file mode 100644 index 4a020115..00000000 --- a/stacks/createRandomUser/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import axios from 'axios'; - -/** - * Brief: Create a random user using the random.me api - */ -export default async function createRandomUser(): Promise { - try { - const response = await axios.get('https://randomuser.me/api/'); - return response.data.results[0]; - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/createUserUsingAdminAuth/index.test.ts b/stacks/createUserUsingAdminAuth/index.test.ts deleted file mode 100644 index de0849fc..00000000 --- a/stacks/createUserUsingAdminAuth/index.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import createUser from '.'; - -test('Create a new user for the project using supabase Admin AUTH', async () => { - const data = { - email: 'user@dummy1.com', - password: 'password', - user_metadata: { name: 'Yoda' } - } - const response = await createUser({userData:data}); - expect(response.user).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/createUserUsingAdminAuth/index.test.txt b/stacks/createUserUsingAdminAuth/index.test.txt deleted file mode 100644 index 5b77e486..00000000 --- a/stacks/createUserUsingAdminAuth/index.test.txt +++ /dev/null @@ -1,9 +0,0 @@ -test('Create a new user for the project using supabase Admin AUTH', async () => { - const data = { - email: 'user@dummy1.com', - password: 'password', - user_metadata: { name: 'Yoda' } - } - const response = stack("Create a new user for the project using supabase Admin AUTH); - expect(response.user).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/createUserUsingAdminAuth/index.ts b/stacks/createUserUsingAdminAuth/index.ts deleted file mode 100644 index 4c8cc278..00000000 --- a/stacks/createUserUsingAdminAuth/index.ts +++ /dev/null @@ -1,25 +0,0 @@ - -import { AdminUserAttributes, createClient } from '@supabase/supabase-js' -require('dotenv').config(); - -/** - * Brief: Create a new user for the project using supabase Admin AUTH - */ -export default async function createUser({ userData }: { userData: AdminUserAttributes }): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseServiceRole = String(process.env.SUPABASE_SERVICE_ROLE) - const supabase = createClient(supabaseUrl, supabaseServiceRole, { - auth: { - autoRefreshToken: false, - persistSession: false - } - }) - - - const { data } = await supabase.auth.admin.createUser(userData) - return data; - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/defineWordusingOpenAI/index.ts b/stacks/defineWordusingOpenAI/index.ts deleted file mode 100644 index 356ae90f..00000000 --- a/stacks/defineWordusingOpenAI/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import OpenAI from 'openai'; - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY -}); - -/** - * Brief: Anwer my question using openai and give me consistent results - */ -export default async function defineWordUsingOpenAI(input: string): Promise { - const response = await openai.chat.completions.create({ - messages: [{ role: 'system', content: 'I am a helpful assistant.'}, { role: 'user', content: input }], - model: 'gpt-3.5-turbo', - temperature: 0 - }); - return response['choices'][0]['message']['content']; -} diff --git a/stacks/deleteOneItemInHistoryInElevelLabs/index.test.ts b/stacks/deleteOneItemInHistoryInElevelLabs/index.test.ts deleted file mode 100644 index 95439338..00000000 --- a/stacks/deleteOneItemInHistoryInElevelLabs/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import getItemByIdElevelLabs from '.'; - -test('Delete one item from history in elevenlabs', async () => { - const response = await getItemByIdElevelLabs({id:'qs777EBPUP6ZjL9B3MPy'}); - expect(response.detail.status).toBeTruthy() -}); \ No newline at end of file diff --git a/stacks/deleteOneItemInHistoryInElevelLabs/index.test.txt b/stacks/deleteOneItemInHistoryInElevelLabs/index.test.txt deleted file mode 100644 index 47a48dd2..00000000 --- a/stacks/deleteOneItemInHistoryInElevelLabs/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Get one item from history in elevenlabs', async () => { - const response = stack('Delete one item from history in elevenlabs') - expect(response.detail.status).toBeTruthy() -}); \ No newline at end of file diff --git a/stacks/deleteOneItemInHistoryInElevelLabs/index.ts b/stacks/deleteOneItemInHistoryInElevelLabs/index.ts deleted file mode 100644 index f1263cb6..00000000 --- a/stacks/deleteOneItemInHistoryInElevelLabs/index.ts +++ /dev/null @@ -1,16 +0,0 @@ - -/** - * Brief: Delete one item from history in elevenlabs - */ - -export default async function deleteItemByIdElevelLabs({id}:{id:string}): Promise { - try { - const apiKey = process.env.ELEVENLABS_API_KEY; - const options:RequestInit = {method: 'DELETE', headers: [['xi-api-key',String(apiKey)]]}; - - const response = await fetch(`https://api.elevenlabs.io/v1/history/${id}`, options) - return response.json() - } catch (error) { - console.error(error); - } -} diff --git a/stacks/deleteUserUsingAdminAuth/index.test.ts b/stacks/deleteUserUsingAdminAuth/index.test.ts deleted file mode 100644 index 0f2ada52..00000000 --- a/stacks/deleteUserUsingAdminAuth/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import deleteUser from '.'; - -test('Delete user from the supabase project using supabase Admin AUTH', async () => { - - const response = await deleteUser({ id: '18e0e0d9-74c8-4aae-b173-f47e9f6e0112' }); - console.log(response) - expect(response.user).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/deleteUserUsingAdminAuth/index.test.txt b/stacks/deleteUserUsingAdminAuth/index.test.txt deleted file mode 100644 index 930d6978..00000000 --- a/stacks/deleteUserUsingAdminAuth/index.test.txt +++ /dev/null @@ -1,6 +0,0 @@ -test('Delete user from the supabase project using supabase Admin AUTH', async () => { - - const response = stack('Delete user from the supabase project using supabase Admin AUTH'); - console.log(response) - expect(response.user).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/deleteUserUsingAdminAuth/index.ts b/stacks/deleteUserUsingAdminAuth/index.ts deleted file mode 100644 index 1a9345f1..00000000 --- a/stacks/deleteUserUsingAdminAuth/index.ts +++ /dev/null @@ -1,26 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' -require('dotenv').config(); - -/** - * Brief: Delete user from the supabase project using supabase Admin AUTH - */ -export default async function deleteUser({ id }: { id: string }): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseServiceRole = String(process.env.SUPABASE_SERVICE_ROLE) - const supabase = createClient(supabaseUrl, supabaseServiceRole, { - auth: { - autoRefreshToken: false, - persistSession: false - } - }) - - const { data } = await supabase.auth.admin.deleteUser( - id - ) - return data; - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/deleteVoiceByIDElevenLabs/index.test.ts b/stacks/deleteVoiceByIDElevenLabs/index.test.ts deleted file mode 100644 index 9b3e5307..00000000 --- a/stacks/deleteVoiceByIDElevenLabs/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import deleteVoiceFromVoiceLab from '.'; - -test('Delete voice from voice library in elevenlabs', async () => { - const response = await deleteVoiceFromVoiceLab({id:'6KC787jmbt8cNR3hbfCJ'}); - expect(response.status).toBe('ok') -}); \ No newline at end of file diff --git a/stacks/deleteVoiceByIDElevenLabs/index.test.txt b/stacks/deleteVoiceByIDElevenLabs/index.test.txt deleted file mode 100644 index 300ccd5a..00000000 --- a/stacks/deleteVoiceByIDElevenLabs/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Delete voice from voice library in elevenlabs', async () => { - const response = stack('Delete voice from voice library in elevenlabs') - expect(response.status).toBe('ok') -}); \ No newline at end of file diff --git a/stacks/deleteVoiceByIDElevenLabs/index.ts b/stacks/deleteVoiceByIDElevenLabs/index.ts deleted file mode 100644 index db09ddfc..00000000 --- a/stacks/deleteVoiceByIDElevenLabs/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -/** - * Brief: Delete voice from voice library in elevenlabs - */ - -export default async function deleteVoiceFromVoiceLab({id}:{id:string}): Promise { - try { - const apiKey = process.env.ELEVENLABS_API_KEY; - const options:RequestInit = {method: 'DELETE', headers: [['xi-api-key',String(apiKey)]]}; - const response = await fetch(`https://api.elevenlabs.io/v1/voices/${id}`, options) - return response.json() - } catch (error) { - console.error(error); - } -} diff --git a/stacks/fetchAllDataFromTableUsingSupabase/index.test.txt b/stacks/fetchAllDataFromTableUsingSupabase/index.test.txt deleted file mode 100644 index 642f6a68..00000000 --- a/stacks/fetchAllDataFromTableUsingSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Fetch all data from the table using supabase client', async () => { - const response = stack('Fetch all data from the table using supabase client'); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/fetchAllDataFromTableUsingSupabase/index.ts b/stacks/fetchAllDataFromTableUsingSupabase/index.ts deleted file mode 100644 index 7e3dad8f..00000000 --- a/stacks/fetchAllDataFromTableUsingSupabase/index.ts +++ /dev/null @@ -1,19 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Fetch all data from the table using supabase - */ -export default async function fetchDataFromTableUsingSupabase(): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - const { data } = await supabase - .from('your_table') - .select('*') - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/fetchDataFromTableInCSVFormat/index.test.ts b/stacks/fetchDataFromTableInCSVFormat/index.test.ts deleted file mode 100644 index d73d15f4..00000000 --- a/stacks/fetchDataFromTableInCSVFormat/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import fetchDataFromTableInCSVUsingSupabase from '.'; - - -test('Fetch data from table in SUPABASE in CSV Format', async () => { - const response = await fetchDataFromTableInCSVUsingSupabase({table_name:'your_table'}); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/fetchDataFromTableInCSVFormat/index.test.txt b/stacks/fetchDataFromTableInCSVFormat/index.test.txt deleted file mode 100644 index c1531601..00000000 --- a/stacks/fetchDataFromTableInCSVFormat/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Fetch data from table in SUPABASE in CSV Format', async () => { - const response = stack('Fetch data from table in SUPABASE in CSV Format') - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/fetchDataFromTableInCSVFormat/index.ts b/stacks/fetchDataFromTableInCSVFormat/index.ts deleted file mode 100644 index 5e29533c..00000000 --- a/stacks/fetchDataFromTableInCSVFormat/index.ts +++ /dev/null @@ -1,20 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Fetch data from table in SUPABASE in CSV Format - */ -export default async function fetchDataFromTableInCSVUsingSupabase({ table_name }: { table_name: string }): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - const { data } = await supabase - .from(table_name) - .select() - .csv() - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/fetchDataFromTableUsingSupabase/index.test.ts b/stacks/fetchDataFromTableUsingSupabase/index.test.ts deleted file mode 100644 index 95d1ae31..00000000 --- a/stacks/fetchDataFromTableUsingSupabase/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import fetchDataFromTableUsingSupabase from '.'; - - -test('Fetch data from table using supabase client', async () => { - const response = await fetchDataFromTableUsingSupabase({table_name:'your_table', filter:'*'}); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/fetchDataFromTableUsingSupabase/index.test.txt b/stacks/fetchDataFromTableUsingSupabase/index.test.txt deleted file mode 100644 index 9113a7b9..00000000 --- a/stacks/fetchDataFromTableUsingSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Fetch data from table using supabase client', async () => { - const response = stack('Fetch data from table using supabase client'); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/fetchDataFromTableUsingSupabase/index.ts b/stacks/fetchDataFromTableUsingSupabase/index.ts deleted file mode 100644 index 6a644b2f..00000000 --- a/stacks/fetchDataFromTableUsingSupabase/index.ts +++ /dev/null @@ -1,19 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Fetch data from table using supabase - */ -export default async function fetchDataFromTableUsingSupabase({ table_name, filter }: { table_name: string, filter: string }): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - const { data } = await supabase - .from(table_name) - .select(filter) - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/fileUploadUsingPocketbase/index.test.ts b/stacks/fileUploadUsingPocketbase/index.test.ts deleted file mode 100644 index 988114d5..00000000 --- a/stacks/fileUploadUsingPocketbase/index.test.ts +++ /dev/null @@ -1,49 +0,0 @@ -import uploadFileToCollection from "../../stacks/uploadFileToCollection"; -test("Upload a new file on Pocketbase to a collection", async () => { - // =========================================================================== - // Inputs - // =========================================================================== - - /** - * This is the collection in Pocketbase where images are stored. - */ - const collectionName = "media"; - - /** - * Function for mocking a File/Blob. - * Normally this would be your image, pdf, etc. For simplicity of the test, - * we will mock a `.txt` file with some text content. - */ - function createFileFromString( - content: string, - fileName: string, - mimeType: string - ) { - const blob = new Blob([content], { type: mimeType }); - - return new File([blob], fileName, { type: mimeType }); - } - - /** Data in the "file" column. */ - const testFile = createFileFromString( - "This is the content of the file.", - "example.txt", - "text/plain" - ); - - /** Data in the "title" column. */ - const title = "Awesome File"; - - // =========================================================================== - // Execution - // =========================================================================== - - // Now you can use your upload function - const createdRecord = await await uploadFileToCollection( - collectionName, - testFile, - title - ); - - expect(createdRecord).toHaveProperty("file"); -}); diff --git a/stacks/fileUploadUsingPocketbase/index.test.txt b/stacks/fileUploadUsingPocketbase/index.test.txt deleted file mode 100644 index 7e8c229d..00000000 --- a/stacks/fileUploadUsingPocketbase/index.test.txt +++ /dev/null @@ -1,57 +0,0 @@ -test("Upload a new file on Pocketbase to a collection", async () => { - // =========================================================================== - // Inputs - // =========================================================================== - - /** - * This is the collection in Pocketbase where images are stored. - */ - const collectionName = "media"; - - /** - * Function for mocking a File/Blob. - * Normally this would be your image, pdf, etc. For simplicity of the test, - * we will mock a `.txt` file with some text content. - */ - function createFileFromString( - content: string, - fileName: string, - mimeType: string - ) { - const blob = new Blob([content], { type: mimeType }); - - return new File([blob], fileName, { type: mimeType }); - } - - /** Data in the "file" column. */ - const testFile = createFileFromString( - "This is the content of the file.", - "example.txt", - "text/plain" - ); - - /** Data in the "title" column. */ - const title = "Awesome File"; - - // =========================================================================== - // Execution - // =========================================================================== - - // Now you can use your upload function - const createdRecord = await stack("Upload a new file on Pocketbase to a collection", - { - in: { - collectionName: collectionName, - file: testFile, - title: title - }, - out: { - id: '', - title: 'Awesome File', - file: {} - } - } - ); - - expect(createdRecord).toHaveProperty("file"); -}); diff --git a/stacks/fileUploadUsingPocketbase/index.ts b/stacks/fileUploadUsingPocketbase/index.ts deleted file mode 100644 index d6be7517..00000000 --- a/stacks/fileUploadUsingPocketbase/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import PocketBase from "pocketbase"; - -const pb = new PocketBase("http://127.0.0.1:8090"); - -/** - * Upload a new file on Pocketbase to a collection. - * - * @param collectionName Collection where the new file record will be stored. Normally, you have - * a 'media' collection and use the records here as relations to columns on - * other collections. Like a 'profilePicture' column on a 'users' collection. - * @param file File you want to be uploaded to the collection. This will be added in the "file" column of the new record. - * - * @param title This will be added in the "title" column of the new record. - * - * @returns the new record on pocketbase where the file is uploaded. - */ -export default async function uploadFileUsingPocketbase( - collectionName: string, - file: File, - title: string -) { - const formData = new FormData(); - - /** - * @param name = "file" here is the column where you want the "File" type - * is located. - */ - formData.append("file", file); - - /** - * Optionally, if since the 'media' record would have a 'title' column, also - * add data there. - */ - formData.append("title", title); - - const createdRecord = await pb.collection(collectionName).create(formData); - - return createdRecord; -} diff --git a/stacks/generateAnImageUsingReplicate/index.test.ts b/stacks/generateAnImageUsingReplicate/index.test.ts deleted file mode 100644 index 6bf8921c..00000000 --- a/stacks/generateAnImageUsingReplicate/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import generateImageUsingReplicate from '.'; - -test('Generate an image usiung replicate', async () => { - const response = await generateImageUsingReplicate({ model: "stability-ai/stable-diffusion:db21e45d3f7023abc2a46ee38a23973f6dce16bb082a930b0c49861f96d1e5bf", input: { prompt: "A photo of programmer in a desk" } }); - expect(response).toBeTruthy(); -}); \ No newline at end of file diff --git a/stacks/generateAnImageUsingReplicate/index.test.txt b/stacks/generateAnImageUsingReplicate/index.test.txt deleted file mode 100644 index 5cb76765..00000000 --- a/stacks/generateAnImageUsingReplicate/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Generate an image usiung replicate', async () => { - const response = stack('Generate an image usiung replicate') - expect(response).toBeTruthy(); -}); \ No newline at end of file diff --git a/stacks/generateAnImageUsingReplicate/index.ts b/stacks/generateAnImageUsingReplicate/index.ts deleted file mode 100644 index 99144c2f..00000000 --- a/stacks/generateAnImageUsingReplicate/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import Replicate from "replicate"; -/** - * Brief: Generate an image usiung replicate - */ - -type inputType = { - prompt: string -} -type modelType = `${string}/${string}:${string}` - -interface ModelInfo { - model: modelType, - input: inputType -} -export default async function generateImageUsingReplicate({ model, input }: ModelInfo): Promise { - try { - const replicate = new Replicate({ - auth: process.env.REPLICATE_API_TOKEN, - }); - const output = await replicate.run(model, { input }); - return output - } catch (error) { - console.error(error); - } -} diff --git a/stacks/generateAnimeQuote/index.test.ts b/stacks/generateAnimeQuote/index.test.ts deleted file mode 100644 index bc8492f2..00000000 --- a/stacks/generateAnimeQuote/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import generateAnimateQuote from "."; - -test("Generate a random Anime quote", async () => { - const response = await generateAnimateQuote(); - - expect(response.quote).toBeTruthy(); -}); diff --git a/stacks/generateAnimeQuote/index.test.txt b/stacks/generateAnimeQuote/index.test.txt deleted file mode 100644 index a56f9fad..00000000 --- a/stacks/generateAnimeQuote/index.test.txt +++ /dev/null @@ -1,7 +0,0 @@ -test('Generate a random Anime quote', async () => { - - const response = stack("Generate a random Anime quote"); - - expect(response.message).toBeTruthy(); -}); - diff --git a/stacks/generateAnimeQuote/index.ts b/stacks/generateAnimeQuote/index.ts deleted file mode 100644 index 6e9a3319..00000000 --- a/stacks/generateAnimeQuote/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import axios from 'axios'; - -export default async function generateAnimateQuote(): Promise { - try { - const response = await axios.get('https://animechan.xyz/api/random'); - return response.data; - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/generateCatImage/index.test.ts b/stacks/generateCatImage/index.test.ts deleted file mode 100644 index 540e9d9b..00000000 --- a/stacks/generateCatImage/index.test.ts +++ /dev/null @@ -1,2 +0,0 @@ -test('generateCatImage correctly', async () => { -}); \ No newline at end of file diff --git a/stacks/generateCatImage/index.ts b/stacks/generateCatImage/index.ts deleted file mode 100644 index 08c6deaf..00000000 --- a/stacks/generateCatImage/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import axios from 'axios'; - -/** - * Brief: Generate the image of a cat - */ -export default async function generateCatImage(input: null): Promise { - const response = await axios.get('https://api.thecatapi.com/v1/images/search'); - return response.data[0].url; -} \ No newline at end of file diff --git a/stacks/generateDogImage/index.test.ts b/stacks/generateDogImage/index.test.ts deleted file mode 100644 index e7ae4f32..00000000 --- a/stacks/generateDogImage/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import generateRandomDogImages from "."; - -test("Generate a random dog image", async () => { - const response = await generateRandomDogImages(); - - expect(response.message).toBeTruthy(); -}); diff --git a/stacks/generateDogImage/index.test.txt b/stacks/generateDogImage/index.test.txt deleted file mode 100644 index a4ff4962..00000000 --- a/stacks/generateDogImage/index.test.txt +++ /dev/null @@ -1,7 +0,0 @@ -test('Generate a random dog image', async () => { - - const response = stack("Generate a random dog image"); - - expect(response.message.status).toEqual('success'); -}); - diff --git a/stacks/generateDogImage/index.ts b/stacks/generateDogImage/index.ts deleted file mode 100644 index c768ec07..00000000 --- a/stacks/generateDogImage/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import axios from 'axios'; - -export default async function generateRandomDogImages(): Promise { - try { - const response = await axios.get('https://dog.ceo/api/breeds/image/random'); - console.log({response}); - return response.data; - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/getAllAvailableModelsElevenlabs/index.test.ts b/stacks/getAllAvailableModelsElevenlabs/index.test.ts deleted file mode 100644 index f0487a8c..00000000 --- a/stacks/getAllAvailableModelsElevenlabs/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import getAllAvailableVoices from '.'; - -test('Get all available models in elevenlabs', async () => { - const response = await getAllAvailableVoices(); - expect(response).toBeTruthy() -}); \ No newline at end of file diff --git a/stacks/getAllAvailableModelsElevenlabs/index.test.txt b/stacks/getAllAvailableModelsElevenlabs/index.test.txt deleted file mode 100644 index 938f3bb7..00000000 --- a/stacks/getAllAvailableModelsElevenlabs/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Get all available models in elevenlabs', async () => { - const response = stack('Get all available models in elevenlabs') - expect(response).toBeTruthy() -}); \ No newline at end of file diff --git a/stacks/getAllAvailableModelsElevenlabs/index.ts b/stacks/getAllAvailableModelsElevenlabs/index.ts deleted file mode 100644 index 55702286..00000000 --- a/stacks/getAllAvailableModelsElevenlabs/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -/** - * Brief: Get all available models in elevenlabs - */ - -export default async function getAllAvailableVoices(): Promise { - try { - const apiKey = process.env.ELEVENLABS_API_KEY; - const options:RequestInit = {method: 'GET', headers: [['xi-api-key',String(apiKey)]]}; - const response = await fetch(`https://api.elevenlabs.io/v1/models`, options) - return response.json() - } catch (error) { - console.error(error); - } -} diff --git a/stacks/getAudioFromHistoryItemInElevenLabs/index.test.ts b/stacks/getAudioFromHistoryItemInElevenLabs/index.test.ts deleted file mode 100644 index 758a459e..00000000 --- a/stacks/getAudioFromHistoryItemInElevenLabs/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import getAudioInHistory from '.'; - -test('Get Audio From History Item in elevenlabs', async () => { - const response = await getAudioInHistory({id:'Rpfy5HkN1PXqrY9cJQGG'}); - expect(response).toEqual(expect.any(ReadableStream)) - response.cancel(); -}); \ No newline at end of file diff --git a/stacks/getAudioFromHistoryItemInElevenLabs/index.test.txt b/stacks/getAudioFromHistoryItemInElevenLabs/index.test.txt deleted file mode 100644 index 1e9a2e1f..00000000 --- a/stacks/getAudioFromHistoryItemInElevenLabs/index.test.txt +++ /dev/null @@ -1,5 +0,0 @@ -test('Get Audio From History Item in elevenlabs', async () => { - const response = stack('Get Audio From History Item in elevenlabs') - expect(response).toEqual(expect.any(ReadableStream)) - response.cancel(); -}); \ No newline at end of file diff --git a/stacks/getAudioFromHistoryItemInElevenLabs/index.ts b/stacks/getAudioFromHistoryItemInElevenLabs/index.ts deleted file mode 100644 index 693080c5..00000000 --- a/stacks/getAudioFromHistoryItemInElevenLabs/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -/** - * Brief: Get Audio From History Item in elevenlabs - */ - -export default async function getAudioInHistory({id}:{id:string}): Promise { - try { - const apiKey = process.env.ELEVENLABS_API_KEY; - const options:RequestInit = {method: 'GET', headers: [['xi-api-key',String(apiKey)]]}; - const response = await fetch(`https://api.elevenlabs.io/v1/history/${id}/audio`, options) - return response.body - } catch (error) { - console.error(error); - } -} diff --git a/stacks/getCountryData/index.test.ts b/stacks/getCountryData/index.test.ts deleted file mode 100644 index abfaf49e..00000000 --- a/stacks/getCountryData/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import getCountryData from '../../stacks/getCountryData'; - -test('get all countries in the world using restcountries.com', async () => { - - const response = await getCountryData() - expect(response[0].name).toContain('Afghanistan'); -}); \ No newline at end of file diff --git a/stacks/getCountryData/index.test.txt b/stacks/getCountryData/index.test.txt deleted file mode 100644 index 92bc3a62..00000000 --- a/stacks/getCountryData/index.test.txt +++ /dev/null @@ -1,8 +0,0 @@ -import generateRestCountries from '.'; - -test('get all countries in the world using restcountries.com', async () => { - - const response = stack("get all countries in the world using restcountries.com") - expect(response[0].name).toContain('Afghanistan'); - -}); \ No newline at end of file diff --git a/stacks/getCountryData/index.ts b/stacks/getCountryData/index.ts deleted file mode 100644 index 38e17b2f..00000000 --- a/stacks/getCountryData/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import axios from 'axios'; - -/** - * Brief: get all countries in the world using restcountries.com - */ -export default async function getCountryData(): Promise { - try { - const response = await axios.get('https://restcountries.com/v2/all'); - return response.data; - } catch (error) { - console.error(error); - } - return null; -} \ No newline at end of file diff --git a/stacks/getHistoryOfGeneratedItemsInElevenLabs/index.test.ts b/stacks/getHistoryOfGeneratedItemsInElevenLabs/index.test.ts deleted file mode 100644 index b35dfbb6..00000000 --- a/stacks/getHistoryOfGeneratedItemsInElevenLabs/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import getGeneratedAudio from '.'; - -test('Get all generated audio in elevenlabs', async () => { - const response = await getGeneratedAudio(); - expect(response.history).toBeTruthy(); -}); \ No newline at end of file diff --git a/stacks/getHistoryOfGeneratedItemsInElevenLabs/index.test.txt b/stacks/getHistoryOfGeneratedItemsInElevenLabs/index.test.txt deleted file mode 100644 index 1e35e49a..00000000 --- a/stacks/getHistoryOfGeneratedItemsInElevenLabs/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Get all generated audio in elevenlabs', async () => { - const response = stack('Get all generated audio in elevenlabs') - expect(response.history).toBeTruthy(); -}); \ No newline at end of file diff --git a/stacks/getHistoryOfGeneratedItemsInElevenLabs/index.ts b/stacks/getHistoryOfGeneratedItemsInElevenLabs/index.ts deleted file mode 100644 index 6e64f0d7..00000000 --- a/stacks/getHistoryOfGeneratedItemsInElevenLabs/index.ts +++ /dev/null @@ -1,16 +0,0 @@ - -/** - * Brief: Get all generated audio in elevenlabs - */ - -export default async function getGeneratedAudio(): Promise { - try { - const apiKey = process.env.ELEVENLABS_API_KEY; - const options:RequestInit = {method: 'GET', headers: [['xi-api-key',String(apiKey)]]}; - - const response = await fetch('https://api.elevenlabs.io/v1/history', options) - return response.json() - } catch (error) { - console.error(error); - } -} diff --git a/stacks/getOneItemFromHistoryInElevenLabs/index.test.ts b/stacks/getOneItemFromHistoryInElevenLabs/index.test.ts deleted file mode 100644 index 5ecdfab2..00000000 --- a/stacks/getOneItemFromHistoryInElevenLabs/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import getItemByIdElevelLabs from '.'; - -test('Get one item from history in elevenlabs', async () => { - const response = await getItemByIdElevelLabs({id:'qs777EBPUP6ZjL9B3MPy'}); - expect(response.text).toContain('say hello world') -}); \ No newline at end of file diff --git a/stacks/getOneItemFromHistoryInElevenLabs/index.test.txt b/stacks/getOneItemFromHistoryInElevenLabs/index.test.txt deleted file mode 100644 index f993aa83..00000000 --- a/stacks/getOneItemFromHistoryInElevenLabs/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Get one item from history in elevenlabs', async () => { - const response = stack('Get one item from history in elevenlabs') - expect(response.text).toContain('say hello world') -}); \ No newline at end of file diff --git a/stacks/getOneItemFromHistoryInElevenLabs/index.ts b/stacks/getOneItemFromHistoryInElevenLabs/index.ts deleted file mode 100644 index b7a6ca77..00000000 --- a/stacks/getOneItemFromHistoryInElevenLabs/index.ts +++ /dev/null @@ -1,16 +0,0 @@ - -/** - * Brief: Get one item from history in elevenlabs - */ - -export default async function getItemByIdElevelLabs({id}:{id:string}): Promise { - try { - const apiKey = process.env.ELEVENLABS_API_KEY; - const options:RequestInit = {method: 'GET', headers: [['xi-api-key',String(apiKey)]]}; - - const response = await fetch(`https://api.elevenlabs.io/v1/history/${id}`, options) - return response.json() - } catch (error) { - console.error(error); - } -} diff --git a/stacks/getOneRecordOnPocketBase/index.test.ts b/stacks/getOneRecordOnPocketBase/index.test.ts deleted file mode 100644 index 6edbf868..00000000 --- a/stacks/getOneRecordOnPocketBase/index.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import getRecordById from "../../stacks/getRecordById"; -test("Get one record on pocketbase by id", async () => { - const collectionName = "example"; - const recordId = "sdhvoh20v7tps83"; - - const response = await getRecordById(collectionName, recordId); - - expect(response).toEqual({ - id: "sdhvoh20v7tps83", - name: "Antonio", - order: 2, - }); -}); diff --git a/stacks/getOneRecordOnPocketBase/index.test.txt b/stacks/getOneRecordOnPocketBase/index.test.txt deleted file mode 100644 index 2a8b0a45..00000000 --- a/stacks/getOneRecordOnPocketBase/index.test.txt +++ /dev/null @@ -1,22 +0,0 @@ -test("Get one record on pocketbase by id", async () => { - const collectionName = "example"; - const recordId = "sdhvoh20v7tps83"; - - const response = stack("Get one record on pocketbase by id", { - in: { - collectionName, - recordId, - }, - out: { - id: "sdhvoh20v7tps83", - name: "Antonio", - order: 2, - }, - }); - - expect(response).toEqual({ - id: "sdhvoh20v7tps83", - name: "Antonio", - order: 2, - }); -}); diff --git a/stacks/getOneRecordOnPocketBase/index.ts b/stacks/getOneRecordOnPocketBase/index.ts deleted file mode 100644 index 9c5f6a8a..00000000 --- a/stacks/getOneRecordOnPocketBase/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import PocketBase from "pocketbase"; - -const pb = new PocketBase("http://127.0.0.1:8090"); - -/** Get one record on pocketbase by id */ -export default async function fetchPocketBaseRecord( - collectionName: string, - recordId: string -) { - // or fetch a single 'example' collection record - const record = await pb.collection(collectionName).getOne(recordId); - - return record; -} diff --git a/stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.test.ts b/stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.test.ts deleted file mode 100644 index 1056503a..00000000 --- a/stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import getAllVoicesAvailable from '.'; - -test('get specific voice metadata using voice id in elevenlabs', async () => { - const response = await getAllVoicesAvailable({id:'zrHiDhphv9ZnVXBqCLjz'}); - expect(response.name).toBe('Mimi') -}); \ No newline at end of file diff --git a/stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.test.txt b/stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.test.txt deleted file mode 100644 index 8a0e32e7..00000000 --- a/stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('get specific voice metadata using voice id in elevenlabs', async () => { - const response = stack('get specific voice metadata using voice id in elevenlabs') - expect(response.name).toBe('Mimi') -}); \ No newline at end of file diff --git a/stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.ts b/stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.ts deleted file mode 100644 index ed5e6ec2..00000000 --- a/stacks/getSpecificVoiceDataUsingVoiceIDElevenlabs/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -/** - * Brief: get specific voice metadata using voice id in elevenlabs - */ - -export default async function getSpecificVoiceByID({id}:{id:string}): Promise { - try { - const apiKey = process.env.ELEVENLABS_API_KEY; - const options:RequestInit = {method: 'GET', headers: [['xi-api-key',String(apiKey)]]}; - const response = await fetch(`https://api.elevenlabs.io/v1/voices/${id}`, options) - return response.json() - } catch (error) { - console.error(error); - } -} diff --git a/stacks/getUserSubscriptionInfoElevenLabs/index.test.ts b/stacks/getUserSubscriptionInfoElevenLabs/index.test.ts deleted file mode 100644 index a5d35d19..00000000 --- a/stacks/getUserSubscriptionInfoElevenLabs/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import getUserSubscriptionInfo from '.'; - -test('Get user subscription info in elevenlabs', async () => { - const response = await getUserSubscriptionInfo(); - expect(response.tier).toEqual('free'); -}); \ No newline at end of file diff --git a/stacks/getUserSubscriptionInfoElevenLabs/index.test.txt b/stacks/getUserSubscriptionInfoElevenLabs/index.test.txt deleted file mode 100644 index d37e6e2b..00000000 --- a/stacks/getUserSubscriptionInfoElevenLabs/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Get user subscription info in elevenlabs', async () => { - const response = stack('Get user subscription info in elevenlabs') - expect(response.tier).toEqual('free'); -}); \ No newline at end of file diff --git a/stacks/getUserSubscriptionInfoElevenLabs/index.ts b/stacks/getUserSubscriptionInfoElevenLabs/index.ts deleted file mode 100644 index 2597cf3d..00000000 --- a/stacks/getUserSubscriptionInfoElevenLabs/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -/** - * Brief: Get user subscription info in elevenlabs - */ - -export default async function getUserSubscriptionInfo(): Promise { - try { - const apiKey = process.env.ELEVENLABS_API_KEY; - const options:RequestInit = {method: 'GET', headers: [['xi-api-key',String(apiKey)]]}; - const response = await fetch(`https://api.elevenlabs.io/v1/user/subscription`, options) - return response.json() - } catch (error) { - console.error(error); - } -} diff --git a/stacks/getWhatString/index.ts b/stacks/getWhatString/index.ts deleted file mode 100644 index 095c28c5..00000000 --- a/stacks/getWhatString/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Brief: what - */ -export default async function getWhatString(input: string): Promise { - return input; -} \ No newline at end of file diff --git a/stacks/getWhoIsRecordOfDomainUsingCloudflare/index.test.ts b/stacks/getWhoIsRecordOfDomainUsingCloudflare/index.test.ts deleted file mode 100644 index 32ba649b..00000000 --- a/stacks/getWhoIsRecordOfDomainUsingCloudflare/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import getWhoisRecord from '.'; - -test('Get Whois record of domain using cloudflare api', async () => { - const response = await getWhoisRecord({account_id:'583434c2154cb0278444ded751a3fc2b',domain:'google.com'}) - expect(response.success).toBe(true); -}); \ No newline at end of file diff --git a/stacks/getWhoIsRecordOfDomainUsingCloudflare/index.test.txt b/stacks/getWhoIsRecordOfDomainUsingCloudflare/index.test.txt deleted file mode 100644 index f6b7aa24..00000000 --- a/stacks/getWhoIsRecordOfDomainUsingCloudflare/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Get Whois record of domain using cloudflare api', async () => { - const response = stack('Get Whois record of domain using cloudflare api'); - expect(response.success).toBe(true); -}); \ No newline at end of file diff --git a/stacks/getWhoIsRecordOfDomainUsingCloudflare/index.ts b/stacks/getWhoIsRecordOfDomainUsingCloudflare/index.ts deleted file mode 100644 index 25f3f0c4..00000000 --- a/stacks/getWhoIsRecordOfDomainUsingCloudflare/index.ts +++ /dev/null @@ -1,23 +0,0 @@ - -import axios from "axios"; - -/** - * Brief: Get Whois record of domain using cloudflare api - */ -export default async function getWhoisRecord({ account_id, domain }: { account_id: any, domain: string }): Promise { - try { - const cloudflare_email = String(process.env.CLOUDFLARE_EMAIL) - const cloudflare_api_key = String(process.env.CLOUDFLARE_API_KEY) - const cloudflare_api_token = String(process.env.CLOUDFLARE_API_TOKEN) - const options = { - method: 'GET', - url: `https://api.cloudflare.com/client/v4/accounts/${account_id}/intel/whois?domain=${domain}`, - headers: { 'Content-Type': 'application/json', 'X-Auth-Email': cloudflare_email, 'X-Auth-Key': cloudflare_api_key, 'Authorization': `Bearer ${cloudflare_api_token}` }, - }; - - const result = await axios.request(options); - return result.data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/initializeClientAsAdminAuthUsingSupabase/index.test.ts b/stacks/initializeClientAsAdminAuthUsingSupabase/index.test.ts deleted file mode 100644 index 1796fdfb..00000000 --- a/stacks/initializeClientAsAdminAuthUsingSupabase/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import initializeAdminAuth from '.'; - -test('Initialize supabase client as admin auth', async () => { - const response = await initializeAdminAuth(); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/initializeClientAsAdminAuthUsingSupabase/index.test.txt b/stacks/initializeClientAsAdminAuthUsingSupabase/index.test.txt deleted file mode 100644 index d621e079..00000000 --- a/stacks/initializeClientAsAdminAuthUsingSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Initialize supabase client as admin auth', async () => { - const response = stack('Initialize supabase client as admin auth'); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/initializeClientAsAdminAuthUsingSupabase/index.ts b/stacks/initializeClientAsAdminAuthUsingSupabase/index.ts deleted file mode 100644 index cdc31837..00000000 --- a/stacks/initializeClientAsAdminAuthUsingSupabase/index.ts +++ /dev/null @@ -1,22 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' -require('dotenv').config(); - -/** - * Brief: Initialize supabase client as admin auth - */ -export default async function initializeAdminAuth(): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseServiceRole = String(process.env.SUPABASE_SERVICE_ROLE) - const supabase = createClient(supabaseUrl, supabaseServiceRole, { - auth: { - autoRefreshToken: false, - persistSession: false - } - }) - return supabase.auth.admin - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/initializeClientFromSupabase/index.test.ts b/stacks/initializeClientFromSupabase/index.test.ts deleted file mode 100644 index e45c3f02..00000000 --- a/stacks/initializeClientFromSupabase/index.test.ts +++ /dev/null @@ -1,8 +0,0 @@ - -import initializeClientUsingSupabase from '.'; - -test('Initialize a client using supabase', async () => { - - const response = await initializeClientUsingSupabase(); - expect(response.auth).toBeDefined(); -}); \ No newline at end of file diff --git a/stacks/initializeClientFromSupabase/index.test.txt b/stacks/initializeClientFromSupabase/index.test.txt deleted file mode 100644 index cb591efe..00000000 --- a/stacks/initializeClientFromSupabase/index.test.txt +++ /dev/null @@ -1,5 +0,0 @@ -test('Initialize a client using supabase', async () => { - - const response = stack('Initialize a client using supabase') - expect(response.auth).toBeDefined(); -}); \ No newline at end of file diff --git a/stacks/initializeClientFromSupabase/index.ts b/stacks/initializeClientFromSupabase/index.ts deleted file mode 100644 index a90e6cae..00000000 --- a/stacks/initializeClientFromSupabase/index.ts +++ /dev/null @@ -1,17 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' -require('dotenv').config(); - -/** - * Brief: Initialize a client using supabase - */ -export default async function initializeClientUsingSupabase(): Promise { - try { -const supabaseUrl = String(process.env.SUPABASE_URL) -const supabaseKey = String(process.env.SUPABASE_KEY) -const supabase = createClient(supabaseUrl, supabaseKey) -return supabase - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/jest.config.js b/stacks/jest.config.js deleted file mode 100644 index e22a42af..00000000 --- a/stacks/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - preset: 'ts-jest', - testEnvironment: 'node', - setupFiles: ['/jest.setup.js'], - testPathIgnorePatterns: [], -}; diff --git a/stacks/jest.setup.js b/stacks/jest.setup.js deleted file mode 100644 index f8518254..00000000 --- a/stacks/jest.setup.js +++ /dev/null @@ -1 +0,0 @@ -require('dotenv').config(); diff --git a/stacks/listAllBucketsOnSupabase/index.test.ts b/stacks/listAllBucketsOnSupabase/index.test.ts deleted file mode 100644 index 584492e0..00000000 --- a/stacks/listAllBucketsOnSupabase/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import listAllBuckets from '.'; - - -test('List all Storage buckets in supabase', async () => { - const response = await listAllBuckets() - expect(response[0].id).toBe('your_bucket_name'); -}); \ No newline at end of file diff --git a/stacks/listAllBucketsOnSupabase/index.test.txt b/stacks/listAllBucketsOnSupabase/index.test.txt deleted file mode 100644 index bfee3083..00000000 --- a/stacks/listAllBucketsOnSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('List all Storage buckets in supabase', async () => { - const response = stacks('List all Storage buckets in supabase') - expect(response[0].id).toBe('your_bucket_name'); -}); \ No newline at end of file diff --git a/stacks/listAllBucketsOnSupabase/index.ts b/stacks/listAllBucketsOnSupabase/index.ts deleted file mode 100644 index 3f34d567..00000000 --- a/stacks/listAllBucketsOnSupabase/index.ts +++ /dev/null @@ -1,21 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: List all Storage buckets in supabase - */ -export default async function listAllBuckets(): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - - - const { data } = await supabase - .storage - .listBuckets() - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/listenToDatabaseChangesUsingSupabase/index.test.ts b/stacks/listenToDatabaseChangesUsingSupabase/index.test.ts deleted file mode 100644 index 38b04298..00000000 --- a/stacks/listenToDatabaseChangesUsingSupabase/index.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -test("Listen to database changes using supabase", async () => { - const channel_name = "schema-db-changes"; - const callback_function = (payload) => { - console.log("Database has changed!:", payload); - }; - - const channel = stack("Listen to database changes using supabase", { - in: { - channel_name: channel_name, - callback: callback_function, - }, - out: { - channel: "", - }, - }); - - expect(channel).not.toBeNull(); -}); diff --git a/stacks/listenToDatabaseChangesUsingSupabase/index.test.txt b/stacks/listenToDatabaseChangesUsingSupabase/index.test.txt deleted file mode 100644 index 47d149ed..00000000 --- a/stacks/listenToDatabaseChangesUsingSupabase/index.test.txt +++ /dev/null @@ -1,18 +0,0 @@ -test("Listen to database changes using supabase", async () => { - const channel_name = "schema-db-changes"; - const callback = (payload) => { - console.log("Database has changed!:", payload); - }; - - const channel = stack("Listen to database changes using supabase", { - in: { - channel_name, - callback, - }, - out: { - channel: "", - }, - }); - - expect(channel).not.toBeNull(); -}); diff --git a/stacks/listenToDatabaseChangesUsingSupabase/index.ts b/stacks/listenToDatabaseChangesUsingSupabase/index.ts deleted file mode 100644 index 471c7eb1..00000000 --- a/stacks/listenToDatabaseChangesUsingSupabase/index.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { createClient } from "@supabase/supabase-js"; - -const supabaseUrl = String(process.env.SUPABASE_URL); -const supabaseKey = String(process.env.SUPABASE_KEY); -const supabase = createClient(supabaseUrl, supabaseKey); - -/** - * Listen to database changes using supabase - */ -export default async function listenToDatabaseChanges({ - channel_name, - table_name, - event = "*", - schema = "public", - callback, -}: { - /** - * Name of the real-time channel you want to listen to. - */ - channel_name: string; - /** - * table_name name of the table to listen for changes. - * - * When undefined, you listen to all tables. - */ - table_name?: string; - /** - * event an optional 'event' name that the listener will only capture. @defaultValue "*" (all) - */ - event?: "INSERT" | "UPDATE" | "DELETE" | "*"; - /** - * schema an optional 'schema' that the listener will only capture. (e.g. "*") @defautlValue "public" - */ - schema?: string; - /** - * callback function that gets called whenever the real-time event is emitted. - * @param payload the data from the event. - */ - callback: (payload: any) => void; -}): Promise { - try { - const channel = supabase - .channel(channel_name) - .on( - "postgres_changes", - { event: event, schema: schema, table: table_name }, - callback - ); - - channel.subscribe(); - - return channel; - } catch (error) { - console.error(error); - } -} diff --git a/stacks/retrieveABucketOnSupabase/index.test.ts b/stacks/retrieveABucketOnSupabase/index.test.ts deleted file mode 100644 index 3608afac..00000000 --- a/stacks/retrieveABucketOnSupabase/index.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import retrieveBucket from '.'; - - -test('Retrieve the details of an Storage bucket in supabase', async () => { - const response = await retrieveBucket({ - bucket_name: 'your_bucket_name' - }) - expect(response.id).toBe('your_bucket_name'); -}); \ No newline at end of file diff --git a/stacks/retrieveABucketOnSupabase/index.test.txt b/stacks/retrieveABucketOnSupabase/index.test.txt deleted file mode 100644 index 64a65d21..00000000 --- a/stacks/retrieveABucketOnSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Retrieve the details of an Storage bucket in supabase', async () => { - const response = stack('Retrieve the details of an Storage bucket in supabase') - expect(response.id).toBe('your_bucket_name'); -}); \ No newline at end of file diff --git a/stacks/retrieveABucketOnSupabase/index.ts b/stacks/retrieveABucketOnSupabase/index.ts deleted file mode 100644 index 7474161e..00000000 --- a/stacks/retrieveABucketOnSupabase/index.ts +++ /dev/null @@ -1,20 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Retrieve the details of an Storage bucket in supabase - */ -export default async function retrieveBucket({ bucket_name }: { bucket_name: string }): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - - const { data } = await supabase - .storage - .getBucket(bucket_name) - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/retrieveExistingUserUsingSupabase/index.test.ts b/stacks/retrieveExistingUserUsingSupabase/index.test.ts deleted file mode 100644 index b05a2143..00000000 --- a/stacks/retrieveExistingUserUsingSupabase/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import retrieveUser from '.'; - -test('Retrieve a user object using Supabase AUTH Admin ', async () => { - const response = await retrieveUser({id:"9330c516-c779-42cd-9bed-c1d45e38f947"}); - expect(response.user.email).toEqual("anytest@test.com") -}); \ No newline at end of file diff --git a/stacks/retrieveExistingUserUsingSupabase/index.test.txt b/stacks/retrieveExistingUserUsingSupabase/index.test.txt deleted file mode 100644 index 9be37361..00000000 --- a/stacks/retrieveExistingUserUsingSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Retrieve a user object using Supabase AUTH Admin', async () => { - const response = stack("Retrieve a user object using Supabase AUTH Admin"); - expect(response.user.email).toEqual("anytest@test.com") -}); \ No newline at end of file diff --git a/stacks/retrieveExistingUserUsingSupabase/index.ts b/stacks/retrieveExistingUserUsingSupabase/index.ts deleted file mode 100644 index 1d371ce2..00000000 --- a/stacks/retrieveExistingUserUsingSupabase/index.ts +++ /dev/null @@ -1,23 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' -require('dotenv').config(); - -/** - * Brief: Retrieve a user object using Supabase AUTH Admin - */ -export default async function retrieveUser({ id }: { id: string }): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseServiceRole = String(process.env.SUPABASE_SERVICE_ROLE) - const supabase = createClient(supabaseUrl, supabaseServiceRole, { - auth: { - autoRefreshToken: false, - persistSession: false - } - }) - const { data } = await supabase.auth.admin.getUserById(id) - return data; - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/searchUsingDuckDuckGo/index.test.ts b/stacks/searchUsingDuckDuckGo/index.test.ts deleted file mode 100644 index 6522181f..00000000 --- a/stacks/searchUsingDuckDuckGo/index.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { search, SafeSearchType } from "duck-duck-scrape"; -// import * as DDG from 'duck-duck-scrape'; - -import searchUsingDuckDuckGo from "."; -test("Find when the queen died", async () => { - const query = "what date the queen died"; - - const response = await searchUsingDuckDuckGo(query); - expect(JSON.stringify(response)).toContain("September 8, 2022"); -}); diff --git a/stacks/searchUsingDuckDuckGo/index.test.txt b/stacks/searchUsingDuckDuckGo/index.test.txt deleted file mode 100644 index 9e531df0..00000000 --- a/stacks/searchUsingDuckDuckGo/index.test.txt +++ /dev/null @@ -1,14 +0,0 @@ -import searchUsingDuckDuckGo from '../../stacks/searchUsingDuckDuckGo'; -test('Find when the queen died', async () => { - const query = 'what date the queen died'; - - const response = await stack( - 'Make a search using duckduckgo', - { - in: query, - out: 'September 8, 2022' - } - ); - - expect(response).toEqual('September 8, 2022'); -}); diff --git a/stacks/searchUsingDuckDuckGo/index.ts b/stacks/searchUsingDuckDuckGo/index.ts deleted file mode 100644 index fc3178a4..00000000 --- a/stacks/searchUsingDuckDuckGo/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import axios from "axios"; -import { search, SafeSearchType } from "duck-duck-scrape"; - -/** - * Brief: Make a search using duckduckgo - */ -export default async function searchUsingDuckDuckGo( - input: string -): Promise { - return search(input, { - safeSearch: SafeSearchType.STRICT, - }); -} diff --git a/stacks/streamingGpt4QuestionAnswerTTS/index.test.ts b/stacks/streamingGpt4QuestionAnswerTTS/index.test.ts deleted file mode 100644 index d5bbfeed..00000000 --- a/stacks/streamingGpt4QuestionAnswerTTS/index.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import streamingGpt4QuestionAnswerTTS from '.'; - -test('streamingGpt4QuestionAnswerTTS correctly', async () => { - streamingGpt4QuestionAnswerTTS('What is the meaning of life?').then((result) => { - expect(result).toBe('The meaning of life is to be happy.'); - } - ); -} -); \ No newline at end of file diff --git a/stacks/streamingGpt4QuestionAnswerTTS/index.test.txt b/stacks/streamingGpt4QuestionAnswerTTS/index.test.txt deleted file mode 100644 index f57c599c..00000000 --- a/stacks/streamingGpt4QuestionAnswerTTS/index.test.txt +++ /dev/null @@ -1,5 +0,0 @@ -test('flattenInputJson correctly', async () => { - const question = 'what is the meaning of life?'; - const response = stack('answer my question using OpenAI', {in: question, out: '42'}) - console.log(response); -}); \ No newline at end of file diff --git a/stacks/streamingGpt4QuestionAnswerTTS/index.ts b/stacks/streamingGpt4QuestionAnswerTTS/index.ts deleted file mode 100644 index d3dcdf89..00000000 --- a/stacks/streamingGpt4QuestionAnswerTTS/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import OpenAI from 'openai'; - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY -}); - -/** - * Brief: Call gpt-4 using the streaming endpoint to answer my question and TTS the voice in real time - */ -export default async function streamingGpt4QuestionAnswerTTS(input: string): Promise { - const chatCompletion = await openai.chat.completions.create({ - messages: [{ role: 'user', content: input }], - model: 'gpt-3.5-turbo', - }); - - return chatCompletion.choices[0].message.content; -} \ No newline at end of file diff --git a/stacks/tsconfig.json b/stacks/tsconfig.json deleted file mode 100644 index 98fdd621..00000000 --- a/stacks/tsconfig.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./dist", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": false, /* Enable all strict type-checking options. */ - "noImplicitAny": false, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - }, - "exclude": [ - "test-workspace", - "stacks" - ] -} \ No newline at end of file diff --git a/stacks/updateDataFromTheTableUsingSupabase/index.test.ts b/stacks/updateDataFromTheTableUsingSupabase/index.test.ts deleted file mode 100644 index b325b90e..00000000 --- a/stacks/updateDataFromTheTableUsingSupabase/index.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import updateDataFromTheTable from '.'; - -test('Update data from the table using supabase client', async () => { - const response = await updateDataFromTheTable({table_name:'your_table', column_name:'your_data' , column_value: 'your_value', filter_name:'your_id', filter_value:'1'}); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/updateDataFromTheTableUsingSupabase/index.test.txt b/stacks/updateDataFromTheTableUsingSupabase/index.test.txt deleted file mode 100644 index fba32a0e..00000000 --- a/stacks/updateDataFromTheTableUsingSupabase/index.test.txt +++ /dev/null @@ -1,4 +0,0 @@ -test('Update data from the table using supabase client', async () => { - const response = stack('Update data from the table using supabase client'); - expect(response).not.toBeNull(); -}); \ No newline at end of file diff --git a/stacks/updateDataFromTheTableUsingSupabase/index.ts b/stacks/updateDataFromTheTableUsingSupabase/index.ts deleted file mode 100644 index 65512295..00000000 --- a/stacks/updateDataFromTheTableUsingSupabase/index.ts +++ /dev/null @@ -1,23 +0,0 @@ - -import { createClient } from '@supabase/supabase-js' - -/** - * Brief: Update data from the table using supabase - */ -export default async function updateDataFromTheTable({ table_name, column_name, column_value, filter_name, filter_value }: { table_name: string, column_name:string, column_value:any, filter_name:string, filter_value:any }): Promise { - try { - const supabaseUrl = String(process.env.SUPABASE_URL) - const supabaseKey = String(process.env.SUPABASE_KEY) - const supabase = createClient(supabaseUrl, supabaseKey) - - const { data } = await supabase - .from(table_name) - .update({ [column_name]: column_value }) - .eq(filter_name, filter_value) - .select() - - return data - } catch (error) { - console.error(error); - } -} \ No newline at end of file diff --git a/stacks/useOpenAIstreamEndpoint/index.test.ts b/stacks/useOpenAIstreamEndpoint/index.test.ts deleted file mode 100644 index 1bccd2b5..00000000 --- a/stacks/useOpenAIstreamEndpoint/index.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import useOpenAIstreamEndpoint from "."; - -test("useOpenAIstreamEndpoint - should return a string", async () => { - let asyncIterator; - try { - // Set up a test input - const testInput = "What is the meaning of life?"; - - // Call the function - const resultGenerator = await useOpenAIstreamEndpoint(testInput); - - // Convert AsyncIterable to AsyncIterator - asyncIterator = resultGenerator[Symbol.asyncIterator](); - - // Test the first result - const firstResult = await asyncIterator.next(); - expect(typeof firstResult.value).toBe("string"); - expect(firstResult.value).toBe(""); - } catch (error) { - console.error("Test failed:", error); - } finally { - // close the stream - await asyncIterator?.return?.(); - } -}); diff --git a/stacks/useOpenAIstreamEndpoint/index.test.txt b/stacks/useOpenAIstreamEndpoint/index.test.txt deleted file mode 100644 index cca5c112..00000000 --- a/stacks/useOpenAIstreamEndpoint/index.test.txt +++ /dev/null @@ -1,11 +0,0 @@ -test('useOpenAIstreamEndpoint', async () => { - const question = "what is the meaning of life?"; - const response = stack( - 'what is the meaning of life?', - { - in: question, - }); - console.log(response); -}); - - diff --git a/stacks/useOpenAIstreamEndpoint/index.ts b/stacks/useOpenAIstreamEndpoint/index.ts deleted file mode 100644 index 580ed53d..00000000 --- a/stacks/useOpenAIstreamEndpoint/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import OpenAI from "openai"; -require("dotenv").config(); - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY, -}); - -/** - * Brief: Answer my question using OpenAI Streaming responses - */ -export default async function useOpenAIstreamEndpoint( - input: string -): Promise> { - const stream = await openai.chat.completions.create({ - model: "gpt-3.5-turbo", - messages: [{ role: "user", content: input }], - stream: true, - }); - return (async function* () { - for await (const chunk of stream) { - yield chunk.choices[0]?.delta?.content || ""; - } - })(); -}