mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 13:20:17 +00:00
Return compiled entry in additional details of /api/search response
This can be used to highlight portion of raw entry to highlight and for passing to summarizer to stay with max_tokens limit supported by GPT models
This commit is contained in:
@@ -134,6 +134,7 @@ def collate_results(hits, entries: list[Entry], count=5) -> list[SearchResponse]
|
||||
"score": f"{hit['cross-score'] if 'cross-score' in hit else hit['score']:.3f}",
|
||||
"additional": {
|
||||
"file": entries[hit['corpus_id']].file,
|
||||
"compiled": entries[hit['corpus_id']].compiled
|
||||
}
|
||||
})
|
||||
for hit
|
||||
|
||||
Reference in New Issue
Block a user