-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Python Getting Started] Update base_url
to endpoint
#5765
Conversation
Update Python README.md
base_url
to endpoint
I was very much excited to learn about semantic-kernel. I quickly jumped in to some tutorials and started trying it only to end up wasting 3 hours of my time debugging this issue. I hope this gets merged soon. Its not a good welcome for one who wants to learn semantic-kernel with Azure OpenAI account. Workaround that I'm using now: chat = AzureChatCompletion(service_id=service_id, api_version=azure.api_version,
deployment_name="gpt-4", base_url=azure.api_base+"/openai", ad_token_provider=azure.token_provider) Note how I'm appending "/openai" to base_url |
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.
Thanks
@prathyk you should be able to just change base_url to endpoint! |
) ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> 1. This change helps users by being able to copy the Azure OpenAI endpoint directly 2. This solves the problem of getting a 404 Resource Not Found when using `base_url` 3. Getting Started in Python scenario ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> change `base_url` to `endpoint` ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 Co-authored-by: Eduard van Valkenburg <[email protected]>
Hi folks. It's still an issue today. I had to append the "/openai" to the base_url to make it work. I am on sk 1.18.2. |
hi, in this case you should use endpoint, and not base_url, base_url should contain the whole thing semantic-kernel/python/semantic_kernel/connectors/ai/open_ai/services/azure_config_base.py Line 82 in d06d230
|
Thanks for the quick answer. I tried with endpoint but I get a "resource not found" error. |
can you share the broader code? and have you validated all the params? |
Please make sure your AZURE_OPENAI_API_VERSION is correct. If not, it will throw a 404. I just tested it right now and I see, via logging:
|
Motivation and Context
base_url
Description
change
base_url
toendpoint
Contribution Checklist