Skip to content

Commit 15bb202

Browse files
authored
Update FlowiseChatGoogleGenerativeAI.ts
1 parent 2e4a37e commit 15bb202

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/components/nodes/chatmodels/ChatGoogleGenerativeAI/FlowiseChatGoogleGenerativeAI.ts

+2
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ function convertResponseContentToChatGenerationChunk(
644644
}
645645

646646
function zodToGeminiParameters(zodObj: any) {
647+
// Gemini doesn't accept either the $schema or additionalProperties
648+
// attributes, so we need to explicitly remove them.
647649
const jsonSchema: any = zodToJsonSchema(zodObj)
648650
// eslint-disable-next-line unused-imports/no-unused-vars
649651
const { $schema, additionalProperties, ...rest } = jsonSchema

0 commit comments

Comments
 (0)