Skip to content

Commit f265192

Browse files
committed
Modify chat.py
1 parent 609a67b commit f265192

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/test-github-models.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
# Also run when chat.py files are modified
99
paths:
1010
- 'chat.py'
11+
- 'reasoning.py'
1112
- 'spanish/chat.py'
1213
- 'requirements.txt'
1314
- '.github/workflows/test-github-models.yaml'

chat.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
token_provider = azure.identity.get_bearer_token_provider(
1313
azure.identity.DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
1414
)
15-
client = openai.AzureOpenAI(
16-
api_version=os.environ["AZURE_OPENAI_VERSION"],
17-
azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
18-
azure_ad_token_provider=token_provider,
15+
client = openai.OpenAI(
16+
base_url=os.environ["AZURE_OPENAI_ENDPOINT"],
17+
api_key=token_provider,
1918
)
2019
MODEL_NAME = os.environ["AZURE_OPENAI_DEPLOYMENT"]
2120

0 commit comments

Comments
 (0)