Package org.springframework.ai.converter
Class ListOutputConverter
java.lang.Object
org.springframework.ai.converter.AbstractConversionServiceOutputConverter<List<String>>
org.springframework.ai.converter.ListOutputConverter
- All Implemented Interfaces:
FormatProvider,StructuredOutputConverter<List<String>>,org.springframework.core.convert.converter.Converter<String,List<String>>
StructuredOutputConverter implementation that uses a
DefaultConversionService to convert the LLM output into a
List instance.- Author:
- Mark Pollack, Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionListOutputConverter(org.springframework.core.convert.support.DefaultConversionService defaultConversionService) -
Method Summary
Methods inherited from class org.springframework.ai.converter.AbstractConversionServiceOutputConverter
getConversionServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
ListOutputConverter
public ListOutputConverter() -
ListOutputConverter
public ListOutputConverter(org.springframework.core.convert.support.DefaultConversionService defaultConversionService)
-
-
Method Details
-
getFormat
Description copied from interface:FormatProviderGet 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
-