JSPM

@flowrag/provider-gemini

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

Gemini AI provider for FlowRAG - embeddings and entity extraction

Package Exports

  • @flowrag/provider-gemini
  • @flowrag/provider-gemini/package.json

Readme

@flowrag/provider-gemini

Gemini AI provider for FlowRAG - embeddings and entity extraction.

Installation

npm install @flowrag/provider-gemini

Usage

Embedder

import { GeminiEmbedder } from '@flowrag/provider-gemini';

const embedder = new GeminiEmbedder({
  apiKey: 'your-gemini-api-key', // or set GEMINI_API_KEY env var
  model: 'gemini-embedding-001', // optional, default
});

// Single embedding
const embedding = await embedder.embed('Hello world');

// Batch embeddings
const embeddings = await embedder.embedBatch(['Hello', 'World']);

Extractor

import { GeminiExtractor } from '@flowrag/provider-gemini';
import { defineSchema } from '@flowrag/core';

const extractor = new GeminiExtractor({
  apiKey: 'your-gemini-api-key', // or set GEMINI_API_KEY env var
  model: 'gemini-3-flash-preview', // optional, default
  temperature: 0.1, // optional, default
});

const schema = defineSchema({
  entityTypes: ['SERVICE', 'DATABASE'],
  relationTypes: ['USES', 'PRODUCES'],
});

const result = await extractor.extractEntities(
  'ServiceA connects to DatabaseB',
  ['ServiceC'], // known entities
  schema
);

Environment Variables

GEMINI_API_KEY=your-api-key

License

MIT