language_models updated
This commit is contained in:
@@ -27,5 +27,3 @@ try:
|
||||
redis_cli = redis_conn.redis
|
||||
except Exception as e:
|
||||
print("Redis Connection Error", e)
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@ from api_services.redis.conn import redis_cli
|
||||
|
||||
|
||||
class RedisResponse:
|
||||
def __init__(self, status: bool, message: str, data: dict = None, error: str = None):
|
||||
def __init__(
|
||||
self, status: bool, message: str, data: dict = None, error: str = None
|
||||
):
|
||||
self.status = status
|
||||
self.message = message
|
||||
self.data = data
|
||||
|
||||
@@ -5,7 +5,9 @@ from .conn import redis_cli
|
||||
|
||||
|
||||
class RedisImports:
|
||||
def __init__(self, status, exceptions, access_token_tag, employee_token, occupant_token):
|
||||
def __init__(
|
||||
self, status, exceptions, access_token_tag, employee_token, occupant_token
|
||||
):
|
||||
self.status = status
|
||||
self.exceptions = exceptions
|
||||
self.ACCESS_TOKEN_TAG = access_token_tag
|
||||
@@ -13,10 +15,7 @@ class RedisImports:
|
||||
self.OccupantTokenObject = occupant_token
|
||||
|
||||
|
||||
def get_object_via_access_key(
|
||||
request,
|
||||
redis_imports: RedisImports
|
||||
):
|
||||
def get_object_via_access_key(request, redis_imports: RedisImports):
|
||||
|
||||
if not hasattr(request, "headers"):
|
||||
raise redis_imports.exceptions(
|
||||
|
||||
Reference in New Issue
Block a user