Package org.springframework.ai.converter
Class AbstractConversionServiceOutputConverter<T>
java.lang.Object
org.springframework.ai.converter.AbstractConversionServiceOutputConverter<T>
- Type Parameters:
T
- Specifies the desired response type.
- All Implemented Interfaces:
FormatProvider
,StructuredOutputConverter<T>
,org.springframework.core.convert.converter.Converter<String,
T>
- Direct Known Subclasses:
ListOutputConverter
public abstract class AbstractConversionServiceOutputConverter<T>
extends Object
implements StructuredOutputConverter<T>
Abstract
StructuredOutputConverter
implementation that uses a pre-configured
DefaultConversionService
to convert the LLM output into the desired type
format.- Author:
- Mark Pollack, Christian Tzolov
-
Constructor Summary
ConstructorDescriptionAbstractConversionServiceOutputConverter
(org.springframework.core.convert.support.DefaultConversionService conversionService) Create a newAbstractConversionServiceOutputConverter
instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.convert.support.DefaultConversionService
Return the ConversionService used by this converter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.convert.converter.Converter
andThen, convert
Methods inherited from interface org.springframework.ai.converter.FormatProvider
getFormat
-
Constructor Details
-
AbstractConversionServiceOutputConverter
public AbstractConversionServiceOutputConverter(org.springframework.core.convert.support.DefaultConversionService conversionService) Create a newAbstractConversionServiceOutputConverter
instance.- Parameters:
conversionService
- theDefaultConversionService
to use for converting the output.
-
-
Method Details
-
getConversionService
public org.springframework.core.convert.support.DefaultConversionService getConversionService()Return the ConversionService used by this converter.- Returns:
- the ConversionService used by this converter.
-