aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/workers/openai.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/workers/openai.ts b/packages/workers/openai.ts
index 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 website
you 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 || ""}
`;