This commit is contained in:
Gabriel Almeida 2023-05-30 01:15:48 -03:00
commit 1a8d5561e9

View file

@ -64,7 +64,7 @@ class PromptNode(Node):
)
# flatten the list of tools if it is a list of lists
# first check if it is a list
if isinstance(tools, list) and isinstance(tools[0], list):
if tools and isinstance(tools, list) and isinstance(tools[0], list):
tools = [tool for sublist in tools for tool in sublist]
self.params["tools"] = tools