diff options
| author | MohamedBassem <me@mbassem.com> | 2024-02-09 02:17:45 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-02-09 02:51:39 +0000 |
| commit | b25f17509e704eb41523bf455a33804cabf8aaca (patch) | |
| tree | c1449bb3b8326504a32cc907b64a809a1290fe1d /packages/workers/openai.ts | |
| parent | 08a5694e451218f1bcb2ad9eb42fd93250afbb96 (diff) | |
| download | karakeep-b25f17509e704eb41523bf455a33804cabf8aaca.tar.zst | |
[chore] Linting and formating tweaking
Diffstat (limited to 'packages/workers/openai.ts')
| -rw-r--r-- | packages/workers/openai.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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<string>(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: { |
