Using the node.js SDK: @Google/generative-ai@0.14.0
This function declaration worked well one day or two days ago, but now it's broken.
```
Solved! Go to Solution.
Although you have `ids` set to be an array, you don't specify what type of array it should contain.
You can specify the type using the `items` attribute of the definition.
See https://ai.google.dev/api/rest/v1beta/cachedContents#schema
So that part might look something like:
ids: {
type: FunctionDeclarationSchemaType.ARRAY,
description: "An array of string IDs of the reminders that the user wants to cancel.",
nullable: false,
properties: {},
items: {
type: "STRING",
description: "The ID of the reminder the user wants to cancel",
nullable: false
}
},
were you able to solve it, im getting the same error
were you able to solve it???
Although you have `ids` set to be an array, you don't specify what type of array it should contain.
You can specify the type using the `items` attribute of the definition.
See https://ai.google.dev/api/rest/v1beta/cachedContents#schema
So that part might look something like:
ids: {
type: FunctionDeclarationSchemaType.ARRAY,
description: "An array of string IDs of the reminders that the user wants to cancel.",
nullable: false,
properties: {},
items: {
type: "STRING",
description: "The ID of the reminder the user wants to cancel",
nullable: false
}
},
Thanks! This solves my problem.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |