Skip to content

Conversation

@giles17
Copy link
Contributor

@giles17 giles17 commented Jan 13, 2026

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.py sample 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

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings January 13, 2026 02:45
@giles17 giles17 enabled auto-merge January 13, 2026 02:45
@github-actions github-actions bot changed the title Add AzureAI sample for downloading code interpreter generated files Python: Add AzureAI sample for downloading code interpreter generated files Jan 13, 2026
Copy link
Contributor

Copilot AI left a 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.py showing 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.py to use the public API export of AgentRunResponseUpdate

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

@giles17 giles17 changed the title Python: Add AzureAI sample for downloading code interpreter generated files Python: Added AzureAI sample for downloading code interpreter generated files Jan 13, 2026
@markwallace-microsoft markwallace-microsoft added the documentation Improvements or additions to documentation label Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Feature]: Add file download example to azure_ai_with_code_interpreter_file_generation.py

4 participants