From a29b83e4fa3b50f5b123c3496788167325873d34 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 6 Jul 2023 23:52:43 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(settings.py):=20add=20supp?= =?UTF-8?q?ort=20for=20custom=20components=20in=20the=20settings=20?= =?UTF-8?q?=E2=9C=A8=20feat(settings.py):=20allow=20updating=20custom=20co?= =?UTF-8?q?mponents=20in=20the=20settings=20The=20`custom=5Fcomponents`=20?= =?UTF-8?q?attribute=20has=20been=20added=20to=20the=20`Settings`=20class?= =?UTF-8?q?=20to=20support=20custom=20components=20in=20the=20application.?= =?UTF-8?q?=20This=20allows=20users=20to=20define=20and=20use=20their=20ow?= =?UTF-8?q?n=20components=20in=20addition=20to=20the=20built-in=20ones.=20?= =?UTF-8?q?The=20`update=5Fsettings`=20method=20has=20been=20updated=20to?= =?UTF-8?q?=20include=20the=20`custom=5Fcomponents`=20attribute=20when=20u?= =?UTF-8?q?pdating=20the=20settings.=20This=20change=20improves=20the=20fl?= =?UTF-8?q?exibility=20and=20extensibility=20of=20the=20application.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/settings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/langflow/settings.py b/src/backend/langflow/settings.py index 5be06292e..d2b9ab938 100644 --- a/src/backend/langflow/settings.py +++ b/src/backend/langflow/settings.py @@ -21,6 +21,8 @@ class Settings(BaseSettings): textsplitters: dict = {} utilities: dict = {} output_parsers: dict = {} + custom_components: dict = {} + dev: bool = False database_url: str cache: str = "InMemoryCache" @@ -66,6 +68,7 @@ class Settings(BaseSettings): self.documentloaders = new_settings.documentloaders or {} self.retrievers = new_settings.retrievers or {} self.output_parsers = new_settings.output_parsers or {} + self.custom_components = new_settings.custom_components or {} self.dev = dev def update_settings(self, **kwargs):