
I built a zero-dependency Groq API wrapper for Node.js — simple-groq
Why I built this I was working on a small AI chatbot project and wanted to use Groq's blazing fast inference. But the official SDK felt too heavy for what I needed. So I built simple-groq — a minimal, zero-dependency Groq API client that just works. Install \ bash npm install simple-groq \ \ Quick Start \ `javascript import { GroqClient } from "simple-groq"; const groq = new GroqClient({ apiKey: "gsk_..." }); const answer = await groq.ask("What is Node.js?"); console.log(answer); ` \ Features ⚡ Zero dependencies — uses native fetch only 🪶 Under 5KB minified + gzipped 🌊 Streaming with for await...of 💬 Built-in multi-turn chat history 🔒 Full TypeScript support 📦 ESM + CJS dual build Streaming Example \ javascript for await (const chunk of groq.stream(messages)) { process.stdout.write(chunk.content); } \ \ Chat History Example \ `javascript const history = groq.createHistory(); history.add("system", "You are a helpful assistant."); history.add("user", "My name is Adarsh."); const reply =
Continue reading on Dev.to JavaScript
Opens in a new tab

