public interface ChunkedInference
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record
A chunk of inference results containing matched text, the substring location in the original text and the bytes reference.static final record
-
Method Summary
Modifier and TypeMethodDescriptionchunksAsMatchedTextAndByteReference
(XContent xcontent) Implementations of this function serialize their embeddings toBytesReference
for storage in semantic text fields.
-
Method Details
-
chunksAsMatchedTextAndByteReference
Iterator<ChunkedInference.Chunk> chunksAsMatchedTextAndByteReference(XContent xcontent) throws IOException Implementations of this function serialize their embeddings toBytesReference
for storage in semantic text fields.- Parameters:
xcontent
- provided by the SemanticTextField- Returns:
- an iterator of the serialized
ChunkedInference.Chunk
which includes the matched text (input) and bytes reference (output/embedding). - Throws:
IOException
-