----------------------
Based on the error message you've provided, it appears there's a misunderstanding in how the
TEIR
(TextEmbeddingInference) reranker is being initialized. The error suggests that the
model_name
parameter is being incorrectly assigned to the
top_n
parameter. Let me explain the correct usage based on the information from the knowledge sources:
The correct way to initialize the TextEmbeddingInference reranker should be:
reranker = TextEmbeddingInference(
top_n=10,
model_name="BAAI/bge-reranker-large",
base_url="<http://10.10.10.50:8020">
)
Here's the breakdown of the parameters:
top_n
: This should be an integer, which you've correctly set to 10.model_name
: This is a string parameter, which you've correctly set to 'BAAI/bge-reranker-large'.base_url
: This is the URL for the text embeddings service, which you've set to "
The error occurs because the
model_name
is being interpreted as the
top_n
parameter, which expects an integer.
To fix this, make sure you're using the correct class name
TextEmbeddingInference
instead of
TEIR
, and ensure that the parameters are in the correct order or explicitly named.
For more details on the correct usage of the TextEmbeddingInference reranker, you can refer to the
LlamaIndex API reference for TextEmbeddingInference.
If you're specifically trying to use a different reranker, please make sure you're using the correct class and parameters for that particular reranker implementation.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------