Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/groq-webhooks-events

@0d57af8
Run it yourself

Build event-driven architectures with Groq streaming, batch processing, and async patterns. Use when setting up real-time SSE endpoints, batch processing pipelines, or event-driven LLM processing with Groq. Trigger with phrases like "groq streaming", "groq events", "groq SSE", "groq batch", "groq async", "groq event-driven".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/groq-webhooks-events

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

≈544 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Groq Event Patterns — Worked Examples

End-to-end examples that exercise the endpoints and functions defined in SKILL.md and references/implementation.md. Each assumes the server is running locally and GROQ_API_KEY is set.

Example 1: Consume the SSE streaming endpoint

Call the /api/chat/stream endpoint from Step 1 with curl and watch tokens arrive as they are generated. -N disables buffering so events print live.

curl -N -X POST http://localhost:3000/api/chat/stream \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Explain SSE in one sentence."}]}'

Expected event stream (one data: line per token, terminated by a done event):

data: {"content":"Server","type":"token"}
data: {"content":"-Sent","type":"token"}
data: {"content":" Events","type":"token"}
data: {"type":"done"}

Example 2: Submit a batch and receive callbacks

Enqueue three prompts with submitBatch (Step 2). Each completed item POSTs a groq.batch.item_completed event to the callback URL.

const batchId = await submitBatch(
  ["Summarize doc A", "Summarize doc B", "Summarize doc C"],
  "https://myapp.example.com/hooks/groq",
  "llama-3.1-8b-instant"
);
console.log(`Batch ${batchId} enqueued — 3 items`);

Each callback body:

{
  "event": "groq.batch.item_completed",
  "data": {
    "batchId": "3f9c…",
    "index": 0,
    "total": 3,
    "content": "…",
    "model": "llama-3.1-8b-instant",
    "usage": { "prompt_tokens": 12, "completion_tokens": 48 }
  }
}

Example 3: Classify an inbound webhook

Send a raw event to the /webhook receiver (Step 3). The endpoint acknowledges with 202 immediately, then classifies the event with the 8B model in the background.

curl -X POST http://localhost:3000/webhook \
  -H "Content-Type: application/json" \
  -d '{"source":"stripe","type":"charge.failed","amount":4999}'

The receiver returns {"received": true} right away; the async classification produces, for example, {"type":"payment","priority":"high","summary":"Charge failed for $49.99","action":"notify_billing"}, which triggers the Slack alert.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides patterns for event-driven LLM applications and follows security best practices by advising against hardcoded secrets. A low-risk surface for indirect prompt injection exists because the skill processes external webhook data, which is inherent to its stated purpose.

  • Socket2mo

    1 alert: gptAnomaly

  • Snyk2mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
What it can do
Reads files Edits files Runs commands
version
1.11.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "groq",
  "webhooks"
]
All 4 allowed tools
ReadWriteEditBash(curl:*)
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/groq-webhooks-events