From a74b86e93bfab7f693ffbc7752893697fc457ec0 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sun, 10 Dec 2023 15:48:05 -0300 Subject: [PATCH] Update options field in TemplateFieldCreator class --- src/backend/langflow/template/field/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/langflow/template/field/base.py b/src/backend/langflow/template/field/base.py index 751b72af0..5d2502f88 100644 --- a/src/backend/langflow/template/field/base.py +++ b/src/backend/langflow/template/field/base.py @@ -1,5 +1,5 @@ from abc import ABC -from typing import Any, Optional, Union +from typing import Any, Callable, Optional, Union from pydantic import BaseModel @@ -35,7 +35,7 @@ class TemplateFieldCreator(BaseModel, ABC): password: bool = False """Specifies if the field is a password. Defaults to False.""" - options: list[str] = [] + options: Union[list[str], Callable] = [] """List of options for the field. Only used when is_list=True. Default is an empty list.""" name: str = ""