Current section
Files
Jump to
Current section
Files
lib/xberg/structured_extraction_config.ex
# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4e21c71a5751b345136e5ca51dea30bbd3862f7fdc63aa50e6b36be84c454e0e
# 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