@pangeacyber/google-genai
v0.1.3
Published
A wrapper around the Google GenAI JavaScript SDK
Downloads
12
Keywords
Readme
Pangea + Google Gen AI SDK
A wrapper around the Google Gen AI SDK that wraps the Gemini API with Pangea AI Guard. Supports Node.js v22 and greater.
Installation
npm install @pangeacyber/google-genaiUsage
import { PangeaGoogleGenAI } from "@pangeacyber/google-genai";
const GEMINI_API_KEY = process.env.GEMINI_API_KEY!;
const PANGEA_API_KEY = process.env.PANGEA_API_KEY!;
const ai = new PangeaGoogleGenAI({
apiKey: GEMINI_API_KEY,
pangeaApiKey: PANGEA_API_KEY,
});
const response = await ai.models.generateContent({
model: "gemini-2.0-flash-001",
contents: "Why is the sky blue?",
});
console.log(response.text);Note that AI Guard transformations on the LLM response are not applied because the conversion from Gemini API output to Pangea AI Guard input is lossy.
