🚀 feat(tools.py): add return_direct field to PythonFunctionToolNode

The return_direct field is a boolean field that allows the user to specify whether the output of the Python function should be returned directly or wrapped in a dictionary. This field is added to the TemplateField list of the PythonFunctionToolNode class.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-22 19:28:13 -03:00
commit d936589c3d

View file

@ -96,6 +96,16 @@ class PythonFunctionToolNode(FrontendNode):
name="code",
advanced=False,
),
TemplateField(
field_type="bool",
required=True,
placeholder="",
is_list=False,
show=True,
multiline=False,
value=False,
name="return_direct",
),
],
)
description: str = "Python function to be executed."