From fbaa2982c6a77eee3ef4ed0c2c069aa9f705719f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:04:49 +0530 Subject: [PATCH 1/2] Bump openai from 4.29.1 to 4.29.2 (#20) * Bump openai from 4.29.1 to 4.29.2 Bumps [openai](https://github.com/openai/openai-node) from 4.29.1 to 4.29.2. - [Release notes](https://github.com/openai/openai-node/releases) - [Changelog](https://github.com/openai/openai-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/openai/openai-node/compare/v4.29.1...v4.29.2) --- updated-dependencies: - dependency-name: openai dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * fix openai tests * update schedule --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: patcher99 --- .github/workflows/tests.yml | 2 +- package-lock.json | 6 ++--- tests/openai.test.mjs | 44 +++++++++++++++++++++---------------- 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a9b07f6..db6b570 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ on: branches: [ "main" ] workflow_dispatch: schedule: - - cron: '0 0 * * 0' + - cron: '0 0 1-31/15 * *' env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_TOKEN }} diff --git a/package-lock.json b/package-lock.json index 111a7d0..29142c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1879,9 +1879,9 @@ } }, "node_modules/openai": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/openai/-/openai-4.29.1.tgz", - "integrity": "sha512-vvKRIgB4/7w48PGVbeR8OceH/PT6fRo4sTIjRC7+y7WoK7by1R0cXs2SZRx4KsEh0ZB8J0eqdVIdRgs8XzeoEg==", + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/openai/-/openai-4.29.2.tgz", + "integrity": "sha512-cPkT6zjEcE4qU5OW/SoDDuXEsdOLrXlAORhzmaguj5xZSPlgKvLhi27sFWhLKj07Y6WKNWxcwIbzm512FzTBNQ==", "dev": true, "dependencies": { "@types/node": "^18.11.18", diff --git a/tests/openai.test.mjs b/tests/openai.test.mjs index d5f2d40..86c0fb8 100644 --- a/tests/openai.test.mjs +++ b/tests/openai.test.mjs @@ -17,6 +17,7 @@ describe('OpenAI Test', () => { const chatCompletion = await openai.chat.completions.create({ messages: [{role: 'user', content: 'What is LLM Monitoring?'}], model: 'gpt-3.5-turbo', + max_tokens: 1, }); expect(chatCompletion.object).to.equal('chat.completion'); @@ -27,7 +28,7 @@ describe('OpenAI Test', () => { const completion = await openai.completions.create({ model: 'gpt-3.5-turbo-instruct', prompt: 'What is LLM Observability?', - max_tokens: 7, + max_tokens: 1, }); expect(completion.object).to.equal('text_completion'); @@ -37,35 +38,37 @@ describe('OpenAI Test', () => { await DokuMetry.init({llm: openai, dokuUrl: process.env.DOKU_URL, apiKey: process.env.DOKU_TOKEN, environment: "dokumetry-testing", applicationName: "dokumetry-node-test", skipResp: false}); const embeddings = await openai.embeddings.create({ model: 'text-embedding-ada-002', - input: 'The quick brown fox jumped over the lazy dog', + input: 'LLM Observability', encoding_format: 'float', }); expect(embeddings.data[0].object).to.equal('embedding'); }).timeout(30000);; - it('should return a response with object as "fine_tuning.job"', async () => { - await DokuMetry.init({llm: openai, dokuUrl: process.env.DOKU_URL, apiKey: process.env.DOKU_TOKEN, environment: "dokumetry-testing", applicationName: "dokumetry-node-test", skipResp: false}); - try { - const fineTuningJob = await openai.fineTuning.jobs.create({ - training_file: 'file-m36cc45komO83VJKAY1qVgeP', - model: 'gpt-3.5-turbo', - }); + // it('should return a response with object as "fine_tuning.job"', async () => { + // await DokuMetry.init({llm: openai, dokuUrl: process.env.DOKU_URL, apiKey: process.env.DOKU_TOKEN, environment: "dokumetry-testing", applicationName: "dokumetry-node-test", skipResp: false}); + // try { + // const fineTuningJob = await openai.fineTuning.jobs.create({ + // training_file: '', + // model: 'gpt-3.5-turbo', + // }); - expect(fineTuningJob.object).to.equal('fine_tuning.job'); - } catch (error) { - // Check if it's a rate limit error - if (error.code == "daily_rate_limit_exceeded") { - console.error(`Daily Rate limit Reached`); - } - } - }).timeout(10000); + // expect(fineTuningJob.object).to.equal('fine_tuning.job'); + // } catch (error) { + // // Check if it's a rate limit error + // if (error.code == "daily_rate_limit_exceeded") { + // console.error(`Daily Rate limit Reached`); + // } + // } + // }).timeout(10000); it('should return a response with "created" field', async () => { await DokuMetry.init({llm: openai, dokuUrl: process.env.DOKU_URL, apiKey: process.env.DOKU_TOKEN, environment: "dokumetry-testing", applicationName: "dokumetry-node-test", skipResp: false}); const imageGeneration = await openai.images.generate({ model: 'dall-e-2', - prompt: 'Generate an image of a cat.', + prompt: 'LLM Observability dashboard', + size: "256x256", + n: 1 }); expect(imageGeneration.created).to.exist; @@ -75,6 +78,9 @@ describe('OpenAI Test', () => { await DokuMetry.init({llm: openai, dokuUrl: process.env.DOKU_URL, apiKey: process.env.DOKU_TOKEN, environment: "dokumetry-testing", applicationName: "dokumetry-node-test", skipResp: false}); const imageVariation = await openai.images.createVariation({ image: fs.createReadStream('tests/test-image-for-openai.png'), + size: "256x256", + model: 'dall-e-2', + n: 1 }); expect(imageVariation.created).to.exist; @@ -85,7 +91,7 @@ describe('OpenAI Test', () => { const audioSpeech = await openai.audio.speech.create({ model: 'tts-1', voice: 'alloy', - input: 'Today is a wonderful day to build something people love!', + input: 'LLM Observability', }); expect(audioSpeech.url).to.equal('https://api.openai.com/v1/audio/speech'); }).timeout(30000); From eac2432d8da5483a00f45be7bbebaa6e1a182e18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:13:41 +0530 Subject: [PATCH 2/2] Bump cohere-ai from 7.8.0 to 7.9.0 (#21) Bumps [cohere-ai](https://github.com/cohere-ai/cohere-typescript) from 7.8.0 to 7.9.0. - [Release notes](https://github.com/cohere-ai/cohere-typescript/releases) - [Commits](https://github.com/cohere-ai/cohere-typescript/compare/7.8.0...7.9.0) --- updated-dependencies: - dependency-name: cohere-ai dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Patcher99 --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 29142c2..f720417 100644 --- a/package-lock.json +++ b/package-lock.json @@ -665,9 +665,9 @@ } }, "node_modules/cohere-ai": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/cohere-ai/-/cohere-ai-7.8.0.tgz", - "integrity": "sha512-iKNNCJDwnilaCNDFem9acVtsFCvY+6qq8V/LpP8PNwBYBWafWiQQYNrxeDhXMTHB5Qjpmzmkqboz755zRvxOMw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/cohere-ai/-/cohere-ai-7.9.0.tgz", + "integrity": "sha512-iHPG4dule+nMlw88Xe0USGZbLlXuRC4yvOvfCqoEdW9tHOc0vkiPfiyjBalDcPKj9KEvWZfii84kyN5HyTMySw==", "dev": true, "dependencies": { "form-data": "4.0.0",