diff options
author | Alexander_Kabui | 2024-05-24 16:36:57 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-05-24 16:36:57 +0300 |
commit | 3ea881f3bc28e8087be08f1d507991ac9b2a4230 (patch) | |
tree | a3080bf4be1f84bc681e48227acc2838522df063 /gn3/llms | |
parent | 188f84ef3895de613e998c63da7ec2338e25a55c (diff) | |
download | genenetwork3-3ea881f3bc28e8087be08f1d507991ac9b2a4230.tar.gz |
Pylint fixes.
Diffstat (limited to 'gn3/llms')
-rw-r--r-- | gn3/llms/client.py | 4 | ||||
-rw-r--r-- | gn3/llms/errors.py | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/gn3/llms/client.py b/gn3/llms/client.py index d29d2a1..ad6c400 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 not (response.json().get("data")): + 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,6 +122,6 @@ class GeneNetworkQAClient(Session): {response_msg.get(response.status_code,response.reason)}", self.query) #time.sleep(retry_delay) - raise LLMError("Time error: We couldn't provide a response,Please try\ + raise LLMError("Timeout error: We couldn't provide a response,Please try\ to rephrase your question to receive feedback", self.query) diff --git a/gn3/llms/errors.py b/gn3/llms/errors.py index 77e0f9a..a3a47a3 100644 --- a/gn3/llms/errors.py +++ b/gn3/llms/errors.py @@ -37,5 +37,3 @@ class UnprocessableEntity(HTTPError): class LLMError(Exception): """custom exception for LLMErrorMIxins""" - def __init__(self, *args, **kwargs): - super().__init__(*args) |