about summary refs log tree commit diff
path: root/gn3/llms
diff options
context:
space:
mode:
authorAlexander_Kabui2024-05-24 16:30:59 +0300
committerAlexander_Kabui2024-05-24 16:30:59 +0300
commit188f84ef3895de613e998c63da7ec2338e25a55c (patch)
treec4fa6bc4f36cf03eff0e709d3f803f25c678c8de /gn3/llms
parent8512d9a606fbfff864345d82c210e281a6d943bf (diff)
downloadgenenetwork3-188f84ef3895de613e998c63da7ec2338e25a55c.tar.gz
Remove kwargs from LLMErrorr Exceptions and update relevant code.
Diffstat (limited to 'gn3/llms')
-rw-r--r--gn3/llms/client.py6
-rw-r--r--gn3/llms/errors.py1
2 files changed, 3 insertions, 4 deletions
diff --git a/gn3/llms/client.py b/gn3/llms/client.py
index 5c4fa0e..d29d2a1 100644
--- a/gn3/llms/client.py
+++ b/gn3/llms/client.py
@@ -117,11 +117,11 @@ class GeneNetworkQAClient(Session):
                     continue
                 return response
             else:
-                raise LLMError( f"Request error with code:\
+                raise LLMError(f"Request error with code:\
                 {response.status_code} occurred with reason:\
                 {response_msg.get(response.status_code,response.reason)}",
-                                query=self.query)
+                               self.query)
                 #time.sleep(retry_delay)
         raise LLMError("Time error: We couldn't provide a response,Please try\
         to rephrase your question to receive feedback",
-                       query=self.query)
+                       self.query)
diff --git a/gn3/llms/errors.py b/gn3/llms/errors.py
index c5439d6..77e0f9a 100644
--- a/gn3/llms/errors.py
+++ b/gn3/llms/errors.py
@@ -39,4 +39,3 @@ class LLMError(Exception):
     """custom exception for LLMErrorMIxins"""
     def __init__(self, *args, **kwargs):
         super().__init__(*args)
-        self.query = kwargs.get("query")