A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix: Teach openai to ignore cookie consent popups
MohamedBassem12a6808f6d30
diff --git a/packages/workers/openai.ts b/packages/workers/openai.tsindex 7d52c5bb..e82a53b5 100644--- a/packages/workers/openai.ts+++ b/packages/workers/openai.ts@@ -69,11 +69,12 @@ export class OpenAiWorker {const PROMPT_BASE = `I'm building a read-it-later app and I need your help with automatic tagging.-Please analyze the text after the sentence "CONTENT:" and suggest relevant tags that describe its key themes, topics, and main ideas.+Please analyze the text after the sentence "CONTENT START HERE:" and suggest relevant tags that describe its key themes, topics, and main ideas.Aim for a variety of tags, including broad categories, specific keywords, and potential sub-genres. If it's a famous websiteyou may also include a tag for the website. Tags should be lowercases and don't contain spaces. If the tag is not generic enough, don't-include it. Aim for 3-5 tags. If there are no good tags, don't emit any. You must respond in JSON with the key "tags" and the value is list of tags.-CONTENT:+include it. Aim for 3-5 tags. If there are no good tags, don't emit any. The content can include text for cookie consent and privacy policy, ignore those while tagging.+You must respond in JSON with the key "tags" and the value is list of tags.+CONTENT START HERE:`;function buildPrompt(@@ -97,6 +98,7 @@ function buildPrompt(return `${PROMPT_BASE}URL: ${bookmark.link.url}+Title: ${bookmark.link.title || ""}Description: ${bookmark.link.description || ""}Content: ${content || ""}`;