feat(vertex-ai): Refactor Gemini for new tool calling API

- Migrate from function calling to tool calling API
- Add support for Gemini 2.0 models (flash, flash-lite)
- Implement JSON schema to OpenAPI schema conversion
- Add builder pattern for improved configuration
- Deprecate legacy function calling constructors and methods
- Update default model to GEMINI_2_0_FLASH
- Add comprehensive test coverage for tool calling
- Upgrade victools dependency to 4.37.0
- Update the Vertex Tool calling docs

Part of the #2207 epic

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
Christian Tzolov
2025-02-13 00:46:52 +01:00
committed by Mark Pollack
parent 4d692a542b
commit 710bb05f19
28 changed files with 1850 additions and 541 deletions

View File

@@ -244,7 +244,7 @@ public final class JsonSchemaGenerator {
}
// Based on the method in ModelOptionsUtils.
private static void convertTypeValuesToUpperCase(ObjectNode node) {
public static void convertTypeValuesToUpperCase(ObjectNode node) {
if (node.isObject()) {
node.fields().forEachRemaining(entry -> {
JsonNode value = entry.getValue();