Module org.elasticsearch.xcore
Record Class ChunkedInferenceEmbedding
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.core.inference.results.ChunkedInferenceEmbedding
- All Implemented Interfaces:
ChunkedInference
public record ChunkedInferenceEmbedding(List<EmbeddingResults.Chunk> chunks)
extends Record
implements ChunkedInference
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.inference.ChunkedInference
ChunkedInference.Chunk, ChunkedInference.TextOffset -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aChunkedInferenceEmbeddingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchunks()Returns the value of thechunksrecord component.chunksAsByteReference(org.elasticsearch.xcontent.XContent xcontent) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static List<ChunkedInference> listOf(List<String> inputs, SparseEmbeddingResults sparseEmbeddingResults) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChunkedInferenceEmbedding
Creates an instance of aChunkedInferenceEmbeddingrecord class.- Parameters:
chunks- the value for thechunksrecord component
-
-
Method Details
-
listOf
public static List<ChunkedInference> listOf(List<String> inputs, SparseEmbeddingResults sparseEmbeddingResults) -
chunksAsByteReference
public Iterator<ChunkedInference.Chunk> chunksAsByteReference(org.elasticsearch.xcontent.XContent xcontent) throws IOException - Specified by:
chunksAsByteReferencein interfaceChunkedInference- Throws:
IOException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
chunks
Returns the value of thechunksrecord component.- Returns:
- the value of the
chunksrecord component
-