Module org.elasticsearch.xcore
Record Class SparseEmbeddingResults
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.core.inference.results.SparseEmbeddingResults
- All Implemented Interfaces:
NamedWriteable,Writeable,ChunkedToXContent,InferenceServiceResults
public record SparseEmbeddingResults(List<SparseEmbeddingResults.Embedding> embeddings)
extends Record
implements InferenceServiceResults
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionSparseEmbeddingResults(List<SparseEmbeddingResults.Embedding> embeddings) Creates an instance of aSparseEmbeddingResultsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionasMap()Returns the value of theembeddingsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SparseEmbeddingResultsof(List<? extends InferenceResults> results) final StringtoString()Returns a string representation of this record class.Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) List<? extends InferenceResults> List<? extends InferenceResults> voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
isFragment, toXContentChunked, toXContentChunkedV8Methods inherited from interface org.elasticsearch.inference.InferenceServiceResults
isStreaming, publisher
-
Field Details
-
NAME
- See Also:
-
SPARSE_EMBEDDING
-
-
Constructor Details
-
SparseEmbeddingResults
- Throws:
IOException
-
SparseEmbeddingResults
Creates an instance of aSparseEmbeddingResultsrecord class.- Parameters:
embeddings- the value for theembeddingsrecord component
-
-
Method Details
-
of
-
toXContentChunked
public Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) - Specified by:
toXContentChunkedin interfaceChunkedToXContent
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
asMap
- Specified by:
asMapin interfaceInferenceServiceResults
-
transformToCoordinationFormat
- Specified by:
transformToCoordinationFormatin interfaceInferenceServiceResults
-
transformToLegacyFormat
- Specified by:
transformToLegacyFormatin interfaceInferenceServiceResults
-
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). -
embeddings
Returns the value of theembeddingsrecord component.- Returns:
- the value of the
embeddingsrecord component
-