Interface ToolPredicate
- All Known Implementing Classes:
NamedToolPredicate
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
这是一个功能接口,用于根据当前上下文来决定某个工具是否应该被提供给大型语言模型(LLM)使用。
-
方法概述
Modifier and TypeMethodDescriptiondefault booleantest(BaseTool tool, @Nullable ReadonlyContext readonlyContext) 用于决定是否选中指定的工具。booleantest(BaseTool tool, Optional<ReadonlyContext> readonlyContext) 已弃用(Deprecated)。
-
方法详细信息(Method Details)
-
test
Deprecated.Usetest(BaseTool, ReadonlyContext)instead.用于决定是否选中指定的工具。- Parameters:
tool- The tool to check.readonlyContext- The current context.- Returns:
- true if the tool should be selected, false otherwise.
-
test
用于决定是否选中指定的工具。- Parameters:
tool- The tool to check.readonlyContext- The current context.- Returns:
- true if the tool should be selected, false otherwise.
-
test(BaseTool, ReadonlyContext)相反。