Current section

Files

Jump to
xberg lib xberg reranked_document.ex
Raw

lib/xberg/reranked_document.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:86e3b491373cb06a224074d5c175e5bf4c341443fbe2e0370128e5b090afde61
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.RerankedDocument do
@moduledoc """
A single document returned by the reranker, with its position in the input and score.
`index` maps back to the caller's original document list, so metadata arrays
(e.g. IDs, paths) can be reordered without passing them through the reranker.
Since v5.0.0.
"""
@typedoc "A single document returned by the reranker, with its position in the input and score."
@type t :: %__MODULE__{
index: non_neg_integer(),
score: float(),
document: String.t() | nil
}
defstruct index: 0,
score: 0.0,
document: nil
end