🐛 fix(validate.py): update input_types in template_field to ["Document", "BaseOutputParser"] for better accuracy
🐛 fix(base.py): remove "object" from CLASSES_TO_REMOVE list to prevent unnecessary removal
In validate.py, the input_types in the template_field for the "prompt" variable is updated to ["Document", "BaseOutputParser"] to accurately reflect the expected input types.
In base.py, the "object" class is removed from the CLASSES_TO_REMOVE list to prevent unnecessary removal of the "object" class from the FrontendNode class inheritance.
This commit is contained in:
parent
0cfcfcb912
commit
f79ee7092a
2 changed files with 2 additions and 2 deletions
|
|
@ -43,7 +43,7 @@ def post_validate_prompt(prompt: ValidatePromptRequest):
|
|||
field_type="str",
|
||||
show=True,
|
||||
advanced=False,
|
||||
input_types=["BaseLoader", "BaseOutputParser"],
|
||||
input_types=["Document", "BaseOutputParser"],
|
||||
)
|
||||
|
||||
prompt.frontend_node.template[variable] = template_field.to_dict()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from langflow.template.field.base import TemplateField
|
|||
from langflow.template.template.base import Template
|
||||
from langflow.utils import constants
|
||||
|
||||
CLASSES_TO_REMOVE = ["Serializable", "BaseModel"]
|
||||
CLASSES_TO_REMOVE = ["Serializable", "BaseModel", "object"]
|
||||
|
||||
|
||||
class FrontendNode(BaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue