Fix swapped Azure endpoint hostname in examples/azure.py#3298
Open
aryanmotgi wants to merge 1 commit into
Open
Fix swapped Azure endpoint hostname in examples/azure.py#3298aryanmotgi wants to merge 1 commit into
aryanmotgi wants to merge 1 commit into
Conversation
The second AzureOpenAI client example used the hostname
example-resource.azure.openai.com, but Azure OpenAI resources live at
{resource}.openai.azure.com. The sibling example above (line 11)
already uses the correct openai.azure.com form, as do the Microsoft
docs linked in the comment.
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.
The second
AzureOpenAIclient inexamples/azure.pyuseshttps://example-resource.azure.openai.com/, but Azure OpenAI endpoints live at{resource}.openai.azure.com— the subdomain order is swapped.The first example client in the same file (a few lines up) already uses the correct
example-endpoint.openai.azure.comform, and the Microsoft docs URL in the adjacent comment also referencesopenai.azure.com. So this is a typo in a single line, not a different style.Users copy-pasting the example will hit DNS or TLS errors when trying it against a real resource.
Scope: this PR touches only the example.
tests/lib/test_azure.pyhas the same swapped form in fixture URLs, but those values are opaque to the assertions, so they are intentionally left out of this PR to keep the diff narrow.