Uses of Class
dev.langchain4j.data.segment.TextSegment
Packages that use TextSegment
Package
Description
-
Uses of TextSegment in dev.langchain4j.data.document
Methods in dev.langchain4j.data.document that return TextSegmentModifier and TypeMethodDescriptionDocument.toTextSegment()
Builds a TextSegment from this document.Methods in dev.langchain4j.data.document that return types with arguments of type TextSegmentModifier and TypeMethodDescriptionSplits a single Document into a list of TextSegment objects.default List
<TextSegment> Splits a list of Documents into a list of TextSegment objects. -
Uses of TextSegment in dev.langchain4j.data.segment
Methods in dev.langchain4j.data.segment that return TextSegmentModifier and TypeMethodDescriptionstatic TextSegment
Creates a new text segment.static TextSegment
Creates a new text segment.static TextSegment
TextSegment.textSegment
(String text) Creates a new text segment.static TextSegment
TextSegment.textSegment
(String text, Metadata metadata) Creates a new text segment.TextSegmentTransformer.transform
(TextSegment segment) Transforms a provided segment.Methods in dev.langchain4j.data.segment that return types with arguments of type TextSegmentModifier and TypeMethodDescriptiondefault List
<TextSegment> TextSegmentTransformer.transformAll
(List<TextSegment> segments) Transforms all the provided segments.Methods in dev.langchain4j.data.segment with parameters of type TextSegmentModifier and TypeMethodDescriptionTextSegmentTransformer.transform
(TextSegment segment) Transforms a provided segment.Method parameters in dev.langchain4j.data.segment with type arguments of type TextSegmentModifier and TypeMethodDescriptiondefault List
<TextSegment> TextSegmentTransformer.transformAll
(List<TextSegment> segments) Transforms all the provided segments. -
Uses of TextSegment in dev.langchain4j.model.chat
Methods in dev.langchain4j.model.chat with parameters of type TextSegmentModifier and TypeMethodDescriptiondefault int
TokenCountEstimator.estimateTokenCount
(TextSegment textSegment) Estimates the count of tokens in the specified text segment. -
Uses of TextSegment in dev.langchain4j.model.embedding
Methods in dev.langchain4j.model.embedding with parameters of type TextSegmentModifier and TypeMethodDescriptionDisabledEmbeddingModel.embed
(TextSegment textSegment) EmbeddingModel.embed
(TextSegment textSegment) Embed the text content of a TextSegment.default int
TokenCountEstimator.estimateTokenCount
(TextSegment textSegment) Estimates the count of tokens in the given text segment.Method parameters in dev.langchain4j.model.embedding with type arguments of type TextSegmentModifier and TypeMethodDescriptionDisabledEmbeddingModel.embedAll
(List<TextSegment> textSegments) EmbeddingModel.embedAll
(List<TextSegment> textSegments) Embeds the text content of a list of TextSegments.default int
TokenCountEstimator.estimateTokenCount
(List<TextSegment> textSegments) Estimates the count of tokens in the given text segments. -
Uses of TextSegment in dev.langchain4j.model.language
Methods in dev.langchain4j.model.language with parameters of type TextSegmentModifier and TypeMethodDescriptiondefault int
TokenCountEstimator.estimateTokenCount
(TextSegment textSegment) Estimates the count of tokens in the given text segment. -
Uses of TextSegment in dev.langchain4j.model.moderation
Methods in dev.langchain4j.model.moderation with parameters of type TextSegmentModifier and TypeMethodDescriptionDisabledModerationModel.moderate
(TextSegment textSegment) default Response
<Moderation> ModerationModel.moderate
(TextSegment textSegment) Moderates the given text segment. -
Uses of TextSegment in dev.langchain4j.model.scoring
Methods in dev.langchain4j.model.scoring with parameters of type TextSegmentModifier and TypeMethodDescriptionScoringModel.score
(TextSegment segment, String query) Scores a givenTextSegment
against a given query.Method parameters in dev.langchain4j.model.scoring with type arguments of type TextSegmentModifier and TypeMethodDescriptionScoringModel.scoreAll
(List<TextSegment> segments, String query) Scores all providedTextSegment
s against a given query. -
Uses of TextSegment in dev.langchain4j.rag.content
Methods in dev.langchain4j.rag.content that return TextSegmentMethods in dev.langchain4j.rag.content with parameters of type TextSegmentConstructors in dev.langchain4j.rag.content with parameters of type TextSegment -
Uses of TextSegment in dev.langchain4j.rag.content.retriever
Method parameters in dev.langchain4j.rag.content.retriever with type arguments of type TextSegmentModifier and TypeMethodDescriptionEmbeddingStoreContentRetriever.from
(EmbeddingStore<TextSegment> embeddingStore) Creates an instance of anEmbeddingStoreContentRetriever
from the specifiedEmbeddingStore
andEmbeddingModel
found through SPI (seeEmbeddingModelFactory
).Constructor parameters in dev.langchain4j.rag.content.retriever with type arguments of type TextSegmentModifierConstructorDescriptionEmbeddingStoreContentRetriever
(EmbeddingStore<TextSegment> embeddingStore, EmbeddingModel embeddingModel) EmbeddingStoreContentRetriever
(EmbeddingStore<TextSegment> embeddingStore, EmbeddingModel embeddingModel, int maxResults) EmbeddingStoreContentRetriever
(EmbeddingStore<TextSegment> embeddingStore, EmbeddingModel embeddingModel, Integer maxResults, Double minScore) -
Uses of TextSegment in dev.langchain4j.retriever
Methods in dev.langchain4j.retriever that return types with arguments of type TextSegmentMethod parameters in dev.langchain4j.retriever with type arguments of type TextSegmentModifier and TypeMethodDescriptionstatic EmbeddingStoreRetriever
EmbeddingStoreRetriever.from
(EmbeddingStore<TextSegment> embeddingStore, EmbeddingModel embeddingModel) Deprecated.static EmbeddingStoreRetriever
EmbeddingStoreRetriever.from
(EmbeddingStore<TextSegment> embeddingStore, EmbeddingModel embeddingModel, int maxResults) Deprecated.static EmbeddingStoreRetriever
EmbeddingStoreRetriever.from
(EmbeddingStore<TextSegment> embeddingStore, EmbeddingModel embeddingModel, int maxResults, double minScore) Deprecated.Constructor parameters in dev.langchain4j.retriever with type arguments of type TextSegmentModifierConstructorDescriptionEmbeddingStoreRetriever
(EmbeddingStore<TextSegment> embeddingStore, EmbeddingModel embeddingModel, int maxResults, Double minScore) Deprecated. -
Uses of TextSegment in dev.langchain4j.store.embedding
Method parameters in dev.langchain4j.store.embedding with type arguments of type TextSegmentModifier and TypeMethodDescriptionEmbeddingStoreIngestor.Builder.embeddingStore
(EmbeddingStore<TextSegment> embeddingStore) Sets the embedding store.static void
EmbeddingStoreIngestor.ingest
(Document document, EmbeddingStore<TextSegment> embeddingStore) Ingests a specifiedDocument
into a specifiedEmbeddingStore
.static void
EmbeddingStoreIngestor.ingest
(List<Document> documents, EmbeddingStore<TextSegment> embeddingStore) Ingests specifiedDocument
s into a specifiedEmbeddingStore
.Constructor parameters in dev.langchain4j.store.embedding with type arguments of type TextSegmentModifierConstructorDescriptionEmbeddingStoreIngestor
(DocumentTransformer documentTransformer, DocumentSplitter documentSplitter, TextSegmentTransformer textSegmentTransformer, EmbeddingModel embeddingModel, EmbeddingStore<TextSegment> embeddingStore) Creates an instance of anEmbeddingStoreIngestor
. -
Uses of TextSegment in dev.langchain4j.web.search
Methods in dev.langchain4j.web.search that return TextSegmentModifier and TypeMethodDescriptionWebSearchOrganicResult.toTextSegment()
Converts this WebSearchOrganicResult to a TextSegment.Methods in dev.langchain4j.web.search that return types with arguments of type TextSegmentModifier and TypeMethodDescriptionWebSearchResults.toTextSegments()
Converts the organic search results to a list of text segments.