Module org.elasticsearch.xcore
Class EmbeddingFloatResults
java.lang.Object
org.elasticsearch.xpack.core.inference.results.EmbeddingFloatResults
- All Implemented Interfaces:
NamedWriteable,Writeable,ChunkedToXContent,InferenceServiceResults,DenseEmbeddingResults<EmbeddingFloatResults.Embedding>,EmbeddingResults<EmbeddingFloatResults.Embedding>
- Direct Known Subclasses:
DenseEmbeddingFloatResults,GenericDenseEmbeddingFloatResults
public abstract class EmbeddingFloatResults
extends Object
implements DenseEmbeddingResults<EmbeddingFloatResults.Embedding>
Abstract class from which other dense embedding float result classes inherit their behaviour
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xpack.core.inference.results.EmbeddingResults
EmbeddingResults.ChunkNested 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
ConstructorsConstructorDescriptionEmbeddingFloatResults(List<EmbeddingFloatResults.Embedding> embeddings, String arrayName) EmbeddingFloatResults(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
-
EmbeddingFloatResults
-
EmbeddingFloatResults
- Throws:
IOException
-
-
Method Details
-
getFirstEmbeddingSize
public int getFirstEmbeddingSize()Description copied from interface:DenseEmbeddingResultsReturns the first embedding entry in the result list's array size.- Specified by:
getFirstEmbeddingSizein interfaceDenseEmbeddingResults<EmbeddingFloatResults.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() -
embeddings
Description copied from interface:EmbeddingResultsThe resulting list of embeddings for the input texts to the inference service.- Specified by:
embeddingsin interfaceEmbeddingResults<EmbeddingFloatResults.Embedding>
-