mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 16:32:33 +08:00
I don't think this can hurt to prioritize summaries of content
This commit is contained in:
parent
d1295ede90
commit
5e50a2918d
@ -100,9 +100,13 @@ export class VectorSearchTool {
|
|||||||
noteId: note.noteId,
|
noteId: note.noteId,
|
||||||
title: note.title,
|
title: note.title,
|
||||||
contentPreview: note.content
|
contentPreview: note.content
|
||||||
? note.content.length > 200
|
? (options.summarizeContent
|
||||||
|
// Don't truncate already summarized content
|
||||||
|
? note.content
|
||||||
|
// Only truncate non-summarized content
|
||||||
|
: (note.content.length > 200
|
||||||
? note.content.substring(0, 200) + '...'
|
? note.content.substring(0, 200) + '...'
|
||||||
: note.content
|
: note.content))
|
||||||
: 'No content available',
|
: 'No content available',
|
||||||
similarity: note.similarity,
|
similarity: note.similarity,
|
||||||
parentId: note.parentId
|
parentId: note.parentId
|
||||||
@ -144,10 +148,14 @@ export class VectorSearchTool {
|
|||||||
return results.map(result => ({
|
return results.map(result => ({
|
||||||
noteId: result.noteId,
|
noteId: result.noteId,
|
||||||
title: result.title,
|
title: result.title,
|
||||||
contentPreview: result.content ?
|
contentPreview: result.content
|
||||||
(result.content.length > 200 ?
|
? (summarize
|
||||||
result.content.substring(0, 200) + '...' :
|
// Don't truncate already summarized content
|
||||||
result.content)
|
? result.content
|
||||||
|
// Only truncate non-summarized content
|
||||||
|
: (result.content.length > 200
|
||||||
|
? result.content.substring(0, 200) + '...'
|
||||||
|
: result.content))
|
||||||
: 'No content available',
|
: 'No content available',
|
||||||
similarity: result.similarity,
|
similarity: result.similarity,
|
||||||
parentId: result.parentId
|
parentId: result.parentId
|
||||||
|
Loading…
x
Reference in New Issue
Block a user