🐛 fix(llms.py): add condition to show password field for 'tokens' field name

The condition to show the password field was not working for the 'tokens' field name. The condition has been updated to include 'tokens' in the field name and show the password field.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-15 18:14:48 -03:00
commit 99ce643010

View file

@ -46,7 +46,10 @@ class LLMFrontendNode(FrontendNode):
if field.name in SHOW_FIELDS:
field.show = True
if "api" in field.name and ("key" in field.name or "token" in field.name):
if "api" in field.name and (
"key" in field.name
or ("token" in field.name and "tokens" not in field.name)
):
field.password = True
field.show = True
# Required should be False to support