public interface ChunkedInference
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA 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 toBytesReferencefor storage in semantic text fields.
-
Method Details
-
chunksAsMatchedTextAndByteReference
Iterator<ChunkedInference.Chunk> chunksAsMatchedTextAndByteReference(XContent xcontent) throws IOException Implementations of this function serialize their embeddings toBytesReferencefor storage in semantic text fields.- Parameters:
xcontent- provided by the SemanticTextField- Returns:
- an iterator of the serialized
ChunkedInference.Chunkwhich includes the matched text (input) and bytes reference (output/embedding). - Throws:
IOException
-