Enum Class SearchBehavior
- All Implemented Interfaces:
Serializable, Comparable<SearchBehavior>, Constable
Defines the behavior of a tool when
dev.langchain4j.service.tool.search.ToolSearchStrategy
is configured for an AI Service.- Since:
- 1.12.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIf you want a tool to always be visible to the LLM, use this setting.This is the default setting. -
Method Summary
Modifier and TypeMethodDescriptionstatic SearchBehaviorReturns the enum constant of this class with the specified name.static SearchBehavior[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SEARCHABLE
This is the default setting. WhenToolSearchStrategyis 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
If you want a tool to always be visible to the LLM, use this setting.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-