Skip to content

Commit

Permalink
Removing useless interface
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Feb 13, 2024
1 parent ea88b36 commit 2939262
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.inference.InferenceResultChunk;
import org.elasticsearch.xcontent.ToXContentObject;
import org.elasticsearch.xcontent.XContentBuilder;

Expand All @@ -24,7 +23,7 @@

public class ChunkedTextEmbeddingResults extends ChunkedNlpInferenceResults {

public record EmbeddingChunk(String matchedText, double[] embedding) implements Writeable, ToXContentObject, InferenceResultChunk {
public record EmbeddingChunk(String matchedText, double[] embedding) implements Writeable, ToXContentObject {

public EmbeddingChunk(StreamInput in) throws IOException {
this(in.readString(), in.readDoubleArray());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.inference.InferenceResultChunk;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.xcontent.ToXContentObject;
import org.elasticsearch.xcontent.XContentBuilder;

import java.io.IOException;
Expand All @@ -23,7 +24,9 @@ public class ChunkedTextExpansionResults extends ChunkedNlpInferenceResults {
public static final String NAME = "chunked_text_expansion_result";

public record ChunkedResult(String matchedText, List<TextExpansionResults.WeightedToken> weightedTokens)
implements InferenceResultChunk {
implements
Writeable,
ToXContentObject {

public ChunkedResult(StreamInput in) throws IOException {
this(in.readString(), in.readCollectionAsList(TextExpansionResults.WeightedToken::new));
Expand Down

0 comments on commit 2939262

Please sign in to comment.