Current section

Files

Jump to
liter_llm lib liter_llm ocr_document.ex
Raw

lib/liter_llm/ocr_document.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:1c1a4f40437bd3664405b1b60a53b4dc867f8b6f298baac7d0bf32a63ff9e517
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule LiterLlm.OcrDocument do
@moduledoc "Document input for OCR — either a URL or inline base64 data."
@typedoc "Document input for OCR — either a URL or inline base64 data."
@type t :: term()
@typedoc "A publicly accessible document URL."
@type url :: %{type: :url, url: String.t()}
@typedoc "Inline base64-encoded document data."
@type base64 :: %{type: :base64, data: String.t(), media_type: String.t()}
def url(url), do: {:url, %{url: url}}
def base64(data, media_type), do: {:base64, %{data: data, media_type: media_type}}
end