Skip to main content
Available for: Python and TypeScript.
Wrap your Groq client with wrapGroq() (TypeScript) to trace every inference call, including latency breakdowns useful for Groq’s fast inference speeds — or patch the groq module with patch_groq() (Python).

Installation

Setup

In TypeScript, wrapGroq() returns a wrapped client instance — pass it to any function that makes Groq calls. In Python, patch_groq() monkey-patches groq.resources.chat.completions.Completions.create in place, so Groq() (constructed after patching) is traced automatically with no wrapping step.

Example

Streaming calls (stream=True / stream: true) are traced in both languages, including time-to-first-token.

What gets captured