|
package schema |
|
|
|
|
|
type JINARerankRequest struct { |
|
Model string `json:"model"` |
|
Query string `json:"query"` |
|
Documents []string `json:"documents"` |
|
TopN int `json:"top_n"` |
|
} |
|
|
|
|
|
type JINADocumentResult struct { |
|
Index int `json:"index"` |
|
Document JINAText `json:"document"` |
|
RelevanceScore float64 `json:"relevance_score"` |
|
} |
|
|
|
|
|
type JINAText struct { |
|
Text string `json:"text"` |
|
} |
|
|
|
|
|
type JINARerankResponse struct { |
|
Model string `json:"model"` |
|
Usage JINAUsageInfo `json:"usage"` |
|
Results []JINADocumentResult `json:"results"` |
|
} |
|
|
|
|
|
type JINAUsageInfo struct { |
|
TotalTokens int `json:"total_tokens"` |
|
PromptTokens int `json:"prompt_tokens"` |
|
} |
|
|