Enum Class SearchBehavior

java.lang.Object
java.lang.Enum<SearchBehavior>
dev.langchain4j.agent.tool.SearchBehavior
All Implemented Interfaces:
Serializable, Comparable<SearchBehavior>, Constable

@Experimental public enum SearchBehavior extends Enum<SearchBehavior>
Defines the behavior of a tool when dev.langchain4j.service.tool.search.ToolSearchStrategy is configured for an AI Service.
Since:
1.12.0
  • Enum Constant Details

    • SEARCHABLE

      public static final SearchBehavior SEARCHABLE
      This is the default setting. When ToolSearchStrategy is configured for an AI Service, all tools configured for that AI Service automatically become searchable. They will not be visible to the LLM until they are found.
    • ALWAYS_VISIBLE

      public static final SearchBehavior ALWAYS_VISIBLE
      If you want a tool to always be visible to the LLM, use this setting.
  • Method Details

    • values

      public static SearchBehavior[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SearchBehavior valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null