Score
Changed onScore items against a query using a reranker model.
Supports both msgpack and JSON request bodies (Content-Type header). Returns msgpack by default, JSON if Accept header requests it.
Args: model: Model name to use for scoring. http_request: FastAPI request object (for body and app state). accept: Accept header for response content negotiation. x_machine_profile: Machine profile header for routing validation.
Returns: ScoreResponse with scores sorted by relevance (descending). Format depends on Accept header: msgpack (default) or JSON.
Raises: HTTPException: 400 for invalid input or profile mismatch, 404 if model not found, 503 if not loaded.
Request
- The document declares no server URL.
- Authnone declared
Path parameters
Headers
The only accepted value is forbid. It keeps the request off remote upstreams: local capacity serves or refuses it, and a model served only by an upstream answers 400. Any other value answers 400.
Request body
Example request
{
"items": [
{
"text": "Machine learning is a branch of AI..."
},
{
"text": "The weather is nice today."
}
],
"query": {
"text": "What is machine learning?"
}
}Response
Scores computed successfully
Changes
- info
added the new optional
headerrequest parameterX-SIE-Remote
- info
- info
added the optional property
//to the response with the status
- info