✨ feat: make TopN field in RerankRequest optional in JSON serialization

This commit is contained in:
CaIon committed 2025-07-03 15:45:32 +08:00
1 parent 13eb2ec1f1
commit 12977d9a52
3 files changed
+6 -2

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ type RerankRequest struct {
Documents []any `json:"documents"`
Query string `json:"query"`
Model string `json:"model"`
TopN int `json:"top_n"`
TopN int `json:"top_n,omitempty"`
ReturnDocuments *bool `json:"return_documents,omitempty"`
MaxChunkPerDoc int `json:"max_chunk_per_doc,omitempty"`
OverLapTokens int `json:"overlap_tokens,omitempty"`