aboutsummaryrefslogtreecommitdiffstats
path: root/packages/workers/openai.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/workers/openai.ts')
-rw-r--r--packages/workers/openai.ts6
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: {