MingaClaudeBridge.Wire.StopReason (minga_claude_bridge v0.1.0)

Copy Markdown View Source

Anthropic stop_reason values.

Known values decode to atoms. A value this module does not know decodes to {:other, string} instead of failing, because the API adds stop reasons over time.

Summary

Functions

Reads an optional stop_reason field.

Types

t()

@type t() ::
  :end_turn
  | :max_tokens
  | :stop_sequence
  | :tool_use
  | :pause_turn
  | :refusal
  | :model_context_window_exceeded
  | {:other, String.t()}

Functions

field(map, key)

@spec field(MingaClaudeBridge.Wire.Field.json_map(), String.t()) ::
  {:ok, t() | nil} | :error

Reads an optional stop_reason field.