🐛 fix(base.py): import CLASSES_TO_REMOVE constant from constants module to fix NameError

🔀 chore(constants.py): add CLASSES_TO_REMOVE constant to store classes to be removed from base.py module
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-25 14:21:43 -03:00
commit c83060ed58
2 changed files with 7 additions and 3 deletions

View file

@ -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 = {

View file

@ -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"]