Class ToolServiceContext.Builder
java.lang.Object
dev.langchain4j.service.tool.ToolServiceContext.Builder
- Enclosing class:
ToolServiceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailableTools(List<ToolSpecification> availableTools) Sets all available tool specifications configured for AI service.build()effectiveTools(List<ToolSpecification> effectiveTools) Sets effective tool specifications that should be included in the nextChatRequest.immediateReturnTools(Set<String> immediateReturnTools) toolExecutors(Map<String, ToolExecutor> toolExecutors) toolSpecifications(List<ToolSpecification> toolSpecifications) Deprecated.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
effectiveTools
Sets effective tool specifications that should be included in the nextChatRequest.- See Also:
-
toolSpecifications
@Deprecated(since="1.12.0") public ToolServiceContext.Builder toolSpecifications(List<ToolSpecification> toolSpecifications) Deprecated.useeffectiveTools(List)insteadSets effective tool specifications that should be included in the nextChatRequest.- See Also:
-
availableTools
Sets all available tool specifications configured for AI service. These tool specifications can be discovered/found by the LLM (seeToolSearchStrategy) and included in the nextChatRequest.- Since:
- 1.12.0
- See Also:
-
toolExecutors
-
immediateReturnTools
-
build
-
effectiveTools(List)instead