mirror of
https://github.com/cunnymessiah/keychecker.git
synced 2026-05-10 18:39:04 -07:00
fixed other guys fuckup
This commit is contained in:
+2
-2
@@ -66,7 +66,7 @@ async def test_invoke_perms(key: APIKey, session, model):
|
|||||||
if message and ('The request signature we calculated does not match the signature you provided' in message or 'The security token included in the request is invalid' in message):
|
if message and ('The request signature we calculated does not match the signature you provided' in message or 'The security token included in the request is invalid' in message):
|
||||||
return False
|
return False
|
||||||
elif response.status == 400 or response.status == 404:
|
elif response.status == 400 or response.status == 404:
|
||||||
if message and 'The provided body' in message:
|
if message and 'Malformed input request' in message:
|
||||||
if key.region == "":
|
if key.region == "":
|
||||||
key.region = region
|
key.region = region
|
||||||
else:
|
else:
|
||||||
@@ -190,7 +190,7 @@ async def invoke_model(key: APIKey, session, region, model):
|
|||||||
async with session.post(url, headers=signed_headers, data=signed_data) as response:
|
async with session.post(url, headers=signed_headers, data=signed_data) as response:
|
||||||
if response.status == 400:
|
if response.status == 400:
|
||||||
resp = await response.json()
|
resp = await response.json()
|
||||||
if resp['message'] and 'The provided body' in resp['message']:
|
if resp['message'] and 'Malformed input request' in resp['message']:
|
||||||
key.models[region].append(model_name)
|
key.models[region].append(model_name)
|
||||||
elif resp['message'] and 'Operation not' in resp['message']:
|
elif resp['message'] and 'Operation not' in resp['message']:
|
||||||
key.useless = True
|
key.useless = True
|
||||||
|
|||||||
Reference in New Issue
Block a user