fix: tools now show the params properly

This commit is contained in:
Gabriel Almeida 2023-03-31 22:05:08 -03:00
commit be71829493

View file

@ -112,7 +112,7 @@ class ToolCreator(LangChainTypeCreator):
# Copy the field and add the name
fields = []
for param in params:
field = TOOL_INPUTS.get(param, TOOL_INPUTS["str"])
field = TOOL_INPUTS.get(param, TOOL_INPUTS["str"]).copy()
field.name = param
if param == "aiosession":
field.show = False