package
Version:
v1.21.6
Opens a new window with list of versions in this module.
Published: Oct 11, 2023
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 Meta struct {
APIVersion APIVersion `json:"api_version"`
}
type RankInput struct {
Documents []string `json:"documents"`
Query string `json:"query"`
Model string `json:"model"`
ReturnDocuments bool `json:"return_documents"`
}
type RankResponse struct {
ID string `json:"id"`
Results []Result `json:"results"`
Meta Meta `json:"meta"`
}
type Result struct {
Index int `json:"index"`
RelevanceScore float64 `json:"relevance_score"`
Document Document `json:"document"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.