mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Removed DefaultAzureCredential (#490)
* Removed DefaultAzureCredential * Renamed ad_credential to credential
This commit is contained in:
committed by
GitHub
Unverified
parent
20d861076a
commit
fa88641263
@@ -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=(
|
||||
|
||||
Reference in New Issue
Block a user