🐛 fix(llms.py): add null check for name variable in azure field formatting

The code was updated to add a null check for the name variable before checking if it contains the string "azure". This prevents a potential runtime error if the name variable is null.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-06 11:44:57 -03:00
commit 73bad871f2

View file

@ -66,5 +66,5 @@ class LLMFrontendNode(FrontendNode):
field.show = True
LLMFrontendNode.format_openai_field(field)
if "azure" in name.lower():
if name and "azure" in name.lower():
LLMFrontendNode.format_azure_field(field)