Skip to content

Conversation

narengogi
Copy link
Collaborator

@narengogi narengogi commented Jul 3, 2024

Title:

  • 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],
  },
});

Also added usage tokens while at it

Related Issue:
#335

@narengogi narengogi force-pushed the feat/gemini-updates branch 5 times, most recently from b3259bc to 7af3881 Compare July 9, 2024 07:59
formatting

append portkey to randomuuid

Add index to tool_calls stream map

Add Tool Choice to Gemini

replicate gemini tool calling changes in vertex
@narengogi narengogi force-pushed the feat/gemini-updates branch from 4b07ca3 to 3f814c2 Compare July 11, 2024 13:26
@VisargD VisargD merged commit 491d265 into Portkey-AI:main Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants