Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
# 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.ChunkingConfig do
@moduledoc """
Chunking configuration.
Configures text chunking for document content, including chunk size,
overlap, trimming behavior, and optional embeddings.
Use `..Default::default()` when constructing to allow for future field additions:
```rust
let config = ChunkingConfig {
max_characters: 500,
..Default::default()
};
```
"""
@typedoc "Chunking configuration."
@type t :: %__MODULE__{
max_characters: non_neg_integer(),
overlap: non_neg_integer(),
trim: boolean(),
chunker_type: String.t() | nil,
embedding: map() | nil,
preset: String.t() | nil,
sizing: String.t() | nil,
prepend_heading_context: boolean(),
topic_threshold: float() | nil
}
defstruct max_characters: 1_000,
overlap: 200,
trim: true,
chunker_type: :text,
embedding: nil,
preset: nil,
sizing: :characters,
prepend_heading_context: false,
topic_threshold: nil
defimpl Jason.Encoder do
@doc false
def encode(value, opts) do
value
|> Map.from_struct()
|> Enum.reject(fn {_k, v} -> v == nil end)
|> Enum.into(%{})
|> Jason.Encoder.encode(opts)
end
end
end