Class ThresholdContext

java.lang.Object
dev.langchain4j.service.decision.ThresholdContext

@Experimental public final class ThresholdContext extends Object
The question a ThresholdProvider is asked the threshold for.
Since:
1.21.0
  • Method Details

    • serviceInterface

      public Class<?> serviceInterface()
      The decision service interface.
    • method

      public Method method()
      The method that is invoked.
    • questionName

      public String questionName()
      The name of the question: the name of the method, or the name of the field for methods returning an object.
    • modelName

      public String modelName()
      The name of the model that answered the question, as reported by the provider (which can be more specific than the requested name, for example a pinned version instead of an alias). If the provider does not report it, the requested model name, or null if it is not known.
    • builder

      public static ThresholdContext.Builder builder()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object