🔧 chore(validate.py): add display_name field to TemplateField in post_validate_prompt function

The display_name field is added to the TemplateField object in the post_validate_prompt function. This field allows for a more user-friendly display of the variable name in the UI.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-30 06:46:00 -03:00
commit 3ae84bea13

View file

@ -39,6 +39,7 @@ def post_validate_prompt(prompt: ValidatePromptRequest):
try:
template_field = TemplateField(
name=variable,
display_name=variable,
field_type="str",
show=True,
advanced=False,