Skip to content

Conversation

@furoTmark
Copy link

I think this was a missing piece as the sample used openai_client, but it wasn't defined anywhere.
Maybe a link to the samples could also help.

@furoTmark
Copy link
Author

@microsoft-github-policy-service agree

@prmerger-automator
Copy link
Contributor

@furoTmark : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit d072f67:

✅ Validation status: passed

File Status Preview URL Details
articles/ai-foundry/default/agents/how-to/migrate.md ✅Succeeded

For more details, please refer to the build report.

@ktoliver
Copy link
Contributor

@aahill

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged C+L Pull Request Review Team label label Nov 21, 2025
@github-actions
Copy link

github-actions bot commented Dec 6, 2025

This pull request has been inactive for at least 14 days. If you are finished with your changes, don't forget to sign off. See the contributor guide for instructions.
Get Help
Docs Support Teams Channel
Resolve Merge Conflict

@github-actions github-actions bot added the inactive This PR is inactive for more than 14 days label Dec 6, 2025
@v-dirichards v-dirichards requested a review from Copilot December 8, 2025 21:30
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 fixes a code sample in the migration guide by adding the missing initialization of the openai_client variable. The sample code was using openai_client without defining it, which would cause an error if users tried to run the code as-is.

Key changes:

  • Wrapped the code sample in a with project_client.get_openai_client() as openai_client: context manager to properly initialize the openai_client
  • Re-indented all code within the sample to reflect the new context manager scope

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit e9667d2:

✅ Validation status: passed

File Status Preview URL Details
articles/ai-foundry/default/agents/how-to/migrate.md ✅Succeeded

For more details, please refer to the build report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants