Package org.springframework.ai.document
Class DefaultContentFormatter.Builder
java.lang.Object
org.springframework.ai.document.DefaultContentFormatter.Builder
- Enclosing class:
DefaultContentFormatter
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns the immutable configuration.from
(DefaultContentFormatter fromFormatter) withExcludedEmbedMetadataKeys
(String... keys) withExcludedEmbedMetadataKeys
(List<String> excludedEmbedMetadataKeys) Configures the excluded Embed metadata keys to filter out from the generative.withExcludedInferenceMetadataKeys
(String... keys) withExcludedInferenceMetadataKeys
(List<String> excludedInferenceMetadataKeys) Configures the excluded Inference metadata keys to filter out from the generative.withMetadataSeparator
(String metadataSeparator) Configures the Document metadata separator.withMetadataTemplate
(String metadataTemplate) Configures the Document metadata template.withTextTemplate
(String textTemplate) Configures the Document text template.
-
Method Details
-
from
-
withMetadataTemplate
Configures the Document metadata template.- Parameters:
metadataTemplate
- Metadata template to use.- Returns:
- this builder
-
withMetadataSeparator
Configures the Document metadata separator.- Parameters:
metadataSeparator
- Metadata separator to use.- Returns:
- this builder
-
withTextTemplate
Configures the Document text template.- Parameters:
textTemplate
- Document's content template.- Returns:
- this builder
-
withExcludedInferenceMetadataKeys
public DefaultContentFormatter.Builder withExcludedInferenceMetadataKeys(List<String> excludedInferenceMetadataKeys) Configures the excluded Inference metadata keys to filter out from the generative.- Parameters:
excludedInferenceMetadataKeys
- Excluded inference metadata keys to use.- Returns:
- this builder
-
withExcludedInferenceMetadataKeys
-
withExcludedEmbedMetadataKeys
public DefaultContentFormatter.Builder withExcludedEmbedMetadataKeys(List<String> excludedEmbedMetadataKeys) Configures the excluded Embed metadata keys to filter out from the generative.- Parameters:
excludedEmbedMetadataKeys
- Excluded Embed metadata keys to use.- Returns:
- this builder
-
withExcludedEmbedMetadataKeys
-
build
Returns the immutable configuration.- Returns:
- the immutable configuration
-