Skip to content

Commit

Permalink
Fix enum switch case error in AlibabaSearchService (#114504)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
dan-rubinstein and elasticmachine authored Oct 10, 2024
1 parent d27a9a1 commit 84625c6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ protected void doChunkedInfer(

private EmbeddingRequestChunker.EmbeddingType getEmbeddingTypeFromTaskType(TaskType taskType) {
return switch (taskType) {
case TaskType.TEXT_EMBEDDING -> EmbeddingRequestChunker.EmbeddingType.FLOAT;
case TaskType.SPARSE_EMBEDDING -> EmbeddingRequestChunker.EmbeddingType.SPARSE;
case TEXT_EMBEDDING -> EmbeddingRequestChunker.EmbeddingType.FLOAT;
case SPARSE_EMBEDDING -> EmbeddingRequestChunker.EmbeddingType.SPARSE;
default -> throw new IllegalArgumentException("Unsupported task type for chunking: " + taskType);
};
}
Expand Down

0 comments on commit 84625c6

Please sign in to comment.