Module org.elasticsearch.xcore
Interface TextEmbeddingResults<E extends EmbeddingResults.Embedding<E>>
- All Superinterfaces:
ChunkedToXContent,EmbeddingResults<E>,InferenceServiceResults,NamedWriteable,Writeable
- All Known Implementing Classes:
TextEmbeddingBitResults,TextEmbeddingByteResults,TextEmbeddingFloatResults
public interface TextEmbeddingResults<E extends EmbeddingResults.Embedding<E>>
extends EmbeddingResults<E>
-
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
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionintReturns the first text embedding entry in the result list's array size.Methods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
isFragment, toXContentChunked, toXContentChunkedV8Methods inherited from interface org.elasticsearch.xpack.core.inference.results.EmbeddingResults
embeddingsMethods inherited from interface org.elasticsearch.inference.InferenceServiceResults
asMap, getWriteableName, isStreaming, publisher, toXContentChunked, transformToCoordinationFormat, writeTo
-
Method Details
-
getFirstEmbeddingSize
Returns the first text embedding entry in the result list's array size.- Returns:
- the size of the text embedding
- Throws:
IllegalStateException- if the list of embeddings is empty
-