diff options
| author | Mohamed Bassem <me@mbassem.com> | 2026-01-28 10:16:18 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-28 10:16:18 +0000 |
| commit | 95bfa5691ce0d43fbaa9c011df4ec9561635ff8d (patch) | |
| tree | 671e66004b489a8263918b0f3956e9a44686e850 | |
| parent | 42cdc937c867f5e35c75534f55caea51c60d388a (diff) | |
| download | karakeep-95bfa5691ce0d43fbaa9c011df4ec9561635ff8d.tar.zst | |
fix: use user's preferred language for manual summarization (#2429)
| -rw-r--r-- | packages/trpc/routers/bookmarks.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/trpc/routers/bookmarks.ts b/packages/trpc/routers/bookmarks.ts index 37497bcf..5a39439f 100644 --- a/packages/trpc/routers/bookmarks.ts +++ b/packages/trpc/routers/bookmarks.ts @@ -14,6 +14,7 @@ import { bookmarkTexts, customPrompts, tagsOnBookmarks, + users, } from "@karakeep/db/schema"; import { AssetPreprocessingQueue, @@ -988,8 +989,15 @@ Author: ${bookmark.author ?? ""} }, }); + const userSettings = await ctx.db.query.users.findFirst({ + where: eq(users.id, ctx.user.id), + columns: { + inferredTagLang: true, + }, + }); + const summaryPrompt = await buildSummaryPrompt( - serverConfig.inference.inferredTagLang, + userSettings?.inferredTagLang ?? serverConfig.inference.inferredTagLang, prompts.map((p) => p.text), bookmarkDetails, serverConfig.inference.contextLength, |
