pub async fn sparse_embeddings(
__arg0: State<Arc<AppState>>,
__arg1: Json<SparseRequest>,
) -> Result<Json<SparseResponse>, AppError>Expand description
Handles POST /v1/sparse-embeddings — returns sparse (SPLADE-style) embeddings.
§Errors
AppError::ServiceUnavailableif the model is not ready or no workers are live.AppError::InvalidRequestif the batch is empty, exceedsmax_batch, or any text exceeds the per-string character limit.AppError::Internalif the embedding pool returns an inference error.
§Panics
Panics if the request semaphore has been closed — should not occur in normal operation.