Skip to content

Python: Added Samples for HostedCodeInterpreterTool with files#1583

Merged
giles17 merged 2 commits intomicrosoft:mainfrom
giles17:code_interpreter_sample
Oct 21, 2025
Merged

Python: Added Samples for HostedCodeInterpreterTool with files#1583
giles17 merged 2 commits intomicrosoft:mainfrom
giles17:code_interpreter_sample

Conversation

@giles17
Copy link
Copy Markdown
Contributor

@giles17 giles17 commented Oct 20, 2025

Motivation and Context

This PR adds new sample files demonstrating how to use HostedCodeInterpreterTool with file uploads for both Azure OpenAI and OpenAI services.

Resolves #1518

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 October 20, 2025 20:26
@github-actions github-actions bot changed the title Added Samples for HostedCodeInterpreterTool with files Python: Added Samples for HostedCodeInterpreterTool with files Oct 20, 2025
Copy link
Copy Markdown
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 two new sample files demonstrating how to use HostedCodeInterpreterTool with file uploads for both Azure OpenAI and OpenAI services, resolving issue #1518.

Key Changes:

  • Added sample for OpenAI Responses Client with code interpreter and file uploads
  • Added sample for Azure OpenAI Responses Client with code interpreter and file uploads
  • Added print statement to existing file search example for consistency

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
python/samples/getting_started/agents/openai/openai_responses_client_with_code_interpreter_files.py New sample demonstrating OpenAI Responses Client with HostedCodeInterpreterTool and file uploads
python/samples/getting_started/agents/azure_openai/azure_responses_client_code_interpreter_files.py New sample demonstrating Azure OpenAI Responses Client with HostedCodeInterpreterTool and file uploads
python/samples/getting_started/agents/openai/openai_assistants_with_file_search.py Added print statement for consistency with other samples

@giles17 giles17 added this pull request to the merge queue Oct 21, 2025
Merged via the queue into microsoft:main with commit e8a7d3b Oct 21, 2025
19 checks passed
ReubenBond pushed a commit to ReubenBond/agent-framework that referenced this pull request Oct 28, 2025
arisng pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python examples of how to use HostedCodeInterpreter

5 participants