diff --git a/src/backend/langflow/template/frontend_node/base.py b/src/backend/langflow/template/frontend_node/base.py index 6241e709e..d6d9f911a 100644 --- a/src/backend/langflow/template/frontend_node/base.py +++ b/src/backend/langflow/template/frontend_node/base.py @@ -5,13 +5,14 @@ from typing import List, Optional from pydantic import BaseModel, Field from langflow.template.frontend_node.formatter import field_formatters -from langflow.template.frontend_node.constants import FORCE_SHOW_FIELDS +from langflow.template.frontend_node.constants import ( + CLASSES_TO_REMOVE, + FORCE_SHOW_FIELDS, +) from langflow.template.field.base import TemplateField from langflow.template.template.base import Template from langflow.utils import constants -CLASSES_TO_REMOVE = ["Serializable", "BaseModel", "object"] - class FieldFormatters(BaseModel): formatters = { diff --git a/src/backend/langflow/template/frontend_node/constants.py b/src/backend/langflow/template/frontend_node/constants.py index 295995586..670fcb3fb 100644 --- a/src/backend/langflow/template/frontend_node/constants.py +++ b/src/backend/langflow/template/frontend_node/constants.py @@ -62,3 +62,6 @@ You can change this to use other APIs like JinaChat, LocalAI and Prem. INPUT_KEY_INFO = """The variable to be used as Chat Input when more than one variable is available.""" OUTPUT_KEY_INFO = """The variable to be used as Chat Output (e.g. answer in a ConversationalRetrievalChain)""" + + +CLASSES_TO_REMOVE = ["Serializable", "BaseModel", "object"]