Documentation
¶
Overview ¶
Package teirank implements the native Text Embeddings Inference rerank protocol. It sends {query, texts} to /rerank and reads a bare array of {index, score}; the deployed model is selected by the TEI server, not by a model field in each request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client sends rerank requests to a Text Embeddings Inference server.
func (*Client) BuildRequestBody ¶
BuildRequestBody returns the native TEI request. raw_scores is explicit: false makes a single-class reranker's logits comparable with WeKnora's 0..1 relevance threshold. The model name is configured when TEI starts.
Settings.ExtraBody is merged in but cannot replace query, texts or raw_scores. truncate defaults to true and may be overridden there: TEI before 1.9 starts with --auto-truncate=false and rejects the whole batch when one passage exceeds the model's input length.