Wires the full extraction pipeline.
Builds a prompt, calls the LLM provider, normalizes and parses the response, aligns extractions to source text, and returns enriched spans.
Auto-chunks source text by default (1000 characters). Customize with
:max_chunk_chars.
Two consumption modes over one chunk pipeline: run/4 collects everything
and restores document order; stream/4 yields each chunk's outcome the
moment it completes.
Summary
Functions
@spec run(LangExtract.Client.t(), String.t(), LangExtract.Template.t(), keyword()) :: {:ok, LangExtract.Result.t()} | {:error, {:task_exit, term()}}
@spec stream(LangExtract.Client.t(), String.t(), LangExtract.Template.t(), keyword()) :: Enumerable.t()