Python: Removed DefaultAzureCredential (#490)

* Removed DefaultAzureCredential

* Renamed ad_credential to credential
This commit is contained in:
Dmytro Struk
2025-08-26 08:33:17 -07:00
committed by GitHub
Unverified
parent 20d861076a
commit fa88641263
36 changed files with 230 additions and 148 deletions
@@ -15,7 +15,7 @@ from agent_framework.workflow import (
WorkflowContext,
handler,
)
from azure.identity import DefaultAzureCredential
from azure.identity import AzureCliCredential
"""
The following sample demonstrates a basic workflow that simulates
@@ -93,7 +93,9 @@ async def main():
"""Main function to run the group chat workflow."""
# Step 1: Create the executors.
chat_client = AzureChatClient(ad_credential=DefaultAzureCredential())
# For authentication, run `az login` command in terminal or replace AzureCliCredential with preferred
# authentication option.
chat_client = AzureChatClient(credential=AzureCliCredential())
writer = AgentExecutor(
chat_client.create_agent(
instructions=(
@@ -18,7 +18,7 @@ from agent_framework.workflow import (
WorkflowContext,
handler,
)
from azure.identity import DefaultAzureCredential
from azure.identity import AzureCliCredential
"""
The following sample demonstrates a basic workflow that simulates
@@ -150,7 +150,9 @@ class CriticGroupChatManager(Executor):
async def main():
"""Main function to run the group chat workflow."""
# Step 1: Create the executors.
chat_client = AzureChatClient(ad_credential=DefaultAzureCredential())
# For authentication, run `az login` command in terminal or replace AzureCliCredential with preferred
# authentication option.
chat_client = AzureChatClient(credential=AzureCliCredential())
writer = AgentExecutor(
chat_client.create_agent(
instructions=(