-
Notifications
You must be signed in to change notification settings - Fork 1k
Python: Added AzureAI sample for downloading code interpreter generated files #3189
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?
Conversation
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.
Pull request overview
This PR adds a new sample demonstrating how to download files generated by Azure AI's code interpreter tool. It also includes a minor fix to improve import consistency in an existing sample.
Changes:
- Added new sample
azure_ai_with_code_interpreter_file_download.pyshowing how to download files from code interpreter using the OpenAI containers API in both streaming and non-streaming scenarios - Fixed import statement in
azure_ai_with_code_interpreter_file_generation.pyto use the public API export ofAgentRunResponseUpdate
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| python/samples/getting_started/agents/azure_ai/azure_ai_with_code_interpreter_file_generation.py | Moved AgentRunResponseUpdate import from private _agents module to public API export |
| python/samples/getting_started/agents/azure_ai/azure_ai_with_code_interpreter_file_download.py | New sample demonstrating file download from code interpreter with both streaming and non-streaming approaches |
Motivation and Context
Users working with code interpreter could see file IDs in responses but had no guidance on how to actually download the generated files. The existing
azure_ai_with_code_interpreter_file_generation.pysample only showed file ID extraction without demonstrating the download process.This PR adds a new sample demonstrating how to download files generated by Azure AI's code interpreter tool in both streaming and non-streaming scenarios.
Closes #3143
Description
Contribution Checklist