Repository navigation
Python: correct built-in chat-client selectors in sample guide - #9673
Open
LI (ktz03) wants to merge 1 commit into
Open
LI (ktz03) wants to merge 1 commit into
LI (ktz03) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documentation-only corrections match the sample’s accepted selectors and call flow, with no unresolved findings.
No open issues 🎉
What changed in this PR
Corrects the built-in chat-client sample guide to match the existing factory selectors and call flow. Runtime behavior is unchanged.
Changes:
- Replaces stale selectors with
openai_chatandazure_openai_chatin the startup example, client list, and environment-variable descriptions. - Clarifies that
main()receives a client name and callsget_client()internally.
| File | Description |
|---|---|
python/samples/02-agents/chat_client/README.md |
Aligns documented selectors and call flow with the existing sample. |
Review effort: Balanced
This branch was successfully deployed
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 & Context
The built-in chat-client sample guide recommends
openai_responsesandazure_openai_responses, butget_client()acceptsopenai_chatandazure_openai_chat. Following either documented selector reaches the factory's unsupported-name error instead of selecting the intended client.Description & Review Guide
main()receives the name and callsget_client()internally.ClientName, factory branches, default argument, and entry point. Isolated checks executed the unchanged factory body with inert constructors: both old documented names raisedValueError, while the corrected eight-name list was accepted and six unchanged selectors remained controls. No SDK client, credential, full sample, model call, or build was run.Related Issue
N/A - trivial change. These are stale string arguments and an inaccurate call-flow description; the correction follows the existing sample without adding aliases or changing its behavior.
AI Assistance
AI assistance details: Codex: documentation and this PR description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.