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: Update to AOAI OYD 2024-02-15-preview API version #5684

Merged
merged 15 commits into from
Apr 3, 2024

Conversation

abhahn
Copy link
Member

@abhahn abhahn commented Mar 27, 2024

Motivation and Context

Description

  • Updated models to support the new preview API version 2024-02-15-preview, with some backward compatibility with previous API shape through the use of aliases
  • Updated samples, unit tests and integration tests
  • Added experimental settings management using pydantic-settings -- not strictly required here, but I thought it was useful for testing to be able to set all values through the .env file, and validation comes for free using Pydantic. Looking forward to feedback on this. :)

Contribution Checklist

@abhahn abhahn requested a review from a team as a code owner March 27, 2024 22:01
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Mar 27, 2024
@github-actions github-actions bot changed the title Update to AOAI OYD 2024-02-15-preview API version Python: Update to AOAI OYD 2024-02-15-preview API version Mar 27, 2024
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Mar 27, 2024

Py3.8 Test Coverage

Python 3.8 Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/connectors/ai/open_ai/prompt_execution_settings
   azure_chat_prompt_execution_settings.py59198%81
semantic_kernel/connectors/ai/open_ai/services
   azure_chat_completion.py511767%250, 256–258, 276–278, 293–302, 306
TOTAL5561102382% 

Python 3.8 Unit Test Overview

Tests Skipped Failures Errors Time
1207 11 💤 0 ❌ 0 🔥 1m 21s ⏱️

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.

Loving this work, thanks a lot! Added some comments!

python/semantic_kernel/utils/settings.py Outdated Show resolved Hide resolved
python/pyproject.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@moonbox3 moonbox3 left a comment

Choose a reason for hiding this comment

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

This is great, thank you for your help with this. To piggyback on Eduard's comment: I'd love to make the shift to using Pydantic settings in a separate PR. Aside from that, just a few other small questions.

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.

One small thing, but not blocking.

Copy link
Contributor

@moonbox3 moonbox3 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, Abby!

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Apr 2, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 2, 2024
@moonbox3 moonbox3 enabled auto-merge April 3, 2024 12:47
@moonbox3 moonbox3 added this pull request to the merge queue Apr 3, 2024
Merged via the queue into microsoft:main with commit ca2ad19 Apr 3, 2024
30 checks passed
LudoCorporateShark pushed a commit to LudoCorporateShark/semantic-kernel that referenced this pull request Aug 25, 2024
…5684)

### 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.
-->

### Description

* Updated models to support the new preview API version
2024-02-15-preview, with some backward compatibility with previous API
shape through the use of aliases
* Updated samples, unit tests and integration tests
* Added experimental settings management using pydantic-settings -- not
strictly required here, but I thought it was useful for testing to be
able to set all values through the .env file, and validation comes for
free using Pydantic. Looking forward to feedback on this. :)

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Abby Hartman <abhahn@microsoft.com>
Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants