in aidial_sdk/deployment/from_request_mixin.py [0:0]
def create_secrets(cls, values: dict):
if "api_key" in values:
if "api_key_secret" not in values:
values["api_key_secret"] = SecretStr(values.pop("api_key"))
else:
raise ValueError(
"api_key and api_key_secret cannot be both provided"
)
if "jwt" in values:
if "jwt_secret" not in values:
values["jwt_secret"] = SecretStr(values.pop("jwt"))
else:
raise ValueError("jwt and jwt_secret cannot be both provided")
return values