diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-04 21:23:55 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-03-04 21:23:55 +0000 |
| commit | 12a6808f6d301210ab9e71dbe1532cedac4e8320 (patch) | |
| tree | c661c3b44c9e37575e0b3c4dd0719fc2eef71fee /packages | |
| parent | 19f17b497a5f6a7619af9d099243af337e8fce5e (diff) | |
| download | karakeep-12a6808f6d301210ab9e71dbe1532cedac4e8320.tar.zst | |
fix: Teach openai to ignore cookie consent popups
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/workers/openai.ts | 8 |
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 || ""} `; |
