mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01: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:
parent
7071d081e9
commit
e7b89f7fd0
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue