From b25f17509e704eb41523bf455a33804cabf8aaca Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Fri, 9 Feb 2024 02:17:45 +0000 Subject: [chore] Linting and formating tweaking --- packages/workers/openai.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/workers/openai.ts') diff --git a/packages/workers/openai.ts b/packages/workers/openai.ts index b6044dd3..a2f90c8a 100644 --- a/packages/workers/openai.ts +++ b/packages/workers/openai.ts @@ -46,7 +46,7 @@ async function inferTags(jobId: string, link: BookmarkedLink, openai: OpenAI) { response_format: { type: "json_object" }, }); - let response = chatCompletion.choices[0].message.content; + const response = chatCompletion.choices[0].message.content; if (!response) { throw new Error(`[openai][${jobId}] Got no message content from OpenAI`); } @@ -89,10 +89,10 @@ async function createTags(tags: string[], userId: string) { const existingTagSet = new Set(existingTags.map((t) => t.name)); - let newTags = tags.filter((t) => !existingTagSet.has(t)); + const newTags = tags.filter((t) => !existingTagSet.has(t)); // TODO: Prisma doesn't support createMany in Sqlite - let newTagObjects = await Promise.all( + const newTagObjects = await Promise.all( newTags.map((t) => { return prisma.bookmarkTags.create({ data: { -- cgit v1.2.3-70-g09d2