aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
Diffstat (limited to 'gn3')
-rw-r--r--gn3/llms/client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gn3/llms/client.py b/gn3/llms/client.py
index fa1e36e..5c4fa0e 100644
--- a/gn3/llms/client.py
+++ b/gn3/llms/client.py
@@ -109,7 +109,7 @@ class GeneNetworkQAClient(Session):
for _i in range(max_retries):
response = super().request(method, url, *args, **kwargs)
if response.ok:
- if method.lower() == "get" and response.json().get("data") is None:
+ if method.lower() == "get" and not (response.json().get("data")):
# note this is a dirty trick to check if fahamu has returned the results
# the issue is that the api only returns 500 or 200 satus code
# TODO: fix this on their end
@@ -122,5 +122,6 @@ class GeneNetworkQAClient(Session):
{response_msg.get(response.status_code,response.reason)}",
query=self.query)
#time.sleep(retry_delay)
- raise LLMError("Time error: Please try to rephrase of query to get an answer",
+ raise LLMError("Time error: We couldn't provide a response,Please try\
+ to rephrase your question to receive feedback",
query=self.query)