Mimir.TurnEvents.GenAI (Mimir v0.1.0)

Copy Markdown View Source

Dependency-free builders for binary-keyed gen_ai.* attribute maps (OpenTelemetry GenAI semantic conventions).

Adapters that understand a specific client library's telemetry metadata live with the embedder, next to the telemetry handler that receives that library's events. This module carries only the shared vocabulary that needs no such library.

Summary

Functions

Milestone marker for reasoning progress events.

Tool invocation attributes. Accepts atom- or string-keyed call maps.

The OTel usage token pair.

Functions

reasoning(metadata)

@spec reasoning(map()) :: %{optional(String.t()) => String.t()}

Milestone marker for reasoning progress events.

tool_use(call)

@spec tool_use(map()) :: %{optional(String.t()) => term()}

Tool invocation attributes. Accepts atom- or string-keyed call maps.

usage(input_tokens, output_tokens)

@spec usage(non_neg_integer(), non_neg_integer()) :: %{
  optional(String.t()) => non_neg_integer()
}

The OTel usage token pair.