mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-19 20:24:32 +02:00
Vespa Log No Response (#2295)
This commit is contained in:
@@ -292,12 +292,11 @@ def query_vespa(
|
||||
if LOG_VESPA_TIMING_INFORMATION
|
||||
else {},
|
||||
)
|
||||
|
||||
response = requests.post(
|
||||
SEARCH_ENDPOINT,
|
||||
json=params,
|
||||
)
|
||||
try:
|
||||
response = requests.post(
|
||||
SEARCH_ENDPOINT,
|
||||
json=params,
|
||||
)
|
||||
response.raise_for_status()
|
||||
except requests.HTTPError as e:
|
||||
request_info = f"Headers: {response.request.headers}\nPayload: {params}"
|
||||
@@ -319,6 +318,12 @@ def query_vespa(
|
||||
logger.debug("Vespa timing info: %s", response_json.get("timing"))
|
||||
hits = response_json["root"].get("children", [])
|
||||
|
||||
if not hits:
|
||||
logger.warning(
|
||||
f"No hits found for YQL Query: {query_params.get('yql', 'No YQL Query')}"
|
||||
)
|
||||
logger.debug(f"Vespa Response: {response.text}")
|
||||
|
||||
for hit in hits:
|
||||
if hit["fields"].get(CONTENT) is None:
|
||||
identifier = hit["fields"].get("documentid") or hit["id"]
|
||||
|
@@ -209,7 +209,9 @@ class SearchPipeline:
|
||||
if inference_section is not None:
|
||||
expanded_inference_sections.append(inference_section)
|
||||
else:
|
||||
logger.warning("Skipped creation of section, no chunks found")
|
||||
logger.warning(
|
||||
"Skipped creation of section for full docs, no chunks found"
|
||||
)
|
||||
|
||||
self._retrieved_sections = expanded_inference_sections
|
||||
return expanded_inference_sections
|
||||
|
Reference in New Issue
Block a user