Hello Portkey Team,
I'm experiencing the following error in my application. Please see the details below:
400 google error: * GenerateContentRequest.tools[0].function_declarations[0].parameters.properties: should be non-empty for OBJECT type
at APIError.generate (/home/gonza/Desktop/chastapp/chatsappai-data/node_modules/.pnpm/openai@4.55.3_encoding@0.1.13_zod@3.22.4/node_modules/openai/error.js:45:20)
at OpenAI.makeStatusError (/home/gonza/Desktop/chastapp/chatsappai-data/node_modules/.pnpm/openai@4.55.3_encoding@0.1.13_zod@3.22.4/node_modules/openai/core.js:275:33)
at OpenAI.makeRequest (/home/gonza/Desktop/chastapp/chatsappai-data/node_modules/.pnpm/openai@4.55.3_encoding@0.1.13_zod@3.22.4/node_modules/openai/core.js:318:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ChatCompletionRunner._createChatCompletion (/home/gonza/Desktop/chastapp/chatsappai-data/node_modules/.pnpm/openai@4.55.3_encoding@0.1.13_zod@3.22.4/node_modules/openai/lib/AbstractChatCompletionRunner.js:127:32)
at async ChatCompletionRunner._runTools (/home/gonza/Desktop/chastapp/chatsappai-data/node_modules/.pnpm/openai@4.55.3_encoding@0.1.13_zod@3.22.4/node_modules/openai/lib/AbstractChatCompletionRunner.js:249:36) {
status: 400,
headers: {
},
request_id: undefined,
error: {
message: 'google error: * GenerateContentRequest.tools[0].function_declarations[0].parameters.properties: should be non-empty for OBJECT type\n',
type: 'INVALID_ARGUMENT',
param: null,
code: 400
},
}
It appears that the error is related to the parameter validation in: GenerateContentRequest.tools[0].function_declarations[0].parameters.properties
model: gemini_1.5_flash
I would appreciate your assistance in resolving this issue.
Thank you very much! @sega