pub async fn both_embeddings(
__arg0: State<Arc<AppState>>,
__arg1: Json<DualRequest>,
) -> Result<Json<DualResponse>, AppError>Expand description
Handles POST /v1/embeddings:both — returns dense and sparse embeddings in one pass.
§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.