UNPKG

ntrn

Version:

🚀 Professional AI-powered Next.js to React Native converter with intelligent screen creation, never-fail conversion system, comprehensive auto-fix, automatic runtime error fixing, AI assistant, Mistral AI problem-solving, intelligent Shadcn/ui conversion

18 lines (13 loc) • 497 B
import { GoogleGenAI } from "@google/genai"; import dotenv from "dotenv"; dotenv.config(); const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY }); async function main() { const response = await ai.models.generateContent({ model: "gemini-1.5-flash", contents: [{ role: "user", parts: [{ text: "Explain how AI works" }] }], }); const text = response.text(); // Parses the first candidate's response console.log("✅ Gemini says:\n", text); } main();