All features
02GENERATIONS

Every prompt and completion

A generation is a single model call. Currai records the exact prompt you sent, the completion you got back, the model and its parameters, and how long it took — so you can replay any response and understand why the model said what it said.

  • Full input and output payloads, including system and tool messages.
  • Model name plus temperature, top_p, max_tokens and any custom parameters.
  • Latency and time-to-first-token captured for every call.
  • Attach your own evaluation scores as metadata to record output quality on each call.

Capture a generation ✍️

gen = trace.generation(
    name="openai.chat.completions",
    model="gpt-4o-mini",
    model_parameters={"temperature": 0.2, "max_tokens": 512},
    input=messages,
)

reply = client.chat.completions.create(model="gpt-4o-mini", messages=messages)

gen.end(output=reply.choices[0].message.content)