Class KeywordMetadataEnricher

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

public class KeywordMetadataEnricher extends Object implements org.springframework.ai.document.DocumentTransformer
Keyword extractor that uses generative to extract 'excerpt_keywords' metadata field.
Author:
Christian Tzolov
  • Field Details

  • Constructor Details

    • KeywordMetadataEnricher

      public KeywordMetadataEnricher(ChatModel chatModel, int keywordCount)
  • Method Details

    • apply

      public List<org.springframework.ai.document.Document> apply(List<org.springframework.ai.document.Document> documents)
      Specified by:
      apply in interface Function<List<org.springframework.ai.document.Document>,List<org.springframework.ai.document.Document>>