Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Check the Azure OpenAI settings API key for None #8908

Merged
merged 6 commits into from
Sep 19, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ def __init__(

# If the api_key is none, and the ad_token is none, and the ad_token_provider is none,
# then we will attempt to get the ad_token using the default endpoint specified in the Azure OpenAI settings.
if api_key is None and ad_token_provider is None and azure_openai_settings.token_endpoint and ad_token is None:
if (
azure_openai_settings.api_key is None
and ad_token_provider is None
eavanvalkenburg marked this conversation as resolved.
Show resolved Hide resolved
and ad_token is None
and azure_openai_settings.token_endpoint
):
ad_token = azure_openai_settings.get_azure_openai_auth_token(
token_endpoint=azure_openai_settings.token_endpoint
)
Expand Down
Loading