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: Fix function call content argument parsing #10132

Conversation

TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Jan 8, 2025

Motivation and Context

This PR includes changes to improve the handling of JSON parsing when it fails to be parsed as it is in function call arguments by adding a regular expression for preprocessing JSON strings to remove single quotes only when they are not escaped.

Description

Enhancements to JSON parsing:

Test file updates:

Contribution Checklist

@TaoChenOSU TaoChenOSU added the python Pull requests for the Python Semantic Kernel label Jan 8, 2025
@TaoChenOSU TaoChenOSU self-assigned this Jan 8, 2025
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner January 8, 2025 20:13
@github-actions github-actions bot changed the title Fix function call content argument parsing Python: Fix function call content argument parsing Jan 8, 2025
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jan 8, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/contents
   function_call_content.py106298%196, 224
TOTAL16650176989% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
2992 4 💤 0 ❌ 0 🔥 1m 15s ⏱️

@moonbox3 moonbox3 added this pull request to the merge queue Jan 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 8, 2025
@eavanvalkenburg eavanvalkenburg force-pushed the taochen/python-fix-function-call-content-argument-parsing branch from df91273 to 36e0d7f Compare January 9, 2025 10:43
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jan 9, 2025
Merged via the queue into microsoft:main with commit 4882550 Jan 9, 2025
25 checks passed
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
Status: Sprint: Done
Development

Successfully merging this pull request may close these issues.

5 participants