Gemini Model
The gemini function configures Google’s Gemini as your model provider.
import { createAgent, gemini } from "@inngest/agent-kit";
const agent = createAgent({ name: "Code writer", system: "You are an expert TypeScript programmer.", model: gemini({ model: "gemini-pro" }),});Configuration
Section titled “Configuration”The gemini function accepts a model name string or a configuration object:
const agent = createAgent({ model: gemini({ model: "gemini-pro", apiKey: process.env.GOOGLE_API_KEY, baseUrl: "https://generativelanguage.googleapis.com/v1/", defaultParameters: { generationConfig: { temperature: 1.5, }, }, }),});Options
Section titled “Options”model string required ID of the model to use. See the model endpoint compatibility table for details on which models work with the Gemini API.
apiKey string The Google API key to use for authenticating your request. By default we’ll
search for and use the GOOGLE_API_KEY environment variable.
baseUrl string default: https://generativelanguage.googleapis.com/v1/ The base URL for the Gemini API.
defaultParameters object The default parameters to use for the model.
See Gemini’s models.generateContent reference.
Available Models
Section titled “Available Models”"gemini-1.5-flash""gemini-1.5-flash-8b""gemini-1.5-pro""gemini-1.0-pro""text-embedding-004""aqa"For the latest list of available models, see Google’s Gemini model overview.
Limitations
Section titled “Limitations”Gemini models do not currently support function without parameters.