-
Notifications
You must be signed in to change notification settings - Fork 397
Added missing openai_client reference to sample #608
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
|
@microsoft-github-policy-service agree |
|
@furoTmark : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit d072f67: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
|
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. |
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 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 theopenai_client - Re-indented all code within the sample to reflect the new context manager scope
Co-authored-by: Copilot <[email protected]>
|
Learn Build status updates of commit e9667d2: ✅ Validation status: passed
For more details, please refer to the build report. |
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.