Class MapOutputConverter

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

public class MapOutputConverter extends AbstractMessageOutputConverter<Map<String,Object>>
StructuredOutputConverter implementation that uses a pre-configured MappingJackson2MessageConverter to convert the LLM output into a java.util.Map<String, Object> instance.
Author:
Mark Pollack, Christian Tzolov
  • Constructor Details

    • MapOutputConverter

      public MapOutputConverter()
  • Method Details

    • convert

      public Map<String,Object> convert(@NonNull String text)
    • getFormat

      public String getFormat()
      Returns:
      Returns a string containing instructions for how the output of a language generative should be formatted.