-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update item type check for workflow actions #45260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ | |
| from azure.ai.projects.models import ( | ||
| PromptAgentDefinition, | ||
| WorkflowAgentDefinition, | ||
| ItemResourceType, | ||
| ItemResource, | ||
| ) | ||
|
|
||
| load_dotenv() | ||
|
|
@@ -157,7 +157,7 @@ | |
| print(f"Event {event.sequence_number} type '{event.type}'", end="") | ||
| if ( | ||
| event.type == "response.output_item.added" or event.type == "response.output_item.done" | ||
| ) and event.item.type == ItemResourceType.WORKFLOW_ACTION: | ||
| ) and event.item is not None and event.item.type == "workflow_action": | ||
|
Comment on lines
158
to
+160
|
||
| print( | ||
| f": item action ID '{event.item.action_id}' is '{event.item.status}' (previous action ID: '{event.item.previous_action_id}')", | ||
| end="", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ItemResourceis imported but never used in this sample. This will trigger unused-import linting in many CI configurations. If the intent is to avoid string literals for the item type check, consider importing/usingItemResourceTypeinstead; otherwise remove this import entirely.