diff --git a/src/backend/langflow/field_typing/__init__.py b/src/backend/langflow/field_typing/__init__.py index 2af9477ea..0a135818b 100644 --- a/src/backend/langflow/field_typing/__init__.py +++ b/src/backend/langflow/field_typing/__init__.py @@ -32,6 +32,7 @@ from .constants import ( NestedDict, Data, BaseLanguageModel, + Callable, ) __all__ = [ @@ -52,4 +53,5 @@ __all__ = [ "TextSplitter", "Document", "AgentExecutor", + "Callable", ] diff --git a/src/backend/langflow/field_typing/constants.py b/src/backend/langflow/field_typing/constants.py index 68179f05a..401a0d0b7 100644 --- a/src/backend/langflow/field_typing/constants.py +++ b/src/backend/langflow/field_typing/constants.py @@ -10,7 +10,7 @@ from langchain.schema.memory import BaseMemory from langchain.text_splitter import TextSplitter from langchain.tools import Tool from langchain.vectorstores.base import VectorStore -from typing import Union, Dict +from typing import Union, Dict, Callable # Type alias for more complex dicts NestedDict = Dict[str, Union[str, Dict]] @@ -48,4 +48,5 @@ CUSTOM_COMPONENT_SUPPORTED_TYPES = { "dict": dict, "NestedDict": NestedDict, "Data": Data, + "Callable": Callable, }