🚀 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:
parent
9255f66a5d
commit
d936589c3d
1 changed files with 10 additions and 0 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue