package
Version:
v1.27.7
Opens a new window with list of versions in this module.
Published: Dec 5, 2024
License: BSD-3-Clause
Opens a new window with license information.
Imports: 17
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type APIVersion struct {
Version string `json:"version"`
}
type Document struct {
Text string `json:"text"`
}
type RankInput struct {
Documents []string `json:"documents"`
Query string `json:"query"`
Model string `json:"model"`
TopN int `json:"top_n,omitempty"`
}
type RankResponse struct {
Results []Result `json:"results"`
Model string `json:"model"`
Usage Usage `json:"usage"`
}
type Result struct {
Index int `json:"index"`
RelevanceScore float64 `json:"relevance_score"`
Document Document `json:"document"`
}
type Usage struct {
TotalTokens int `json:"total_tokens"`
PromptTokens int `json:"prompt_tokens"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.