Annotation Interface DecisionService


@Target(TYPE) @Introduction @Documented @AllowsReflection public @interface DecisionService
Registers a LangChain4j decision service: an interface whose methods are answered by a DecisionModel, created with DecisionServices.

The return type of a method determines the question: a boolean or described enum, a Choice, a Scale or an object of those, set with Decide.

The service uses the DecisionModel and ThresholdProvider beans named after the service, otherwise the default ones.

Since:
2.4.0
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the service, which selects the DecisionModel bean of that name.
    Defines the service name.
  • Element Details

    • value

      @AliasFor(annotation=jakarta.inject.Named.class,member="value") @AliasFor(member="named") String value
      Defines the service name. Same as named().
      Returns:
      The service name
      Default:
      ""
    • named

      @AliasFor(annotation=jakarta.inject.Named.class, member="value") String named
      The name of the service, which selects the DecisionModel bean of that name.
      Returns:
      The service name
      Default:
      ""