Module org.elasticsearch.xcore
Class EmbeddingBitResults
java.lang.Object
org.elasticsearch.xpack.core.inference.results.EmbeddingBitResults
- All Implemented Interfaces:
NamedWriteable,Writeable,ChunkedToXContent,InferenceServiceResults,DenseEmbeddingResults<EmbeddingByteResults.Embedding>,EmbeddingResults<EmbeddingByteResults.Embedding>
- Direct Known Subclasses:
DenseEmbeddingBitResults,GenericDenseEmbeddingBitResults
public abstract class EmbeddingBitResults
extends Object
implements DenseEmbeddingResults<EmbeddingByteResults.Embedding>
Abstract class from which other dense embedding bit result classes inherit their behaviour
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xpack.core.inference.results.EmbeddingResults
EmbeddingResults.Chunk, EmbeddingResults.Embedding<E extends EmbeddingResults.Embedding<E>>Nested classes/interfaces inherited from interface org.elasticsearch.inference.InferenceServiceResults
InferenceServiceResults.ResultNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTYFields inherited from interface org.elasticsearch.xpack.core.inference.results.EmbeddingResults
EMBEDDING -
Constructor Summary
ConstructorsConstructorDescriptionEmbeddingBitResults(List<EmbeddingByteResults.Embedding> embeddings, String arrayName) EmbeddingBitResults(StreamInput in, String arrayName) -
Method Summary
Modifier and TypeMethodDescriptionasMap()The resulting list of embeddings for the input texts to the inference service.booleanintReturns the first embedding entry in the result list's array size.inthashCode()Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) List<? extends InferenceResults> voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
isFragment, toXContentChunked, toXContentChunkedV8Methods inherited from interface org.elasticsearch.inference.InferenceServiceResults
getWriteableName, isStreaming, publisher
-
Constructor Details
-
EmbeddingBitResults
-
EmbeddingBitResults
- Throws:
IOException
-
-
Method Details
-
embeddings
Description copied from interface:EmbeddingResultsThe resulting list of embeddings for the input texts to the inference service.- Specified by:
embeddingsin interfaceEmbeddingResults<EmbeddingByteResults.Embedding>
-
getFirstEmbeddingSize
public int getFirstEmbeddingSize()Description copied from interface:DenseEmbeddingResultsReturns the first embedding entry in the result list's array size.- Specified by:
getFirstEmbeddingSizein interfaceDenseEmbeddingResults<EmbeddingByteResults.Embedding>- Returns:
- the size of the embedding
-
toXContentChunked
public Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) - Specified by:
toXContentChunkedin interfaceChunkedToXContent- Specified by:
toXContentChunkedin interfaceInferenceServiceResults
-
writeTo
- Specified by:
writeToin interfaceInferenceServiceResults- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
transformToCoordinationFormat
- Specified by:
transformToCoordinationFormatin interfaceInferenceServiceResults
-
asMap
- Specified by:
asMapin interfaceInferenceServiceResults
-
equals
-
hashCode
public int hashCode()
-