Skip to content

Python: FunctionResultContent hash fix to handle lists/sets - #9978

Merged
Evan Mattson (moonbox3) merged 8 commits into
microsoft:mainfrom
moonbox3:frc-hash-fix
Dec 16, 2024
Merged

Evan Mattson (moonbox3) merged 8 commits into
microsoft:mainfrom
moonbox3:frc-hash-fix

Conversation

@moonbox3

Copy link
Copy Markdown
Collaborator

Motivation and Context

Currently, the hash function in FunctionResultContent does not properly handle types of list or set. Adding the proper handling to turn these into a tuple, and then the hash function works properly.

Description

This PR:

Contribution Checklist

@moonbox3
Evan Mattson (moonbox3) requested a review from a team as a code owner December 16, 2024 04:38
@markwallace-microsoft Mark Wallace (markwallace-microsoft) added the python Pull requests for the Python Semantic Kernel label Dec 16, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

small note

@markwallace-microsoft

Mark Wallace (markwallace-microsoft) commented Dec 16, 2024 •

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/open_ai
   assistant_content_generation.py1551392%93–96, 114, 117–118, 350–358, 400, 402
semantic_kernel/contents
   function_result_content.py85298%163–165
semantic_kernel/functions
   kernel_function_from_prompt.py154795%167–168, 182, 203, 221, 241, 324
TOTAL16745185589% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
2966 4 💤 0 ❌ 0 🔥 1m 8s ⏱️

@moonbox3
Evan Mattson (moonbox3) added this pull request to the merge queue Dec 16, 2024
Merged via the queue into microsoft:main with commit b427208 Dec 16, 2024
@moonbox3
Evan Mattson (moonbox3) deleted the frc-hash-fix branch December 16, 2024 22:24
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.

Python: unhashable type 'list' exception in function_result_content __hash__ function

4 participants