Package org.springframework.ai.converter
Class AbstractMessageOutputConverter<T>
java.lang.Object
org.springframework.ai.converter.AbstractMessageOutputConverter<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:
MapOutputConverter
public abstract class AbstractMessageOutputConverter<T>
extends Object
implements StructuredOutputConverter<T>
Abstract
StructuredOutputConverter implementation that uses a pre-configured
MessageConverter to convert the LLM output into the desired type format.- Author:
- Mark Pollack, Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractMessageOutputConverter(org.springframework.messaging.converter.MessageConverter messageConverter) Create a new AbstractMessageOutputConverter. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.messaging.converter.MessageConverterReturn the message converter used by this output converter.Methods 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, convertMethods inherited from interface org.springframework.ai.converter.FormatProvider
getFormat
-
Constructor Details
-
AbstractMessageOutputConverter
public AbstractMessageOutputConverter(org.springframework.messaging.converter.MessageConverter messageConverter) Create a new AbstractMessageOutputConverter.- Parameters:
messageConverter- the message converter to use
-
-
Method Details
-
getMessageConverter
public org.springframework.messaging.converter.MessageConverter getMessageConverter()Return the message converter used by this output converter.- Returns:
- the message converter
-