JSPM

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

Robota's Google AI integration package

Package Exports

  • @robota-sdk/google
  • @robota-sdk/google/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@robota-sdk/google) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.