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 OpenAI assistant metadata type #10383

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Feb 3, 2025

Motivation and Context

OpenAI Python SDK released 1.61.0 that contained a change which broke code.

Changes in the release: openai/openai-python@12b87a4

Description

This pull request includes several changes to the metadata type and the handling of metadata in various files, as well as updates to test files to reflect these changes. The most important changes include modifying the metadata type from dict[str, Any] to dict[str, str] and updating the tests to use json.dumps for metadata values.

Note: this is a breaking change because if users are not passing in the expected type before, they will need to update their code to pass in the correct type now.

Contribution Checklist

@TaoChenOSU TaoChenOSU added the python Pull requests for the Python Semantic Kernel label Feb 3, 2025
@TaoChenOSU TaoChenOSU self-assigned this Feb 3, 2025
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner February 3, 2025 23:39
@github-actions github-actions bot changed the title Fix OpenAI assistant metadata type Python: Fix OpenAI assistant metadata type Feb 3, 2025
@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/open_ai
   azure_assistant_agent.py110496%157, 159, 285, 302
   open_ai_assistant_agent.py111595%152, 154, 268, 288, 307
   open_ai_assistant_base.py5211398%188, 197–202, 282, 298–299, 767, 821, 1027, 1035, 1120, 1184
TOTAL17593235987% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3049 4 💤 0 ❌ 0 🔥 1m 18s ⏱️

@TaoChenOSU TaoChenOSU enabled auto-merge February 4, 2025 00:18
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Feb 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 4, 2025
@moonbox3 moonbox3 added this pull request to the merge queue Feb 4, 2025
Merged via the queue into main with commit 1b85aa9 Feb 4, 2025
27 checks passed
@moonbox3 moonbox3 deleted the taochen/python-fix-openai-assistant-metadata-type branch February 4, 2025 01:58
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
Status: Sprint: Done
Development

Successfully merging this pull request may close these issues.

4 participants