groq-hello-world

Featured

Create a minimal working Groq chat completion example. Use when starting a new Groq integration, testing your setup, or learning basic Groq API patterns. Trigger with phrases like "groq hello world", "groq example", "groq quick start", "simple groq code".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Groq Hello World ## Overview Build a minimal chat completion with Groq's LPU inference API. Groq uses an OpenAI-compatible endpoint, so the API shape is familiar -- but responses arrive 10-50x faster than GPU-based providers. ## Prerequisites - `groq-sdk` installed (`npm install groq-sdk`) - `GROQ_API_KEY` environment variable set - Completed `groq-install-auth` setup ## Instructions ### Step 1: Basic Chat Completion (TypeScript) ```typescript import Groq from "groq-sdk"; const groq = new Groq(); async function main() { const completion = await groq.chat.completions.create({ model: "llama-3.3-70b-versatile", messages: [ { role: "system", content: "You are a helpful assistant." }, { role: "user", content: "What is Groq's LPU and why is it fast?" }, ], }); console.log(completion.choices[0].message.content); console.log(`Tokens: ${completion.usage?.total_tokens}`); } main().catch(console.error); ``` ### Step 2: Streaming Response ```typescript async function streamExample() { const stream = await groq.chat.completions.create({ model: "llama-3.3-70b-versatile", messages: [ { role: "user", content: "Explain quantum computing in 3 sentences." }, ], stream: true, }); for await (const chunk of stream) { const content = chunk.choices[0]?.delta?.content || ""; process.stdout.write(content); } console.log(); // newline } ``` ### Step 3: Python Equivalent ```python from groq import Groq client = Groq() ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category