🎉 feat(formatter): add base FieldFormatter class for formatting template fields
The base.py file is a new addition to the project. It introduces the FieldFormatter class, which is an abstract base class (ABC) for formatting template fields. This class provides a format() method that takes a TemplateField object as input and is meant to be implemented by subclasses. This addition allows for the creation of custom field formatters in the project.
This commit is contained in:
parent
d272a682be
commit
75f0a80ded
2 changed files with 9 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
from abc import ABC, abstractmethod
|
||||
|
||||
from langflow.template.field.base import TemplateField
|
||||
|
||||
|
||||
class FieldFormatter(ABC):
|
||||
@abstractmethod
|
||||
def format(self, field: TemplateField):
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue