From d4244a695cb8ab96d11effa13c6d946b9e3983b6 Mon Sep 17 00:00:00 2001 From: zachey <63107653+zachey01@users.noreply.github.com> Date: Wed, 10 Jul 2024 02:57:34 +0500 Subject: [PATCH] Delete chatCompletion.test.js --- tests/chatCompletion.test.js | 64 ------------------------------------ 1 file changed, 64 deletions(-) delete mode 100644 tests/chatCompletion.test.js diff --git a/tests/chatCompletion.test.js b/tests/chatCompletion.test.js deleted file mode 100644 index 9bb7832..0000000 --- a/tests/chatCompletion.test.js +++ /dev/null @@ -1,64 +0,0 @@ -import GPT4js from "../index.js"; - -const providers = [ - { - name: "Nextway", - models: ["gpt-4o-free", "gpt-3.5-turbo", "gemini-pro"], - options: { maxTokens: 100, temperature: 0.5, stream: false }, - }, - { - name: "BlackBox", - models: [""], - options: { codeModelMode: true, isChromeExt: false, webSearch: false }, - }, - { - name: "Aryahcr", - models: [ - "gpt-4", - "gpt-4-0613", - "gpt-4-32k", - "gpt-4-0314", - "gpt-4-32k-0314", - "gpt-3.5-turbo", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0613", - "gpt-3.5-turbo-16k-0613", - "gpt-3.5-turbo-0301", - "text-davinci-003", - "text-davinci-002", - "code-davinci-002", - "gpt-3", - "text-curie-001", - "text-babbage-001", - "text-ada-001", - "davinci", - "curie", - "babbage", - "ada", - "babbage-002", - "davinci-002", - ], - options: { temperature: 0.5, stream: false }, - }, -]; - -providers.forEach((provider) => { - provider.models.forEach((model) => { - describe(`GPT-4 Chat Completion Tests for ${provider.name} ${model}`, () => { - it(`should complete chat using ${provider.name} ${model}`, async () => { - const messages = [{ role: "user", content: "hi!" }]; - const options = { provider: provider.name, model, ...provider.options }; - const providerInstance = GPT4js.createProvider(provider.name); - - try { - const text = await providerInstance.chatCompletion(messages, options); - expect(text).toBeDefined(); - console.log(`Chat completion with ${provider.name} ${model}:`, text); - } catch (error) { - console.error(`Error with ${provider.name} ${model}:`, error); - throw error; - } - }); - }); - }); -});