File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/chunking Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1717import org .elasticsearch .xpack .core .inference .results .ChunkedInferenceEmbedding ;
1818import org .elasticsearch .xpack .core .inference .results .ChunkedInferenceError ;
1919import org .elasticsearch .xpack .core .inference .results .EmbeddingResults ;
20- import org .elasticsearch .xpack .core .inference .results .TextEmbeddingFloatResults ;
2120import org .elasticsearch .xpack .inference .chunking .Chunker .ChunkOffset ;
2221
2322import java .util .ArrayList ;
@@ -148,7 +147,7 @@ public void onResponse(InferenceServiceResults inferenceServiceResults) {
148147 sendFinalResponse ();
149148 }
150149 } else {
151- onFailure (unexpectedResultTypeException (inferenceServiceResults .getWriteableName (), TextEmbeddingFloatResults . NAME ));
150+ onFailure (unexpectedResultTypeException (inferenceServiceResults .getWriteableName ()));
152151 }
153152 }
154153
@@ -161,12 +160,11 @@ private ElasticsearchStatusException numResultsDoesntMatchException(int numResul
161160 );
162161 }
163162
164- private ElasticsearchStatusException unexpectedResultTypeException (String got , String expected ) {
163+ private ElasticsearchStatusException unexpectedResultTypeException (String resultType ) {
165164 return new ElasticsearchStatusException (
166- "Unexpected inference result type [{}], expected a [{} ]" ,
165+ "Unexpected inference result type [{}], expected [EmbeddingResults ]" ,
167166 RestStatus .INTERNAL_SERVER_ERROR ,
168- got ,
169- expected
167+ resultType
170168 );
171169 }
172170
You can’t perform that action at this time.
0 commit comments