mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Fix to get score associated with SearchResponse in result as string
This commit is contained in:
@@ -154,7 +154,7 @@ def collate_results(hits, entries: List[Entry], count=5) -> List[SearchResponse]
|
||||
SearchResponse.parse_obj(
|
||||
{
|
||||
"entry": entries[hit["corpus_id"]].raw,
|
||||
"score": f"{hit.get('cross-score', 'score')}:.3f",
|
||||
"score": f"{hit.get('cross-score') or hit.get('score')}",
|
||||
"additional": {"file": entries[hit["corpus_id"]].file, "compiled": entries[hit["corpus_id"]].compiled},
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user