Skip to content

Python: filter improvements - #10588

Merged
moonbox3 merged 6 commits into
microsoft:mainfrom
eavanvalkenburg:filter_samples
Feb 19, 2025
Merged

Python: filter improvements#10588
moonbox3 merged 6 commits into
microsoft:mainfrom
eavanvalkenburg:filter_samples

Conversation

@eavanvalkenburg

@eavanvalkenburg eavanvalkenburg commented Feb 18, 2025

Copy link
Copy Markdown
Member

Motivation and Context

Fixes some inconsistency in the filter setup between dotnet and python
Adds a sample for how to use a filter to retry a prompt with a different model.
Adds a sample for semantic caching

Closes: #10572 #5924 #10595

Description

Contribution Checklist

@eavanvalkenburg
eavanvalkenburg requested a review from a team as a code owner February 18, 2025 09:46
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Feb 18, 2025
@eavanvalkenburg
eavanvalkenburg marked this pull request as draft February 18, 2025 12:25
auto-merge was automatically disabled February 18, 2025 12:25

Pull request was converted to draft

@eavanvalkenburg eavanvalkenburg changed the title Python: add retry with fallback filter Python: filter improvements Feb 18, 2025
@markwallace-microsoft

markwallace-microsoft commented Feb 18, 2025

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel
   kernel.py2024777%143, 154, 158, 308–311, 428, 442–485
semantic_kernel/connectors/ai
   chat_completion_client_base.py124298%396, 406
semantic_kernel/connectors/memory/in_memory
   in_memory_collection.py1431689%65, 117, 119, 139, 149, 174, 189, 201, 219–222, 226, 228, 230–231
semantic_kernel/functions
   kernel_function_from_prompt.py158994%168–169, 183, 207, 213–214, 228, 254, 339
semantic_kernel/utils
   list_handler.py10280%19–21
TOTAL18793223488% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3200 5 💤 0 ❌ 0 🔥 1m 34s ⏱️

@eavanvalkenburg
eavanvalkenburg marked this pull request as ready for review February 18, 2025 14:02
Comment thread python/samples/concepts/caching/semantic_caching.py
@moonbox3
moonbox3 enabled auto-merge February 19, 2025 00:34
@moonbox3
moonbox3 added this pull request to the merge queue Feb 19, 2025
Merged via the queue into microsoft:main with commit 374d8f9 Feb 19, 2025
jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
### 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.
-->
Fixes some inconsistency in the filter setup between dotnet and python
Adds a sample for how to use a filter to retry a prompt with a different
model.
Adds a sample for semantic caching

Closes: microsoft#10572 microsoft#5924 microsoft#10595

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

memory python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port dotnet feature: .Net: Add prompt execution settings to AutoFunctionInvocationContext

5 participants