Skip to content

Fix(FlowiseChatGoogleGenerativeAI): Prevent "parts must not be empty" API error in Seq Agents #4292

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

Merged
merged 5 commits into from
Apr 14, 2025

Conversation

toi500
Copy link
Contributor

@toi500 toi500 commented Apr 13, 2025

Issue

The Gemini API was receiving requests with empty content parts when used in complex flows in Seq Agents, causing a 400 Bad Request error.

image

Root Cause

The convertAuthorToRole function was incorrectly mapping function/tool messages to 'user', causing message merging logic to create empty content parts when tool interactions occurred.

Fix Compatible with Multi-Agents too

image

Gemini Dependencies

All Gemini and Langchain-Gemini dependencies updated to the latest version.

Gemini Models

Gemini Models list updated.

Reproducible bug Flow

bug Agents.json

@HenryHengZJ HenryHengZJ merged commit d71369c into FlowiseAI:main Apr 14, 2025
2 checks passed
Yshayy pushed a commit to Yshayy/Flowise that referenced this pull request Apr 23, 2025
… API error in Seq Agents (FlowiseAI#4292)

* Fix(FlowiseChatGoogleGenerativeAI): Prevent "parts must not be empty" API error in Seq Agents

* Fix: Update pnpm-lock.yaml to resolve CI issues

* convert role function and tool to function

* remove comment

---------

Co-authored-by: Henry <[email protected]>
@toi500 toi500 deleted the gemini-fix branch April 23, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants