Current section

Files

Jump to
xberg lib xberg structured_extraction_config.ex
Raw

lib/xberg/structured_extraction_config.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:926a121ce8858da89e1c2dae78836bd02775ed955b144da6ce043a83737b8c26
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.StructuredExtractionConfig do
@moduledoc """
Configuration for LLM-based structured data extraction.
Sends extracted document content to a VLM with a JSON schema,
returning structured data that conforms to the schema.
# Example
```toml
[structured_extraction]
schema_name = "invoice_data"
strict = true
[structured_extraction.schema]
type = "object"
properties.vendor = { type = "string" }
properties.total = { type = "number" }
required = ["vendor", "total"]
[structured_extraction.llm]
model = "openai/gpt-4o"
```
"""
@typedoc "Configuration for LLM-based structured data extraction."
@type t :: %__MODULE__{
schema: String.t() | nil,
schema_name: String.t() | nil,
schema_description: String.t() | nil,
strict: boolean(),
prompt: String.t() | nil,
llm: Xberg.LlmConfig.t()
}
defstruct schema: nil,
schema_name: nil,
schema_description: nil,
strict: false,
prompt: nil,
llm: nil
end