LocalAI
LocalAI copied to clipboard
fix(reranker): support omitting top_n
Description
This PR fixes the issue introduced in #7025
Notes for Reviewers
#7025 introduced handling result cropping by top_n. However, I believe the most users just omit top_n, just because don't bother to count len(documents). So, I'm afraid releasing #7025 causes a trouble for many users. @mudler, beg your pardon.
This PR let users to omit top_n or send top_n=0 meaning all docs.
One thing about tests, since tey bring up the backend every time, isn't it worth to loop three alt requests in the single test method?
Signed commits
- [v] Yes, I signed my commits.
Deploy Preview for localai ready!
| Name | Link |
|---|---|
| Latest commit | eec1f59ce759eee2913824d98176a6f69b212ded |
| Latest deploy log | https://app.netlify.com/projects/localai/deploys/6910b05b2fe2450008889c8d |
| Deploy Preview | https://deploy-preview-7199--localai.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
#7025 introduced handling result cropping by
top_n. However, I believe the most users just omittop_n, just because don't bother to countlen(documents). So, I'm afraid releasing #7025 causes a trouble for many users. @mudler, beg your pardon. This PR let users to omittop_nor sendtop_n=0meaning all docs.One thing about tests, since tey bring up the backend every time, isn't it worth to loop three alt requests in the single test method?
Yes, that would make def. sense!
asserts #7284