Skip to content

feat(vertex-ai-gemini): enhance jsonToStruct to support JSON arrays #2977

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

Conversation

tzolov
Copy link
Contributor

@tzolov tzolov commented May 3, 2025

Improve the jsonToStruct method in VertexAiGeminiChatModel to handle JSON arrays in addition to JSON objects. When a JSON array is detected, it's now properly converted to a Protobuf Struct with an items field containing the array elements.

Resolves #2647 , #2849

Improve the jsonToStruct method in VertexAiGeminiChatModel to handle JSON arrays
in addition to JSON objects. When a JSON array is detected, it's now properly
converted to a Protobuf Struct with an items field containing the array elements.

Resolves spring-projects#2647 , spring-projects#2849

Signed-off-by: Christian Tzolov <[email protected]>
@tzolov tzolov added this to the 1.0.0-RC1 milestone May 3, 2025
@markpollack markpollack self-assigned this May 3, 2025
@markpollack
Copy link
Member

added test. merged in 78d90cd

@markpollack markpollack closed this May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MCP Server and Vertex AI
2 participants