We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf5ad72 + dd38d99 commit 7a12df7Copy full SHA for 7a12df7
scripts/service_setup.py
@@ -57,7 +57,8 @@ def get_openai_client(oai_config: dict):
57
return openai.AzureOpenAI(
58
api_version=oai_config["api_version"],
59
azure_endpoint=oai_config["api_base"],
60
- azure_ad_token=oai_config["api_key"],
+ api_key=oai_config["api_key"] if os.environ.get("AZURE_OPENAI_KEY") else None,
61
+ azure_ad_token=None if os.environ.get("AZURE_OPENAI_KEY") else oai_config["api_key"],
62
azure_deployment=oai_config["deployment_id"],
63
)
64
else:
0 commit comments