From abf229c662681eb1a67e8ac67885ba9e60ad2115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EF=B8=8FYaskur=20Dyas=E2=9A=94=E2=9A=94=EF=B8=8F=E2=9A=94?= Date: Sun, 10 Nov 2024 19:30:12 +0700 Subject: [PATCH] chore: remove usage of redis, todo: remove dependency if not needed --- helpers/gpt.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/helpers/gpt.js b/helpers/gpt.js index 8ce3ec2..ae86f4e 100644 --- a/helpers/gpt.js +++ b/helpers/gpt.js @@ -22,9 +22,6 @@ import crypto from 'crypto'; * // => {context: "random_number", expectedCount: 1, items: ["5-10"]} */ export async function getRandomFromGpt(something) { - const somethingMd5 = crypto.createHash('md5').update(something).digest('hex'); - const client = new Redis(process.env.REDIS_URL); - const lastAnswers = await client.get(somethingMd5); const openai = new OpenAI({ apiKey: process.env?.OPENAI_API_KEY, });