LangExtract.Orchestrator (LangExtract v0.9.0)

Copy Markdown View Source

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.

Internal — no stability guarantees; see the README's "Stability" section. Documented because it explains how the library works, not because it is API.

Summary

Functions

run(client, source, template, opts \\ [])

@spec run(LangExtract.Client.t(), String.t(), LangExtract.Template.t(), keyword()) ::
  {:ok, LangExtract.Result.t()} | {:error, {:task_exit, term()}}

stream(client, source, template, opts \\ [])