| Modifier and Type | Method and Description |
|---|---|
TextSegment |
Document.toTextSegment() |
| Modifier and Type | Method and Description |
|---|---|
List<TextSegment> |
DocumentSplitter.split(Document document)
Splits a single Document into a list of TextSegment objects.
|
default List<TextSegment> |
DocumentSplitter.splitAll(List<Document> documents)
Splits a list of Documents into a list of TextSegment objects.
|
| Modifier and Type | Method and Description |
|---|---|
static TextSegment |
TextSegment.from(String text) |
static TextSegment |
TextSegment.from(String text,
Metadata metadata) |
static TextSegment |
TextSegment.textSegment(String text) |
static TextSegment |
TextSegment.textSegment(String text,
Metadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
default int |
TokenCountEstimator.estimateTokenCount(TextSegment textSegment) |
| Modifier and Type | Method and Description |
|---|---|
default Embedding |
EmbeddingModel.embed(TextSegment textSegment) |
default int |
TokenCountEstimator.estimateTokenCount(TextSegment textSegment) |
| Modifier and Type | Method and Description |
|---|---|
List<Embedding> |
EmbeddingModel.embedAll(List<TextSegment> textSegments) |
default int |
TokenCountEstimator.estimateTokenCount(List<TextSegment> textSegments) |
| Modifier and Type | Method and Description |
|---|---|
default int |
TokenCountEstimator.estimateTokenCount(TextSegment textSegment) |
| Modifier and Type | Method and Description |
|---|---|
Moderation |
ModerationModel.moderate(TextSegment textSegment) |
Copyright © 2023. All rights reserved.