feat: support /v1/rerank router

This commit is contained in:
nongqiqin
2024-04-30 12:29:41 +08:00
parent 2720e1a358
commit 893c9adeb9
8 changed files with 133 additions and 0 deletions

10
relay/model/rerank.go Normal file
View File

@@ -0,0 +1,10 @@
package model
type RerankRequest struct {
Model string `json:"model"`
Documents []string `json:"documents"`
Query string `json:"query"`
TopN *int `json:"top_n,omitempty"`
MaxChunksPerDoc *int `json:"max_chunks_per_doc,omitempty"`
ReturnDocuments *bool `json:"return_documents,omitempty"`
}