mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix - setting rpm/tpm
This commit is contained in:
parent
18b4a50847
commit
af4bdae066
1 changed files with 6 additions and 1 deletions
|
@ -23,9 +23,11 @@ def encrypt_value_helper(value: str):
|
||||||
|
|
||||||
return encrypted_value
|
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"
|
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:
|
except Exception as e:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
@ -42,6 +44,9 @@ def decrypt_value_helper(value: str):
|
||||||
decoded_b64 = base64.b64decode(value)
|
decoded_b64 = base64.b64decode(value)
|
||||||
value = decrypt_value(value=decoded_b64, signing_key=signing_key) # type: ignore
|
value = decrypt_value(value=decoded_b64, signing_key=signing_key) # type: ignore
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
# if it's not str - do not decrypt it, return the value
|
||||||
|
return value
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
verbose_proxy_logger.error(f"Error decrypting value: {value}\nError: {str(e)}")
|
verbose_proxy_logger.error(f"Error decrypting value: {value}\nError: {str(e)}")
|
||||||
# [Non-Blocking Exception. - this should not block decrypting other values]
|
# [Non-Blocking Exception. - this should not block decrypting other values]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue