From b9a8d3d23f3c239c42c1c4a7ce1c59c2c9a1c450 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Wed, 17 Jan 2024 21:03:04 +0300 Subject: fix error message for empty responses --- gn3/llms/process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gn3/llms/process.py b/gn3/llms/process.py index bd10c19..b4fd507 100644 --- a/gn3/llms/process.py +++ b/gn3/llms/process.py @@ -76,11 +76,11 @@ def get_gnqa(query, auth_token): if success == 1: resp_text = filter_response_text(res.text) if resp_text.get("data") is None: - return "Unfortunately I have nothing on the query", [] + return task_id, "Unfortunately I have nothing on the query", [] answer = resp_text['data']['answer'] context = resp_text['data']['context'] references = parse_context( context, DocIDs().getInfo, format_bibliography_info) return task_id, answer, references else: - return task_id, res, "Unfortunately I have nothing." + return task_id, "Unfortunately, I have nothing on the query", [] -- cgit v1.2.3