From 3358714187e81b4198b0833bc27509c64a11eb58 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Sat, 4 Jan 2025 10:17:23 -0500 Subject: [PATCH] add toolChoice gemini model metadata --- js/plugins/googleai/src/gemini.ts | 6 ++++++ js/plugins/vertexai/src/gemini.ts | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/js/plugins/googleai/src/gemini.ts b/js/plugins/googleai/src/gemini.ts index 977d70b37..0cc6cee10 100644 --- a/js/plugins/googleai/src/gemini.ts +++ b/js/plugins/googleai/src/gemini.ts @@ -103,6 +103,7 @@ export const gemini10Pro = modelRef({ multiturn: true, media: false, tools: true, + toolChoice: true, systemRole: true, }, }, @@ -117,6 +118,7 @@ export const gemini15Pro = modelRef({ multiturn: true, media: true, tools: true, + toolChoice: true, systemRole: true, }, versions: [ @@ -136,6 +138,7 @@ export const gemini15Flash = modelRef({ multiturn: true, media: true, tools: true, + toolChoice: true, systemRole: true, // @ts-ignore contextCache: true, @@ -157,6 +160,7 @@ export const gemini15Flash8b = modelRef({ multiturn: true, media: true, tools: true, + toolChoice: true, systemRole: true, }, versions: ['gemini-1.5-flash-8b-latest', 'gemini-1.5-flash-8b-001'], @@ -173,6 +177,7 @@ export const gemini20FlashExp = modelRef({ multiturn: true, media: true, tools: true, + toolChoice: true, systemRole: true, }, }, @@ -199,6 +204,7 @@ export const GENERIC_GEMINI_MODEL = modelRef({ multiturn: true, media: true, tools: true, + toolChoice: true, systemRole: true, }, }, diff --git a/js/plugins/vertexai/src/gemini.ts b/js/plugins/vertexai/src/gemini.ts index 1e50fae3d..d65f00479 100644 --- a/js/plugins/vertexai/src/gemini.ts +++ b/js/plugins/vertexai/src/gemini.ts @@ -210,6 +210,7 @@ export const gemini10Pro = modelRef({ media: false, tools: true, systemRole: true, + toolChoice: true, }, }, configSchema: GeminiConfigSchema, @@ -224,6 +225,7 @@ export const gemini15Pro = modelRef({ multiturn: true, media: true, tools: true, + toolChoice: true, systemRole: true, }, }, @@ -239,6 +241,7 @@ export const gemini15Flash = modelRef({ multiturn: true, media: true, tools: true, + toolChoice: true, systemRole: true, }, }, @@ -254,6 +257,7 @@ export const gemini20FlashExp = modelRef({ multiturn: true, media: true, tools: true, + toolChoice: true, systemRole: true, }, },