mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix - setting rpm/tpm
This commit is contained in:
parent
e835f7336a
commit
bbf3de74dd
1 changed files with 6 additions and 1 deletions
|
@ -23,9 +23,11 @@ def encrypt_value_helper(value: str):
|
|||
|
||||
return encrypted_value
|
||||
|
||||
raise ValueError(
|
||||
verbose_proxy_logger.debug(
|
||||
f"Invalid value type passed to encrypt_value: {type(value)} for Value: {value}\n Value must be a string"
|
||||
)
|
||||
# if it's not a string - do not encrypt it and return the value
|
||||
return value
|
||||
except Exception as e:
|
||||
raise e
|
||||
|
||||
|
@ -42,6 +44,9 @@ def decrypt_value_helper(value: str):
|
|||
decoded_b64 = base64.b64decode(value)
|
||||
value = decrypt_value(value=decoded_b64, signing_key=signing_key) # type: ignore
|
||||
return value
|
||||
|
||||
# if it's not str - do not decrypt it, return the value
|
||||
return value
|
||||
except Exception as e:
|
||||
verbose_proxy_logger.error(f"Error decrypting value: {value}\nError: {str(e)}")
|
||||
# [Non-Blocking Exception. - this should not block decrypting other values]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue