Skip to content

Conversation

nlinhvu
Copy link
Contributor

@nlinhvu nlinhvu commented May 8, 2025

MethodToolCallback can return a String(which is Textual Json/Json String) that is not supported by jsonToStruct method. => Update jsonToStruct method with Textual Json/Json String.

MethodToolCallback relies on DefaultToolCallResultConverter which is not always return Textual Json/Json String, in case of methodReturnType is void, it simply returns simple String: "Done" that cannot be parsed by jsonToStruct => Update DefaultToolCallResultConverter always return Textual Json/Json String.

Signed-off-by: nlinhvu <nlinhvu.dev@gmail.com>
@nlinhvu nlinhvu force-pushed the gemini-functioncalling branch from beacf6a to 9e2a67b Compare May 8, 2025 03:53
@markpollack markpollack added this to the 1.0.0-RC1 milestone May 8, 2025
@tzolov tzolov added bug Something isn't working tool/function calling vertex labels May 9, 2025
@tzolov
Copy link
Contributor

tzolov commented May 9, 2025

@nlinhvu thank you for catching this

@tzolov
Copy link
Contributor

tzolov commented May 9, 2025

Rebased and merged at f2df87b

@cho-thinkfree-com
Copy link
Contributor

cho-thinkfree-com commented Sep 30, 2025

The issue I found is slightly different from this one.

When creating an exception processor like this:

DefaultToolExecutionExceptionProcessor(false)

The exception message is passed into the ToolResponse as a plain String in the responseData field.
Since it is delivered as a plain string rather than a JSON string, it causes errors when processed by the Vertex AI Chat Model.

I have submitted a fix for this in PR #4521

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants