Interface StructuredOutputConverter<T>

Type Parameters:
T - Specifies the desired response type.
All Superinterfaces:
org.springframework.core.convert.converter.Converter<String,T>, FormatProvider
All Known Implementing Classes:
AbstractConversionServiceOutputConverter, AbstractMessageOutputConverter, BeanOutputConverter, ListOutputConverter, MapOutputConverter

public interface StructuredOutputConverter<T> extends org.springframework.core.convert.converter.Converter<String,T>, FormatProvider
Converts the (raw) LLM output into a structured responses of type. The FormatProvider.getFormat() method should provide the LLM prompt description of the desired format.
Author:
Mark Pollack, Christian Tzolov
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    parse(String source)
    Deprecated.
    Use the Converter.convert(Object) instead.

    Methods inherited from interface org.springframework.core.convert.converter.Converter

    andThen, convert

    Methods inherited from interface org.springframework.ai.converter.FormatProvider

    getFormat
  • Method Details

    • parse

      default T parse(@NonNull String source)
      Deprecated.
      Use the Converter.convert(Object) instead.