Fix reranking on vllm provider (#7210)

fix reranking on vllm provide

Use scores instead of indicis for vllm provider
This commit is contained in:
Pyroboomka 2025-08-25 17:27:03 +03:00 • committed by GitHub
parent 43ea6aeaf6
commit 41873f41d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,7 +45,7 @@ class Vllm extends OpenAI {
// vLLM uses 'results' array instead of 'data'
if (results.results && Array.isArray(results.results)) {
const sortedResults = results.results.sort((a, b) => a.index - b.index);
return sortedResults.map((result) => result.index);
return sortedResults.map((result) => result.relevance_score);
}
throw new Error(