Class ListOutputConverter

All Implemented Interfaces:
FormatProvider, StructuredOutputConverter<List<String>>, org.springframework.core.convert.converter.Converter<String,List<String>>

public class ListOutputConverter extends AbstractConversionServiceOutputConverter<List<String>>
StructuredOutputConverter implementation that uses a DefaultConversionService to convert the LLM output into a List instance.
Author:
Mark Pollack, Christian Tzolov
  • Constructor Details

    • ListOutputConverter

      public ListOutputConverter(org.springframework.core.convert.support.DefaultConversionService defaultConversionService)
  • Method Details

    • getFormat

      public String getFormat()
      Description copied from interface: FormatProvider
      Get the format of the output of a language generative.
      Returns:
      Returns a string containing instructions for how the output of a language generative should be formatted.
    • convert

      public List<String> convert(@NonNull String text)