Skip to content

Commit

Permalink
More debug logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
moonbox3 committed Sep 19, 2024
1 parent 6a22b2b commit 255ef41
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,26 @@ def __init__(

# If the async_client is None, the api_key is none, 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.

# Temp debug logging
print(f"async_client: {async_client is not None}")
print(f"api_key: {azure_openai_settings.api_key is not None}")
print(f"ad_token: {ad_token is not None}")
print(f"ad_token_provider: {ad_token_provider is not None}")
print(f"token_endpoint: {azure_openai_settings.token_endpoint is not None}")

if (
async_client is None
and azure_openai_settings.api_key is None
and ad_token_provider is None
and ad_token is None
and azure_openai_settings.token_endpoint
):
print("Getting ad_token")
ad_token = azure_openai_settings.get_azure_openai_auth_token(
token_endpoint=azure_openai_settings.token_endpoint
)
print(f"Called get ad_token: {ad_token is not None}")

if not async_client and not azure_openai_settings.api_key and not ad_token and not ad_token_provider:
raise ServiceInitializationError(
Expand Down

0 comments on commit 255ef41

Please sign in to comment.