From 7c2c5563e3e5b2835ef6cccd0e67f16edc10d709 Mon Sep 17 00:00:00 2001 From: Weves Date: Mon, 30 Oct 2023 15:31:37 -0700 Subject: [PATCH] Handle empty blurb + adjust timeout --- backend/danswer/document_index/vespa/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/danswer/document_index/vespa/index.py b/backend/danswer/document_index/vespa/index.py index 3a810b7c2..7671db8d9 100644 --- a/backend/danswer/document_index/vespa/index.py +++ b/backend/danswer/document_index/vespa/index.py @@ -412,7 +412,7 @@ def _vespa_hit_to_inference_chunk(hit: dict[str, Any]) -> InferenceChunk: return InferenceChunk( chunk_id=fields[CHUNK_ID], - blurb=fields[BLURB], + blurb=fields.get(BLURB, ""), content=fields[CONTENT], source_links=source_links_dict, section_continuation=fields[SECTION_CONTINUATION], @@ -695,6 +695,7 @@ class VespaIndex(DocumentIndex): "hits": num_to_retrieve, "offset": 0, "ranking.profile": "hybrid_search", + "timeout": "10s", } return _query_vespa(params)