Interface OutputConverter

  • All Implemented Interfaces:

    
    public interface OutputConverter<T extends Object>
    
                        

    Output converter abstraction for parsing LLM output. Framework-agnostic interface that can be implemented by Spring AI converters or others.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract T convert(String source) Convert the LLM output string to the target type.
      abstract String getFormat() Get the format instructions to include in the prompt.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • convert

         abstract T convert(String source)

        Convert the LLM output string to the target type.

      • getFormat

         abstract String getFormat()

        Get the format instructions to include in the prompt. Returns null if no format instructions are needed (e.g., for String output).