Skip to content

Python: Enable core skills, retry mechanisms and template engine protocols to be used as pydantic fields#2287

Merged
awharrison-28 merged 4 commits intomicrosoft:mainfrom
AdityaGudimella:adgudime/python/serialization/test
Aug 3, 2023
Merged

Python: Enable core skills, retry mechanisms and template engine protocols to be used as pydantic fields#2287
awharrison-28 merged 4 commits intomicrosoft:mainfrom
AdityaGudimella:adgudime/python/serialization/test

Conversation

@AdityaGudimella
Copy link
Contributor

@AdityaGudimella AdityaGudimella commented Aug 2, 2023

Summary

This is part 1 of the Serialization work for semantic kernel.

Corresponding issue: #131

Motivation and Context

This PR allows core skills (all except 2), retry mechanisms and template engine protocols to be used
as valid pydantic fields. This allows me to convert the classes that depend on these classes to pydantic
models, and thus be able to serialize them.

No user facing code changes are expected from this PR.

Description

Contribution Checklist

Yet to upgrade:
- ConversationSummarySkill
- WebSearchEngineSkill
Reason: They contain data, and thus need to be pydantic models.

Tests:
- Added test to ensure that upgraded skills are valid pydantic fields
  and can be serialized.
This folder contains a single file. Doesn't make sense to put up a separate
PR for this.
@AdityaGudimella AdityaGudimella requested a review from a team as a code owner August 2, 2023 19:14
@shawncal shawncal added the python Pull requests for the Python Semantic Kernel label Aug 2, 2023
@shawncal shawncal changed the title Enable core skills, retry mechanisms and template engine protocols to be used as pydantic fields Python: Enable core skills, retry mechanisms and template engine protocols to be used as pydantic fields Aug 2, 2023
@AdityaGudimella
Copy link
Contributor Author

AdityaGudimella commented Aug 3, 2023 via email

Copy link
Contributor

@awharrison-28 awharrison-28 left a comment

Choose a reason for hiding this comment

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

Per offline discussion, ConversationSummarySkill and WebSearchEngineSkill will be addressed in a separate PR

@awharrison-28 awharrison-28 added this pull request to the merge queue Aug 3, 2023
Merged via the queue into microsoft:main with commit ca6548a Aug 3, 2023
SOE-YoungS pushed a commit to SOE-YoungS/semantic-kernel that referenced this pull request Nov 1, 2023
…ocols to be used as pydantic fields (microsoft#2287)

### Summary

This is part 1 of the Serialization work for semantic kernel.

Corresponding issue:
microsoft#131

### Motivation and Context

This PR allows core skills (all except 2), retry mechanisms and template
engine protocols to be used
as valid pydantic fields. This allows me to convert the classes that
depend on these classes to pydantic
models, and thus be able to serialize them.

No user facing code changes are expected from this PR.

<!-- 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

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### 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: Abby Harrison <abharris@microsoft.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

None yet

Development

Successfully merging this pull request may close these issues.

4 participants