Jido.AI.Skill.Diagnostics.Warning (Jido AI v2.2.0)

Copy Markdown View Source

Represents a single diagnostic warning.

Summary

Functions

Formats warning for display.

Creates a new warning.

Converts warning to a plain map.

Types

t()

@type t() :: %Jido.AI.Skill.Diagnostics.Warning{
  message: String.t(),
  severity: :low | :medium | :high,
  timestamp: DateTime.t(),
  type: atom()
}

Functions

format(warning)

@spec format(t()) :: String.t()

Formats warning for display.

new(type, message, opts \\ [])

@spec new(atom(), String.t(), keyword()) :: t()

Creates a new warning.

Options

  • :severity - One of :low, :medium, :high (default: :low)

to_map(warning)

@spec to_map(t()) :: map()

Converts warning to a plain map.