🔧 chore(chains.py): update field properties for "RetrievalQA" memory field

The "RetrievalQA" memory field in the template frontend node is updated to have the "show" and "required" properties set to False. This change is made to hide the memory field and make it optional. Additionally, the "advanced" property is set to False for all fields, and the "password" property is set to False for fields containing the word "key" in their name.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-29 08:26:23 -03:00
commit d272a682be

View file

@ -49,6 +49,10 @@ class ChainFrontendNode(FrontendNode):
def format_field(field: TemplateField, name: Optional[str] = None) -> None:
FrontendNode.format_field(field, name)
if "name" == "RetrievalQA" and field.name == "memory":
field.show = False
field.required = False
field.advanced = False
if "key" in field.name:
field.password = False