Package org.springframework.ai.document
Class Document
java.lang.Object
org.springframework.ai.document.Document
A document is a container for the content and metadata of a document. It also contains
the document's unique ID and an optional embedding.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getFormattedContent
(ContentFormatter formatter, MetadataMode metadataMode) Helper content extractor that uses and externalContentFormatter
.getFormattedContent
(MetadataMode metadataMode) getId()
int
hashCode()
void
setContentFormatter
(ContentFormatter contentFormatter) Replace the document'sContentFormatter
.void
setEmbedding
(List<Double> embedding) toString()
-
Field Details
-
DEFAULT_CONTENT_FORMATTER
-
-
Constructor Details
-
Document
-
Document
-
Document
-
Document
-
-
Method Details
-
getId
-
getContent
-
getFormattedContent
-
getFormattedContent
-
getFormattedContent
Helper content extractor that uses and externalContentFormatter
. -
setEmbedding
-
setContentFormatter
Replace the document'sContentFormatter
.- Parameters:
contentFormatter
- new formatter to use.
-
getMetadata
-
getEmbedding
-
getContentFormatter
-
hashCode
public int hashCode() -
equals
-
toString
-