Skip to content
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

Merged
merged 4 commits into from
Apr 17, 2024

Conversation

andrewDoing
Copy link
Contributor

Motivation and Context

  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

change base_url to endpoint

Contribution Checklist

@andrewDoing andrewDoing requested a review from a team as a code owner April 3, 2024 18:54
@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel documentation labels Apr 3, 2024
@github-actions github-actions bot changed the title [Python Getting Started] Update `base_usi Python: [Python Getting Started] Update `base_usi Apr 3, 2024
@andrewDoing andrewDoing changed the title Python: [Python Getting Started] Update `base_usi [Python Getting Started] Update base_url to endpoint Apr 3, 2024
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Apr 3, 2024

Py3.8 Test Coverage

Python 3.8 Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL556899782% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python 3.8 Unit Test Overview

Tests Skipped Failures Errors Time
1211 18 💤 0 ❌ 0 🔥 21.755s ⏱️

@prathyk
Copy link

prathyk commented Apr 14, 2024

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

Copy link
Member

@eavanvalkenburg eavanvalkenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@eavanvalkenburg
Copy link
Member

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

@prathyk you should be able to just change base_url to endpoint!

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Apr 17, 2024
Merged via the queue into microsoft:main with commit 6eebbfc Apr 17, 2024
31 checks passed
LudoCorporateShark pushed a commit to LudoCorporateShark/semantic-kernel that referenced this pull request Aug 25, 2024
)

### 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 <eavanvalkenburg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants