JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q86327F
  • License MIT

Google AI integration for Robota SDK - Gemini Pro, Gemini Flash, function calling, and tool integration with Google's Generative AI

Package Exports

  • @robota-sdk/google

Readme

@robota-sdk/google

Google AI integration for the Robota SDK, providing seamless access to Google's Gemini models.

Features

  • Gemini Models: Support for Gemini 1.5 Pro, Gemini 1.5 Flash, and other Google AI models
  • Streaming Support: Real-time response streaming for enhanced user experience
  • Function Calling: Full support for Google AI function calling capabilities
  • TypeScript: Complete type safety with TypeScript support
  • Unified API: Consistent interface across all Robota SDK providers

Installation

npm install @robota-sdk/google @robota-sdk/agents

Quick Start

import { GoogleProvider } from '@robota-sdk/google';
import { Robota } from '@robota-sdk/agents';

// Initialize the Google provider
const provider = new GoogleProvider({
  apiKey: process.env.GOOGLE_AI_API_KEY
});

// Create a Robota instance
const robota = new Robota({
  name: 'GoogleAgent',
  aiProviders: [provider],
  defaultModel: {
    provider: 'google',
    model: 'gemini-1.5-pro',
    systemMessage: 'You are a helpful AI assistant.'
  }
});

// Start chatting
const response = await robota.run('Hello, how can you help me today?');
console.log(response);

Configuration

const provider = new GoogleProvider({
  apiKey: 'your-google-ai-api-key'
});

// Model configuration is set in Robota's defaultModel
const robota = new Robota({
  name: 'GoogleAgent',
  aiProviders: [provider],
  defaultModel: {
    provider: 'google',
    model: 'gemini-1.5-pro', // or 'gemini-1.5-flash'
    temperature: 0.7,
    maxTokens: 1000
  }
});

Supported Models

  • gemini-1.5-pro - Most capable model for complex tasks
  • gemini-1.5-flash - Fast and efficient for simpler tasks
  • gemini-pro - Previous generation model

Environment Variables

GOOGLE_AI_API_KEY=your_google_ai_api_key_here

Documentation

For complete documentation, examples, and API reference, visit:

License

MIT License - see LICENSE file for details.