🐛 fix(validate.py): fix input_types in add_new_variables_to_template function to use correct input types

The input_types in the add_new_variables_to_template function were incorrect. They were set to ["BaseLoader", "BaseOutputParser"] instead of ["Document", "BaseOutputParser"]. This fix ensures that the correct input types are used for the template field.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-04 09:49:00 -03:00
commit 8a4f1406de

View file

@ -71,7 +71,7 @@ def add_new_variables_to_template(input_variables, prompt_request):
field_type="str",
show=True,
advanced=False,
input_types=["BaseLoader", "BaseOutputParser"],
input_types=["Document", "BaseOutputParser"],
)
prompt_request.frontend_node.template[variable] = template_field.to_dict()