Skip to content

Instantly share code, notes, and snippets.

View Adzy-xyz's full-sized avatar

Adzy Adzy-xyz

  • Joined Oct 10, 2025
View GitHub Profile
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
async function main() {
const response = await ai.models.generateContent({
model: "gemini-2.5-flash",
contents: "Explain how AI works in a few words",
});
console.log(response.text);
/*Case ai buat base bkt console*/
case "ai":
if (!args[0]) {
warn("Masukkan teks untuk dikirim ke AI!");
continue;
}
const fetch = (await import("node-fetch")).default;
const prompt = args.join(" ");
text("...memproses permintaan ke AI...");
try {