Class ContentFormatTransformer

java.lang.Object
org.springframework.ai.transformer.ContentFormatTransformer
All Implemented Interfaces:
Function<List<Document>,List<Document>>, DocumentTransformer

public class ContentFormatTransformer extends Object implements DocumentTransformer
ContentFormatTransformer processes a list of documents by applying a content formatter to each document.
Since:
1.0.0
Author:
Christian Tzolov
  • Constructor Details

    • ContentFormatTransformer

      public ContentFormatTransformer(ContentFormatter contentFormatter)
      Creates a ContentFormatTransformer object with the given ContentFormatter.
      Parameters:
      contentFormatter - the ContentFormatter to be used for transforming the documents
    • ContentFormatTransformer

      public ContentFormatTransformer(ContentFormatter contentFormatter, boolean disableTemplateRewrite)
      The ContentFormatTransformer class is responsible for processing a list of documents by applying a content formatter to each document.
      Parameters:
      contentFormatter - The ContentFormatter to be used for transforming the documents
      disableTemplateRewrite - Flag indicating whether to disable the content-formatter template rewrite
  • Method Details