Skip to content

Python: Fix issues of Gemini parallel function call#10813

Merged
TaoChenOSU merged 1 commit intomicrosoft:mainfrom
TaoChenOSU:taochen/python-fix-10597
Mar 5, 2025
Merged

Python: Fix issues of Gemini parallel function call#10813
TaoChenOSU merged 1 commit intomicrosoft:mainfrom
TaoChenOSU:taochen/python-fix-10597

Conversation

@TaoChenOSU
Copy link
Copy Markdown
Contributor

@TaoChenOSU TaoChenOSU commented Mar 5, 2025

Motivation and Context

Closing #10597

Description

  1. Collapse consecutive tool call messages into a single tool message with multiple function result items before sending the chat history to the API.
  2. Add unit test.

Contribution Checklist

@TaoChenOSU TaoChenOSU added the python Pull requests for the Python Semantic Kernel label Mar 5, 2025
@TaoChenOSU TaoChenOSU self-assigned this Mar 5, 2025
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner March 5, 2025 18:57
@github-actions github-actions bot changed the title Fix issues of Gemini parallel function call Python: Fix issues of Gemini parallel function call Mar 5, 2025
@markwallace-microsoft
Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/connectors/ai/google
   shared_utils.py32197%63
semantic_kernel/connectors/ai/google/google_ai/services
   google_ai_chat_completion.py124695%127, 132, 158, 163, 188, 190
semantic_kernel/connectors/ai/google/vertex_ai/services
   vertex_ai_chat_completion.py119497%124, 153, 181, 183
TOTAL19609255487% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3208 5 💤 0 ❌ 0 🔥 1m 39s ⏱️

@TaoChenOSU TaoChenOSU added this pull request to the merge queue Mar 5, 2025
Merged via the queue into microsoft:main with commit 1c9b166 Mar 5, 2025
30 checks passed
@TaoChenOSU TaoChenOSU deleted the taochen/python-fix-10597 branch March 5, 2025 20:03
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel Mar 5, 2025
musale pushed a commit to musale/semantic-kernel that referenced this pull request Mar 10, 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.
-->
Closing microsoft#10597 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Collapse consecutive tool call messages into a single tool message
with multiple function result items before sending the chat history to
the API.
2. Add unit test.

### 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 😄
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.
-->
Closing microsoft#10597 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Collapse consecutive tool call messages into a single tool message
with multiple function result items before sending the chat history to
the API.
2. Add unit test.

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

4 participants