aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander_Kabui2024-01-05 22:49:56 +0300
committerAlexander_Kabui2024-01-05 22:49:56 +0300
commit507f35a6027d263159d37816e033021b578d27db (patch)
tree5782c30f20acbf563923e2606e8dfe0700620f4d
parent84e42852910fda656ef6ab656bb6b1ccce9946b0 (diff)
downloadgenenetwork3-507f35a6027d263159d37816e033021b578d27db.tar.gz
http request header fixes
-rw-r--r--gn3/llms/client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gn3/llms/client.py b/gn3/llms/client.py
index 10764b1..18c0217 100644
--- a/gn3/llms/client.py
+++ b/gn3/llms/client.py
@@ -57,7 +57,7 @@ class GeneNetworkQAClient(Session):
BASE_URL = 'https://genenetwork.fahamuai.com/api/tasks'
- def __init__(self, account, api_key, version="v3", timeout=5, total_retries=5, backoff_factor=30):
+ def __init__(self, account, api_key, version="v3", timeout=120, total_retries=5, backoff_factor=30):
super().__init__()
self.headers.update(
{"Authorization": "Bearer " + api_key})
@@ -132,8 +132,8 @@ class GeneNetworkQAClient(Session):
return res, 1
def custom_request(self, method, url, *args, **kwargs):
- max_retries = 20
- retry_delay = 20
+ max_retries = 5
+ retry_delay = 10
response = super().request(method, url, *args, **kwargs)