LocalAIRerankingService
Wisej.AI.Services.LocalAIRerankingService
Last updated
Wisej.AI.Services.LocalAIRerankingService
Last updated
Namespace: Wisej.AI.Services
Assembly: Wisej.AI (3.5.0.0)
Represents a service for reranking text inputs using the LocalAI API.
This service communicates with the LocalAI API to rerank text inputs based on a specified query. It allows configuration of the API endpoint, API key, model, API version, and the number of top documents to return.
Initializes a new instance of .
: Gets or sets the reranking model for the LocalAI service. (Default: ""
)
: Gets or sets the maximum number of documents to return in the reranked response. If set to 0 it will return all the documents in the input. (Default: 10
)
Asynchronously reranks the provided chunks based on the specified query.
query
The query used to rerank the chunks.
chunks
The array of text inputs to be reranked.
Represents a service for reranking documents based on a given query.
: Gets or sets the URL of the service. (Default: "http://localhost:8080/v1/rerank"
)
Returns: . A task that represents the asynchronous operation. The task result contains an array of reranked text inputs.