Skip to content

Commit 99db1b7

Browse files
authored
to get API key from environment viarble of WATSONX_APIKEY (#10131)
1 parent 173ef01 commit 99db1b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

litellm/llms/watsonx/common_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def generate_iam_token(api_key=None, **params) -> str:
3838
headers = {}
3939
headers["Content-Type"] = "application/x-www-form-urlencoded"
4040
if api_key is None:
41-
api_key = get_secret_str("WX_API_KEY") or get_secret_str("WATSONX_API_KEY")
41+
api_key = get_secret_str("WX_API_KEY") or get_secret_str("WATSONX_API_KEY") or get_secret_str("WATSONX_APIKEY")
4242
if api_key is None:
4343
raise ValueError("API key is required")
4444
headers["Accept"] = "application/json"

0 commit comments

Comments
 (0)