Merge branch 'NovaOSS:main' into main

This commit is contained in:
Game_Time 2023-08-20 17:10:13 +05:00 committed by GitHub
commit 09e2b870e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 14 deletions

View file

@ -47,7 +47,7 @@ class UserManager:
async def create(self, discord_id: str = '') -> dict: async def create(self, discord_id: str = '') -> dict:
chars = string.ascii_letters + string.digits chars = string.ascii_letters + string.digits
infix = os.getenv('KEYGEN_INFIX') infix = os.getenv('KEYGEN_INFIX', 'S3LFH0ST')
suffix = ''.join(random.choices(chars, k=20)) suffix = ''.join(random.choices(chars, k=20))
prefix = ''.join(random.choices(chars, k=20)) prefix = ''.join(random.choices(chars, k=20))

View file

@ -92,7 +92,7 @@ def test_api_moderation() -> dict:
def test_all(): def test_all():
"""Runs all tests.""" """Runs all tests."""
try:
print("Waiting until API Server is started up...") print("Waiting until API Server is started up...")
time.sleep(6) time.sleep(6)
@ -110,6 +110,9 @@ def test_all():
print('[lightblue]Checking the /v1/models endpoint...') print('[lightblue]Checking the /v1/models endpoint...')
print(test_models()) print(test_models())
except Exception as e:
print('[red]Error: ' + e)
exit(500)
if __name__ == '__main__': if __name__ == '__main__':
closedai.api_base = api_endpoint closedai.api_base = api_endpoint