fix/dataset-retriever-tool-parameter-redundancy (#3418)

This commit is contained in:
Yeuoly 2024-04-12 17:04:36 +08:00 committed by GitHub
parent 1c56b48238
commit 25dea232d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,7 +38,7 @@ class ToolEngine:
if isinstance(tool_parameters, str):
# check if this tool has only one parameter
parameters = [
parameter for parameter in tool.parameters
parameter for parameter in tool.get_runtime_parameters()
if parameter.form == ToolParameter.ToolParameterForm.LLM
]
if parameters and len(parameters) == 1: