Commit b86bfdb
committed
Make the retro compatible if no top_n will return
all results
here is a script to make some test
```script
URL=${1:-http://127.0.0.1:8181}
curl "$URL/v1/rerank" -H "Content-Type: application/json" \
-d '{ "model": "M", "query": "What is the recipe to make bread ?",
"return_text" : true,
"texts" : true,
"top_n": 6,
"documents": [
"voici la recette pour faire du pain, il faut de la farine de l eau et du levain et du sel",
"it is a bear",
"bread recipe : floor, water, yest, salt",
"The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.",
"here is the ingedients to bake bread : 500g floor, 350g water, 120g fresh refresh yest, 15g salt",
"recipe to make cookies : floor, eggs, water, chocolat",
"here is the recipe to make bread : 500g floor, 350g water, 120g fresh refresh yest, 15g salt",
"il fait tres beau aujourd hui",
"je n ai pas faim, je ne veux pas manger",
"je suis a paris"
] }' | jq
```1 parent 374b648 commit b86bfdb
1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5060 | 5060 | | |
5061 | 5061 | | |
5062 | 5062 | | |
5063 | | - | |
5064 | | - | |
5065 | | - | |
5066 | | - | |
5067 | | - | |
5068 | | - | |
5069 | | - | |
5070 | | - | |
5071 | | - | |
5072 | 5063 | | |
5073 | 5064 | | |
5074 | 5065 | | |
| |||
5093 | 5084 | | |
5094 | 5085 | | |
5095 | 5086 | | |
| 5087 | + | |
| 5088 | + | |
| 5089 | + | |
| 5090 | + | |
| 5091 | + | |
5096 | 5092 | | |
5097 | 5093 | | |
5098 | 5094 | | |
| |||
0 commit comments