Kreuzberg.ProcessingWarning (kreuzberg v4.4.2)

Copy Markdown View Source

Structure representing a warning generated during document processing.

Matches the Rust ProcessingWarning struct.

Fields

  • :source - The component or stage that generated the warning
  • :message - Human-readable warning message

Summary

Functions

Create a ProcessingWarning struct from a map.

Convert a ProcessingWarning struct to a map.

Types

t()

@type t() :: %Kreuzberg.ProcessingWarning{message: String.t(), source: String.t()}

Functions

from_map(data)

@spec from_map(map()) :: t()

Create a ProcessingWarning struct from a map.

Examples

iex> Kreuzberg.ProcessingWarning.from_map(%{
...>   "source" => "ocr",
...>   "message" => "Low confidence detected"
...> })
%Kreuzberg.ProcessingWarning{
  source: "ocr",
  message: "Low confidence detected"
}

to_map(warning)

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

Convert a ProcessingWarning struct to a map.

Examples

iex> warning = %Kreuzberg.ProcessingWarning{source: "ocr", message: "Low confidence"}
iex> Kreuzberg.ProcessingWarning.to_map(warning)
%{
  "source" => "ocr",
  "message" => "Low confidence"
}