This commit is contained in:
47
packages/elixir/lib/kreuzberg/structured_extraction_config.ex
generated
Normal file
47
packages/elixir/lib/kreuzberg/structured_extraction_config.ex
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
# This file is auto-generated by alef — DO NOT EDIT.
|
||||
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
|
||||
# To regenerate: alef generate
|
||||
# To verify freshness: alef verify --exit-code
|
||||
# Issues & docs: https://github.com/kreuzberg-dev/alef
|
||||
defmodule Kreuzberg.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: map()
|
||||
}
|
||||
|
||||
defstruct schema: nil,
|
||||
schema_name: nil,
|
||||
schema_description: nil,
|
||||
strict: false,
|
||||
prompt: nil,
|
||||
llm: nil
|
||||
end
|
||||
Reference in New Issue
Block a user