Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes .NET samples related to image inputs and conversation history parsing to make them more reliable and self-contained when run locally.
Changes:
- Fix image asset path casing in the FoundryAgents “UsingImages” sample to match the on-disk
Assets/folder. - Update the Azure OpenAI “UsingImages” sample to load a local image asset (and add/copy the asset via the project file).
- Make the OpenAI Conversations “Conversation” sample more robust by skipping non-message items and safely handling missing content/text fields.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/samples/02-agents/FoundryAgents/FoundryAgents_Step10_UsingImages/Program.cs | Fixes the image path to Assets/walkway.jpg to match the folder name. |
| dotnet/samples/02-agents/Agents/Agent_Step08_UsingImages/Program.cs | Switches from a remote image URI to loading a local Assets/walkway.jpg. |
| dotnet/samples/02-agents/Agents/Agent_Step08_UsingImages/Assets/walkway.jpg | Adds the local image asset used by the sample. |
| dotnet/samples/02-agents/Agents/Agent_Step08_UsingImages/Agent_Step08_UsingImages.csproj | Ensures Assets/walkway.jpg is copied to the output directory. |
| dotnet/samples/02-agents/AgentWithOpenAI/Agent_OpenAI_Step05_Conversation/Program.cs | Avoids exceptions when enumerating conversation items that don’t have role/content/text. |
SergeyMenshykh
approved these changes
Mar 26, 2026
peibekwe
approved these changes
Mar 26, 2026
Merged
This was referenced Apr 3, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Description
Contribution Checklist