Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RerankDocument ¶
type RerankDocument struct {
Text string `json:"text"`
}
type RerankRequest ¶
type RerankResponse ¶
type RerankResponse struct {
Model string `json:"model"`
Results []RerankResult `json:"results"`
Usage *RerankUsage `json:"usage,omitempty"`
}
type RerankResult ¶
type RerankResult struct {
Index int `json:"index"`
RelevanceScore float64 `json:"relavance_score"`
Document *RerankDocument `json:"document,omitempty"`
}
type RerankUsage ¶
type Reranker ¶
type Reranker struct {
Ctx context.Context
Config RerankerConfig
}
func NewReranker ¶
func NewReranker(ctx context.Context, config RerankerConfig) *Reranker
func (*Reranker) Rerank ¶
func (r *Reranker) Rerank(ctx context.Context, req domain.RerankRequest) (domain.RerankResponse, error)
type RerankerConfig ¶
Click to show internal directories.
Click to hide internal directories.