Updated request and response transformers for gemini models
Description: (optional)
Update response schema to handle multiple tools in response
Update request schema for tools
// Access your API key as an environment variable (see "Set up your API key" above)
const genAI = new GoogleGenerativeAI(process.env.API_KEY);
// ...
const generativeModel = genAI.getGenerativeModel({
// Use a model that supports function calling, like a Gemini 1.5 model
model: "gemini-1.5-flash",
// Specify the function declaration.
tools: {
functionDeclarations: [controlLightFunctionDeclaration],
},
});
Title:
Description: (optional)
Also added usage tokens while at it
Related Issue: https://github.com/Portkey-AI/gateway/issues/335