Skip to content

Commit 8393660

Browse files
committed
Updated workflow samples to use new name WorkflowAgentDefinition
1 parent 362fba0 commit 8393660

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sdk/ai/azure-ai-projects/samples/agents/sample_workflow_multi_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
from azure.identity import DefaultAzureCredential
3030
from azure.ai.projects import AIProjectClient
31-
from azure.ai.projects.models import AgentReference, PromptAgentDefinition, ResponseStreamEventType, WorkflowDefinition
31+
from azure.ai.projects.models import AgentReference, PromptAgentDefinition, ResponseStreamEventType, WorkflowAgentDefinition
3232

3333
load_dotenv()
3434

@@ -136,7 +136,7 @@
136136

137137
workflow = project_client.agents.create_version(
138138
agent_name="student-teacherworkflow",
139-
definition=WorkflowDefinition(workflow=workflow_yaml),
139+
definition=WorkflowAgentDefinition(workflow=workflow_yaml),
140140
)
141141

142142
print(f"Agent created (id: {workflow.id}, name: {workflow.name}, version: {workflow.version})")

sdk/ai/azure-ai-projects/samples/agents/sample_workflow_multi_agent_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
from azure.identity.aio import DefaultAzureCredential
3131
from azure.ai.projects.aio import AIProjectClient
32-
from azure.ai.projects.models import AgentReference, PromptAgentDefinition, ResponseStreamEventType, WorkflowDefinition
32+
from azure.ai.projects.models import AgentReference, PromptAgentDefinition, ResponseStreamEventType, WorkflowAgentDefinition
3333

3434
load_dotenv()
3535

@@ -139,7 +139,7 @@ async def main():
139139

140140
workflow = await project_client.agents.create_version(
141141
agent_name="student-teacherworkflow",
142-
definition=WorkflowDefinition(workflow=workflow_yaml),
142+
definition=WorkflowAgentDefinition(workflow=workflow_yaml),
143143
)
144144

145145
print(f"Agent created (id: {workflow.id}, name: {workflow.name}, version: {workflow.version})")

0 commit comments

Comments
 (0)