From 254b853ed351234b799d54d5029821c2c62fd0d6 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Thu, 27 Jun 2024 23:56:19 -0300 Subject: [PATCH 01/20] Fixed bug where updating the node does not remove edited status --- src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx index 1e8e79a1f20..cc0d368a530 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx @@ -17,10 +17,9 @@ const useUpdateNodeCode = ( newNode.data = { ...newNode.data, - node: newNodeClass, + node: { edited: false, ...newNodeClass }, description: newNodeClass.description ?? dataNode.description, display_name: newNodeClass.display_name ?? dataNode.display_name, - edited: false, }; if (type) { newNode.data.type = type; From a833702b368f3afa3a9241bc604640bf18750b9b Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Fri, 28 Jun 2024 00:02:36 -0300 Subject: [PATCH 02/20] Fixed order of edited override --- src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx index cc0d368a530..9ce7fdb626d 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx @@ -17,10 +17,11 @@ const useUpdateNodeCode = ( newNode.data = { ...newNode.data, - node: { edited: false, ...newNodeClass }, + node: { ...newNodeClass, edited: false }, description: newNodeClass.description ?? dataNode.description, display_name: newNodeClass.display_name ?? dataNode.display_name, }; + console.log(newNode) if (type) { newNode.data.type = type; } @@ -29,6 +30,7 @@ const useUpdateNodeCode = ( setIsOutdated(false); setIsUserEdited(false); + console.log(newNode); return newNode; }); From 371b4f855f1dd9a3f5cc9a31e251b45301b2b7fa Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Fri, 28 Jun 2024 00:21:53 -0300 Subject: [PATCH 03/20] Made all node-changing functions to alter type the right way --- .../GenericNode/components/parameterComponent/index.tsx | 4 ++-- .../src/CustomNodes/hooks/use-handle-node-class.tsx | 2 +- src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx | 2 -- .../FlowPage/components/nodeToolbarComponent/index.tsx | 6 +++++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index cb65a71c12c..7b27925560d 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -179,8 +179,8 @@ export default function ParameterComponent({ handleOnNewValueHook(newValue, skipSnapshot); }; - const handleNodeClass = (newNodeClass: APIClassType, code?: string): void => { - handleNodeClassHook(newNodeClass, code); + const handleNodeClass = (newNodeClass: APIClassType, code?: string, type?: string): void => { + handleNodeClassHook(newNodeClass, code, type); }; useEffect(() => { diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx index e82c06e72a9..0827c0b4ebb 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx @@ -24,7 +24,7 @@ const useHandleNodeClass = ( display_name: newNodeClass.display_name ?? data.node!.display_name, }; if (type) { - newNode.data.node.template[name].type = type; + newNode.data.type = type; } newNode.data.node.template[name].value = code; diff --git a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx index 9ce7fdb626d..beb0430c89c 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx @@ -21,7 +21,6 @@ const useUpdateNodeCode = ( description: newNodeClass.description ?? dataNode.description, display_name: newNodeClass.display_name ?? dataNode.display_name, }; - console.log(newNode) if (type) { newNode.data.type = type; } @@ -30,7 +29,6 @@ const useUpdateNodeCode = ( setIsOutdated(false); setIsUserEdited(false); - console.log(newNode); return newNode; }); diff --git a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx index c10e17c290c..0ca96a19aaa 100644 --- a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx @@ -386,7 +386,7 @@ export default function NodeToolbarComponent({ }); }; - const handleNodeClass = (newNodeClass: APIClassType, code?: string): void => { + const handleNodeClass = (newNodeClass: APIClassType, code?: string, type?: string): void => { if (!data.node) return; if (data.node!.template[name].value !== code) { takeSnapshot(); @@ -402,6 +402,10 @@ export default function NodeToolbarComponent({ display_name: newNodeClass.display_name ?? data.node!.display_name, }; + if (type) { + newNode.data.type = type; + } + newNode.data.node.template[name].value = code; return newNode; From 9d8811c9bcd376e7cc873fbec3526f4fa58985f5 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Wed, 26 Jun 2024 11:12:25 -0300 Subject: [PATCH 04/20] Update StoreMessageComponent for enhanced message handling - Changed base class from CustomComponent to Component - Added multiple input fields: message, sender, sender_name, session_id - Included output field for stored messages - Improved logic to handle both string and Message types - Enhanced error handling and validation for message storage --- .../components/helpers/StoreMessage.py | 76 +++++++++++++++---- 1 file changed, 61 insertions(+), 15 deletions(-) diff --git a/src/backend/base/langflow/components/helpers/StoreMessage.py b/src/backend/base/langflow/components/helpers/StoreMessage.py index 5d0abfbb977..6e37573a8f5 100644 --- a/src/backend/base/langflow/components/helpers/StoreMessage.py +++ b/src/backend/base/langflow/components/helpers/StoreMessage.py @@ -1,22 +1,68 @@ -from langflow.custom import CustomComponent -from langflow.memory import get_messages, store_message +from langflow.custom import Component +from langflow.inputs import MessageTextInput, StrInput from langflow.schema.message import Message +from langflow.template import Output +from langflow.memory import get_messages, store_message - -class StoreMessageComponent(CustomComponent): +class StoreMessageComponent(Component): display_name = "Store Message" - description = "Stores a chat message." + description = "Stores a chat message or text." + icon = "save" + + inputs = [ + MessageTextInput( + name="message", + display_name="Message", + info="The chat message to be stored.", + input_types=["Message", "str"], + required=True + ), + StrInput( + name="sender", + display_name="Sender", + info="The sender of the message.", + value="", + advanced=True, + ), + StrInput( + name="sender_name", + display_name="Sender Name", + info="The name of the sender.", + value="", + advanced=True + ), + StrInput( + name="session_id", + display_name="Session ID", + info="The session ID of the chat.", + value="", + + ), + ] + + outputs = [ + Output(display_name="Stored Messages", name="stored_messages", method="store_message"), + ] + + def store_message(self) -> Message: + if isinstance(self.message, str): + if not self.session_id: + raise ValueError("If passing a text, Session ID cannot be empty.") + message = Message(text=self.message, sender=self.sender, sender_name=self.sender_name, session_id=self.session_id) - def build_config(self): - return { - "message": {"display_name": "Message"}, - } + elif isinstance(self.message, Message): + message = self.message + if self.session_id: + message.session_id = self.session_id + if self.sender: + message.sender = self.sender + if self.sender_name: + message.sender_name = self.sender_name + else: + raise ValueError("Message should be either string or Message.") - def build( - self, - message: Message, - ) -> Message: store_message(message, flow_id=self.graph.flow_id) - self.status = get_messages() - return message + stored = get_messages(session_id=message.session_id, sender_name=message.sender_name, sender=message.sender) + self.status = stored + return stored From 0ab9106f5b81b5115e79bc55f0cdfe320d98a284 Mon Sep 17 00:00:00 2001 From: rodrigosnader Date: Wed, 26 Jun 2024 14:13:47 +0000 Subject: [PATCH 05/20] Apply Ruff formatting --- .../langflow/components/helpers/StoreMessage.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/backend/base/langflow/components/helpers/StoreMessage.py b/src/backend/base/langflow/components/helpers/StoreMessage.py index 6e37573a8f5..4864bf4a717 100644 --- a/src/backend/base/langflow/components/helpers/StoreMessage.py +++ b/src/backend/base/langflow/components/helpers/StoreMessage.py @@ -4,6 +4,7 @@ from langflow.template import Output from langflow.memory import get_messages, store_message + class StoreMessageComponent(Component): display_name = "Store Message" description = "Stores a chat message or text." @@ -15,7 +16,7 @@ class StoreMessageComponent(Component): display_name="Message", info="The chat message to be stored.", input_types=["Message", "str"], - required=True + required=True, ), StrInput( name="sender", @@ -25,18 +26,13 @@ class StoreMessageComponent(Component): advanced=True, ), StrInput( - name="sender_name", - display_name="Sender Name", - info="The name of the sender.", - value="", - advanced=True + name="sender_name", display_name="Sender Name", info="The name of the sender.", value="", advanced=True ), StrInput( name="session_id", display_name="Session ID", info="The session ID of the chat.", value="", - ), ] @@ -48,7 +44,9 @@ def store_message(self) -> Message: if isinstance(self.message, str): if not self.session_id: raise ValueError("If passing a text, Session ID cannot be empty.") - message = Message(text=self.message, sender=self.sender, sender_name=self.sender_name, session_id=self.session_id) + message = Message( + text=self.message, sender=self.sender, sender_name=self.sender_name, session_id=self.session_id + ) elif isinstance(self.message, Message): message = self.message From ccfe8f018bfc929bd6b565a7687e3d479fbff650 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Wed, 26 Jun 2024 12:02:18 -0300 Subject: [PATCH 06/20] Update StoreMessageComponent for enhanced message handling --- .../components/helpers/StoreMessage.py | 36 +++++-------- .../langflow/components/prototypes/Pass.py | 54 +++++++++---------- 2 files changed, 40 insertions(+), 50 deletions(-) diff --git a/src/backend/base/langflow/components/helpers/StoreMessage.py b/src/backend/base/langflow/components/helpers/StoreMessage.py index 4864bf4a717..90e2c27694c 100644 --- a/src/backend/base/langflow/components/helpers/StoreMessage.py +++ b/src/backend/base/langflow/components/helpers/StoreMessage.py @@ -1,5 +1,5 @@ from langflow.custom import Component -from langflow.inputs import MessageTextInput, StrInput +from langflow.inputs import MessageInput, StrInput from langflow.schema.message import Message from langflow.template import Output from langflow.memory import get_messages, store_message @@ -11,22 +11,25 @@ class StoreMessageComponent(Component): icon = "save" inputs = [ - MessageTextInput( + MessageInput( name="message", display_name="Message", info="The chat message to be stored.", - input_types=["Message", "str"], - required=True, + required=True ), StrInput( name="sender", display_name="Sender", info="The sender of the message.", - value="", + value="AI", advanced=True, ), StrInput( - name="sender_name", display_name="Sender Name", info="The name of the sender.", value="", advanced=True + name="sender_name", + display_name="Sender Name", + info="The name of the sender.", + value="AI", + advanced=True ), StrInput( name="session_id", @@ -41,26 +44,13 @@ class StoreMessageComponent(Component): ] def store_message(self) -> Message: - if isinstance(self.message, str): - if not self.session_id: - raise ValueError("If passing a text, Session ID cannot be empty.") - message = Message( - text=self.message, sender=self.sender, sender_name=self.sender_name, session_id=self.session_id - ) + message = self.message - elif isinstance(self.message, Message): - message = self.message - if self.session_id: - message.session_id = self.session_id - if self.sender: - message.sender = self.sender - if self.sender_name: - message.sender_name = self.sender_name - else: - raise ValueError("Message should be either string or Message.") + message.session_id = self.session_id or message.session_id + message.sender = self.sender or message.sender + message.sender_name = self.sender_name or message.sender_name store_message(message, flow_id=self.graph.flow_id) - stored = get_messages(session_id=message.session_id, sender_name=message.sender_name, sender=message.sender) self.status = stored return stored diff --git a/src/backend/base/langflow/components/prototypes/Pass.py b/src/backend/base/langflow/components/prototypes/Pass.py index 4e2f234c977..a84164380fb 100644 --- a/src/backend/base/langflow/components/prototypes/Pass.py +++ b/src/backend/base/langflow/components/prototypes/Pass.py @@ -1,31 +1,31 @@ -from typing import Union +from langflow.custom import Component +from langflow.io import MessageInput +from langflow.schema.message import Message +from langflow.template import Output -from langflow.custom import CustomComponent -from langflow.field_typing import Text -from langflow.schema import Data - - -class PassComponent(CustomComponent): +class PassMessageComponent(Component): display_name = "Pass" - description = "A pass-through component that forwards the second input while ignoring the first, used for controlling workflow direction." - field_order = ["ignored_input", "forwarded_input"] - beta = True + description = "Forwards the input message, unchanged." + icon = "arrow-right" + + inputs = [ + MessageInput( + name="input_message", + display_name="Input Message", + info="The message to be passed forward.", + ), + MessageInput( + name="ignored_message", + display_name="Ignored Message", + info="A second message to be ignored. Used as a workaround for continuity.", + advanced=True + ), + ] - def build_config(self) -> dict: - return { - "ignored_input": { - "display_name": "Ignored Input", - "info": "This input is ignored. It's used to control the flow in the graph.", - "input_types": ["Text", "Data"], - }, - "forwarded_input": { - "display_name": "Input", - "info": "This input is forwarded by the component.", - "input_types": ["Text", "Data"], - }, - } + outputs = [ + Output(display_name="Output Message", name="output_message", method="pass_message"), + ] - def build(self, ignored_input: Text, forwarded_input: Text) -> Union[Text, Data]: - # The ignored_input is not used in the logic, it's just there for graph flow control - self.status = forwarded_input - return forwarded_input + def pass_message(self) -> Message: + self.status = self.input_message + return self.input_message From 23991e4742528dd0c06af4b258010bd40226d9bc Mon Sep 17 00:00:00 2001 From: rodrigosnader Date: Wed, 26 Jun 2024 15:03:14 +0000 Subject: [PATCH 07/20] Apply Ruff formatting --- .../langflow/components/helpers/StoreMessage.py | 13 ++----------- .../base/langflow/components/prototypes/Pass.py | 3 ++- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/backend/base/langflow/components/helpers/StoreMessage.py b/src/backend/base/langflow/components/helpers/StoreMessage.py index 90e2c27694c..ce1abbe29e9 100644 --- a/src/backend/base/langflow/components/helpers/StoreMessage.py +++ b/src/backend/base/langflow/components/helpers/StoreMessage.py @@ -11,12 +11,7 @@ class StoreMessageComponent(Component): icon = "save" inputs = [ - MessageInput( - name="message", - display_name="Message", - info="The chat message to be stored.", - required=True - ), + MessageInput(name="message", display_name="Message", info="The chat message to be stored.", required=True), StrInput( name="sender", display_name="Sender", @@ -25,11 +20,7 @@ class StoreMessageComponent(Component): advanced=True, ), StrInput( - name="sender_name", - display_name="Sender Name", - info="The name of the sender.", - value="AI", - advanced=True + name="sender_name", display_name="Sender Name", info="The name of the sender.", value="AI", advanced=True ), StrInput( name="session_id", diff --git a/src/backend/base/langflow/components/prototypes/Pass.py b/src/backend/base/langflow/components/prototypes/Pass.py index a84164380fb..28e9ea524e4 100644 --- a/src/backend/base/langflow/components/prototypes/Pass.py +++ b/src/backend/base/langflow/components/prototypes/Pass.py @@ -3,6 +3,7 @@ from langflow.schema.message import Message from langflow.template import Output + class PassMessageComponent(Component): display_name = "Pass" description = "Forwards the input message, unchanged." @@ -18,7 +19,7 @@ class PassMessageComponent(Component): name="ignored_message", display_name="Ignored Message", info="A second message to be ignored. Used as a workaround for continuity.", - advanced=True + advanced=True, ), ] From 2b26c5c7bd382e8926f9d80674e61931dbc3251e Mon Sep 17 00:00:00 2001 From: igorrCarvalho Date: Tue, 25 Jun 2024 11:06:41 -0300 Subject: [PATCH 08/20] Feat: add more types --- src/frontend/src/CustomNodes/GenericNode/index.tsx | 4 ++-- src/frontend/src/CustomNodes/helpers/get-node-input-colors.ts | 2 +- .../src/CustomNodes/helpers/get-node-output-colors.ts | 4 +++- src/frontend/src/components/ImageViewer/index.tsx | 2 +- .../src/components/horizontalScrollFadeComponent/index.tsx | 3 +++ src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx | 3 ++- src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 18c2bbb6a8f..c71313b3b91 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -26,7 +26,7 @@ import useFlowStore from "../../stores/flowStore"; import useFlowsManagerStore from "../../stores/flowsManagerStore"; import { useShortcutsStore } from "../../stores/shortcuts"; import { useTypesStore } from "../../stores/typesStore"; -import { VertexBuildTypeAPI } from "../../types/api"; +import { OutputFieldType, VertexBuildTypeAPI } from "../../types/api"; import { NodeDataType } from "../../types/flow"; import { handleKeyDown, scapedJSONStringfy } from "../../utils/reactflowUtils"; import { nodeColors, nodeIconsLucide } from "../../utils/styleUtils"; @@ -279,7 +279,7 @@ export default function GenericNode({ const shortcuts = useShortcutsStore((state) => state.shortcuts); - const renderOutputParameter = (output, idx) => { + const renderOutputParameter = (output: OutputFieldType, idx: number) => { return ( nodeColors[type] ?? nodeColors.unknown; diff --git a/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts b/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts index d846a304e76..b91a9691c92 100644 --- a/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts +++ b/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts @@ -1,6 +1,8 @@ +import { OutputFieldType } from "../../types/api"; +import { NodeDataType } from "../../types/flow"; import { nodeColors } from "../../utils/styleUtils"; -export function getNodeOutputColors(output, data, types): string[] { +export function getNodeOutputColors(output: OutputFieldType, data: NodeDataType, types: {[char: string]: string}): string[] { // Helper function to get the color based on type const getColorByType = (type) => nodeColors[type] ?? nodeColors.unknown; diff --git a/src/frontend/src/components/ImageViewer/index.tsx b/src/frontend/src/components/ImageViewer/index.tsx index 9e7f091d276..8c62894a3f5 100644 --- a/src/frontend/src/components/ImageViewer/index.tsx +++ b/src/frontend/src/components/ImageViewer/index.tsx @@ -6,7 +6,7 @@ import useAlertStore from "../../stores/alertStore"; import ForwardedIconComponent from "../genericIconComponent"; import { Separator } from "../ui/separator"; -export default function ImageViewer({ image }) { +export default function ImageViewer({ image }: {image: string}) { const viewerRef = useRef(null); const [errorDownloading, setErrordownloading] = useState(false); const setErrorList = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx index e0bf4891700..b59927e5363 100644 --- a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx +++ b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx @@ -3,6 +3,9 @@ import { useEffect, useRef, useState } from "react"; export default function HorizontalScrollFadeComponent({ children, isFolder = true, +}: { + children: JSX.Element | JSX.Element[], + isFolder?: boolean, }) { const scrollContainerRef = useRef(null); const fadeContainerRef = useRef(null); diff --git a/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx b/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx index cb12ca7cb40..f6cf486c386 100644 --- a/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx +++ b/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx @@ -1,8 +1,9 @@ +import { FolderType } from "../../../pages/MainPage/entities"; import { addFolder, updateFolder } from "../../../pages/MainPage/services"; import useAlertStore from "../../../stores/alertStore"; import { useFolderStore } from "../../../stores/foldersStore"; -const useFolderSubmit = (setOpen, folderToEdit) => { +const useFolderSubmit = (setOpen: (a: boolean) => void, folderToEdit: FolderType | null) => { const setSuccessData = useAlertStore((state) => state.setSuccessData); const setErrorData = useAlertStore((state) => state.setErrorData); const getFoldersApi = useFolderStore((state) => state.getFoldersApi); diff --git a/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx b/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx index 71a8ac944b2..9dcd054c48f 100644 --- a/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx +++ b/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx @@ -1,9 +1,10 @@ import { useNavigate } from "react-router-dom"; +import { FolderType } from "../../../pages/MainPage/entities"; import { addFolder, updateFolder } from "../../../pages/MainPage/services"; import useAlertStore from "../../../stores/alertStore"; import { useFolderStore } from "../../../stores/foldersStore"; -const useFolderSubmit = (setOpen, folderToEdit) => { +const useFolderSubmit = (setOpen: (a: boolean) => void, folderToEdit: FolderType | null) => { const setSuccessData = useAlertStore((state) => state.setSuccessData); const setErrorData = useAlertStore((state) => state.setErrorData); const getFoldersApi = useFolderStore((state) => state.getFoldersApi); From 5828180ce4a8cdf40c939ee53d282b9b903b76a6 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Thu, 27 Jun 2024 17:33:49 -0300 Subject: [PATCH 09/20] Format code --- .../src/CustomNodes/helpers/get-node-input-colors.ts | 6 +++++- .../src/CustomNodes/helpers/get-node-output-colors.ts | 6 +++++- src/frontend/src/components/ImageViewer/index.tsx | 2 +- .../src/components/horizontalScrollFadeComponent/index.tsx | 4 ++-- src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx | 5 ++++- .../src/modals/foldersModal/hooks/submit-folder.tsx | 5 ++++- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/CustomNodes/helpers/get-node-input-colors.ts b/src/frontend/src/CustomNodes/helpers/get-node-input-colors.ts index e76d073bd63..58b2ae677f6 100644 --- a/src/frontend/src/CustomNodes/helpers/get-node-input-colors.ts +++ b/src/frontend/src/CustomNodes/helpers/get-node-input-colors.ts @@ -1,6 +1,10 @@ import { nodeColors } from "../../utils/styleUtils"; -export function getNodeInputColors(input_types: string[] | undefined, type: string | undefined, types: {[char: string]: string}) { +export function getNodeInputColors( + input_types: string[] | undefined, + type: string | undefined, + types: { [char: string]: string }, +) { // Helper function to get the color based on type const getColorByType = (type) => nodeColors[type] ?? nodeColors.unknown; diff --git a/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts b/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts index b91a9691c92..dcac3d5cc7f 100644 --- a/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts +++ b/src/frontend/src/CustomNodes/helpers/get-node-output-colors.ts @@ -2,7 +2,11 @@ import { OutputFieldType } from "../../types/api"; import { NodeDataType } from "../../types/flow"; import { nodeColors } from "../../utils/styleUtils"; -export function getNodeOutputColors(output: OutputFieldType, data: NodeDataType, types: {[char: string]: string}): string[] { +export function getNodeOutputColors( + output: OutputFieldType, + data: NodeDataType, + types: { [char: string]: string }, +): string[] { // Helper function to get the color based on type const getColorByType = (type) => nodeColors[type] ?? nodeColors.unknown; diff --git a/src/frontend/src/components/ImageViewer/index.tsx b/src/frontend/src/components/ImageViewer/index.tsx index 8c62894a3f5..6e2c340fdd7 100644 --- a/src/frontend/src/components/ImageViewer/index.tsx +++ b/src/frontend/src/components/ImageViewer/index.tsx @@ -6,7 +6,7 @@ import useAlertStore from "../../stores/alertStore"; import ForwardedIconComponent from "../genericIconComponent"; import { Separator } from "../ui/separator"; -export default function ImageViewer({ image }: {image: string}) { +export default function ImageViewer({ image }: { image: string }) { const viewerRef = useRef(null); const [errorDownloading, setErrordownloading] = useState(false); const setErrorList = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx index b59927e5363..db78daaaf76 100644 --- a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx +++ b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx @@ -4,8 +4,8 @@ export default function HorizontalScrollFadeComponent({ children, isFolder = true, }: { - children: JSX.Element | JSX.Element[], - isFolder?: boolean, + children: JSX.Element | JSX.Element[]; + isFolder?: boolean; }) { const scrollContainerRef = useRef(null); const fadeContainerRef = useRef(null); diff --git a/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx b/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx index f6cf486c386..cd3c3a1e17a 100644 --- a/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx +++ b/src/frontend/src/modals/BundleModal/hooks/submit-folder.tsx @@ -3,7 +3,10 @@ import { addFolder, updateFolder } from "../../../pages/MainPage/services"; import useAlertStore from "../../../stores/alertStore"; import { useFolderStore } from "../../../stores/foldersStore"; -const useFolderSubmit = (setOpen: (a: boolean) => void, folderToEdit: FolderType | null) => { +const useFolderSubmit = ( + setOpen: (a: boolean) => void, + folderToEdit: FolderType | null, +) => { const setSuccessData = useAlertStore((state) => state.setSuccessData); const setErrorData = useAlertStore((state) => state.setErrorData); const getFoldersApi = useFolderStore((state) => state.getFoldersApi); diff --git a/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx b/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx index 9dcd054c48f..a60f2a41953 100644 --- a/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx +++ b/src/frontend/src/modals/foldersModal/hooks/submit-folder.tsx @@ -4,7 +4,10 @@ import { addFolder, updateFolder } from "../../../pages/MainPage/services"; import useAlertStore from "../../../stores/alertStore"; import { useFolderStore } from "../../../stores/foldersStore"; -const useFolderSubmit = (setOpen: (a: boolean) => void, folderToEdit: FolderType | null) => { +const useFolderSubmit = ( + setOpen: (a: boolean) => void, + folderToEdit: FolderType | null, +) => { const setSuccessData = useAlertStore((state) => state.setSuccessData); const setErrorData = useAlertStore((state) => state.setErrorData); const getFoldersApi = useFolderStore((state) => state.getFoldersApi); From b9fa75b6c3bf41912b6bcf6ca6730c06f896fe8d Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Fri, 28 Jun 2024 11:02:24 -0300 Subject: [PATCH 10/20] feat: Add CreateListComponent for creating a list of texts This commit adds a new component called CreateListComponent, which is responsible for creating a list of texts. The component takes in one or more texts as input and outputs a list of Data objects. This component is useful for scenarios where a list of texts needs to be processed or manipulated. The CreateListComponent class is added to the helpers module in the langflow.components package. It includes the necessary inputs and outputs, as well as a create_list method that generates the list of Data objects based on the input texts. This commit also includes some minor changes to other files, such as renaming the UUIDGeneratorComponent to IDGeneratorComponent and updating import statements. --- .../langflow/components/helpers/CreateList.py | 27 +++++++++++++++++++ .../components/helpers/IDGenerator.py | 2 +- .../langflow/components/helpers/__init__.py | 7 +++-- .../prototypes/ConditionalRouter.py | 16 +++++------ .../langflow/components/prototypes/Pass.py | 3 +-- tests/unit/test_helper_components.py | 2 +- 6 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 src/backend/base/langflow/components/helpers/CreateList.py diff --git a/src/backend/base/langflow/components/helpers/CreateList.py b/src/backend/base/langflow/components/helpers/CreateList.py new file mode 100644 index 00000000000..217e16dfe89 --- /dev/null +++ b/src/backend/base/langflow/components/helpers/CreateList.py @@ -0,0 +1,27 @@ +from langflow.custom import Component +from langflow.inputs import StrInput +from langflow.schema import Data +from langflow.template import Output + +class CreateListComponent(Component): + display_name = "Create List" + description = "Creates a list of texts." + icon = "list" + + inputs = [ + StrInput( + name="texts", + display_name="Texts", + info="Enter one or more texts.", + is_list=True, + ), + ] + + outputs = [ + Output(display_name="Data List", name="list", method="create_list"), + ] + + def create_list(self) -> list[Data]: + data = [Data(text=text) for text in self.texts] + self.status = data + return data diff --git a/src/backend/base/langflow/components/helpers/IDGenerator.py b/src/backend/base/langflow/components/helpers/IDGenerator.py index 72a944f71df..7e63f870b43 100644 --- a/src/backend/base/langflow/components/helpers/IDGenerator.py +++ b/src/backend/base/langflow/components/helpers/IDGenerator.py @@ -5,7 +5,7 @@ from langflow.schema.dotdict import dotdict -class UUIDGeneratorComponent(CustomComponent): +class IDGeneratorComponent(CustomComponent): display_name = "ID Generator" description = "Generates a unique ID." diff --git a/src/backend/base/langflow/components/helpers/__init__.py b/src/backend/base/langflow/components/helpers/__init__.py index 1941e38b888..fcc9e83ee0f 100644 --- a/src/backend/base/langflow/components/helpers/__init__.py +++ b/src/backend/base/langflow/components/helpers/__init__.py @@ -1,22 +1,25 @@ from .CombineText import CombineTextComponent from .CustomComponent import CustomComponent from .FilterData import FilterDataComponent -from .IDGenerator import UUIDGeneratorComponent +from .IDGenerator import IDGeneratorComponent from .Memory import MemoryComponent from .MergeData import MergeDataComponent from .ParseData import ParseDataComponent from .SplitText import SplitTextComponent from .StoreMessage import StoreMessageComponent +from .CreateList import CreateListComponent __all__ = [ + "CreateListComponent", "CombineTextComponent", "CustomComponent", "FilterDataComponent", - "UUIDGeneratorComponent", + "IDGeneratorComponent", "MemoryComponent", "MergeDataComponent", "ParseDataComponent", "SplitTextComponent", "StoreMessageComponent", + "ListComponent", ] diff --git a/src/backend/base/langflow/components/prototypes/ConditionalRouter.py b/src/backend/base/langflow/components/prototypes/ConditionalRouter.py index 8305730bae9..07c8103f00b 100644 --- a/src/backend/base/langflow/components/prototypes/ConditionalRouter.py +++ b/src/backend/base/langflow/components/prototypes/ConditionalRouter.py @@ -66,21 +66,17 @@ def evaluate_condition(self, input_text: str, match_text: str, operator: str, ca def true_response(self) -> Message: result = self.evaluate_condition(self.input_text, self.match_text, self.operator, self.case_sensitive) if result: - self.stop("false_result") - response = self.message if self.message else self.input_text - self.status = response - return response + self.status = self.message + return self.message else: self.stop("true_result") - return Message() + return None def false_response(self) -> Message: result = self.evaluate_condition(self.input_text, self.match_text, self.operator, self.case_sensitive) if not result: - self.stop("true_result") - response = self.message if self.message else self.input_text - self.status = response - return response + self.status = self.message + return self.message else: self.stop("false_result") - return Message() + return None diff --git a/src/backend/base/langflow/components/prototypes/Pass.py b/src/backend/base/langflow/components/prototypes/Pass.py index 28e9ea524e4..a84164380fb 100644 --- a/src/backend/base/langflow/components/prototypes/Pass.py +++ b/src/backend/base/langflow/components/prototypes/Pass.py @@ -3,7 +3,6 @@ from langflow.schema.message import Message from langflow.template import Output - class PassMessageComponent(Component): display_name = "Pass" description = "Forwards the input message, unchanged." @@ -19,7 +18,7 @@ class PassMessageComponent(Component): name="ignored_message", display_name="Ignored Message", info="A second message to be ignored. Used as a workaround for continuity.", - advanced=True, + advanced=True ), ] diff --git a/tests/unit/test_helper_components.py b/tests/unit/test_helper_components.py index 9e9c4f63a92..dc07c583549 100644 --- a/tests/unit/test_helper_components.py +++ b/tests/unit/test_helper_components.py @@ -31,7 +31,7 @@ def test_uuid_generator_component(): # Arrange - uuid_generator_component = helpers.UUIDGeneratorComponent() + uuid_generator_component = helpers.IDGeneratorComponent() uuid_generator_component.code = open(helpers.IDGenerator.__file__, "r").read() frontend_node, _ = build_custom_component_template(uuid_generator_component) From 2389a82684578caf421a19758d65604c19994aaf Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 14:03:06 +0000 Subject: [PATCH 11/20] [autofix.ci] apply automated fixes --- src/backend/base/langflow/components/helpers/CreateList.py | 1 + src/backend/base/langflow/components/prototypes/Pass.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/components/helpers/CreateList.py b/src/backend/base/langflow/components/helpers/CreateList.py index 217e16dfe89..ea0130eccee 100644 --- a/src/backend/base/langflow/components/helpers/CreateList.py +++ b/src/backend/base/langflow/components/helpers/CreateList.py @@ -3,6 +3,7 @@ from langflow.schema import Data from langflow.template import Output + class CreateListComponent(Component): display_name = "Create List" description = "Creates a list of texts." diff --git a/src/backend/base/langflow/components/prototypes/Pass.py b/src/backend/base/langflow/components/prototypes/Pass.py index a84164380fb..28e9ea524e4 100644 --- a/src/backend/base/langflow/components/prototypes/Pass.py +++ b/src/backend/base/langflow/components/prototypes/Pass.py @@ -3,6 +3,7 @@ from langflow.schema.message import Message from langflow.template import Output + class PassMessageComponent(Component): display_name = "Pass" description = "Forwards the input message, unchanged." @@ -18,7 +19,7 @@ class PassMessageComponent(Component): name="ignored_message", display_name="Ignored Message", info="A second message to be ignored. Used as a workaround for continuity.", - advanced=True + advanced=True, ), ] From 0ca6f2a9cd44b4870594a1f760ddad34500368e9 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Fri, 28 Jun 2024 11:43:34 -0300 Subject: [PATCH 12/20] Changed native categories to use the keys of the style utils categories, which is updated --- .../CustomNodes/hooks/use-check-code-validity.tsx | 4 ++-- src/frontend/src/constants/constants.ts | 12 +----------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx index bcad57ecae5..49f6de757e2 100644 --- a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx @@ -1,6 +1,6 @@ import { useEffect } from "react"; -import { NATIVE_CATEGORIES } from "../../constants/constants"; import { NodeDataType } from "../../types/flow"; +import { nodeNames } from "../../utils/styleUtils"; const useCheckCodeValidity = ( data: NodeDataType, @@ -14,7 +14,7 @@ const useCheckCodeValidity = ( // first check if data.type in NATIVE_CATEGORIES // if not return if ( - !NATIVE_CATEGORIES.includes(types[data.type]) || + !Object.keys(nodeNames).includes(types[data.type]) || !data.node?.template?.code?.value ) return; diff --git a/src/frontend/src/constants/constants.ts b/src/frontend/src/constants/constants.ts index 8b5d4e17793..af5943d8cb9 100644 --- a/src/frontend/src/constants/constants.ts +++ b/src/frontend/src/constants/constants.ts @@ -1,6 +1,7 @@ // src/constants/constants.ts import { languageMap } from "../types/components"; +import { nodeNames } from "../utils/styleUtils"; /** * invalid characters for flow name @@ -724,17 +725,6 @@ export const PRIORITY_SIDEBAR_ORDER = [ "vectorsearch", "embeddings", ]; -export const NATIVE_CATEGORIES = [ - "inputs", - "outputs", - "prompts", - "data", - "prompt", - "models", - "helpers", - "experimental", - "agents", -]; export const AUTHORIZED_DUPLICATE_REQUESTS = [ "/health", From 92fa006125866a4cf2f795d449a3f8b1aab2eaac Mon Sep 17 00:00:00 2001 From: italojohnny Date: Mon, 1 Jul 2024 18:11:14 -0300 Subject: [PATCH 13/20] change component name --- src/backend/base/langflow/custom/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/base/langflow/custom/utils.py b/src/backend/base/langflow/custom/utils.py index 4dd96f1c2c3..5c5695d7bbc 100644 --- a/src/backend/base/langflow/custom/utils.py +++ b/src/backend/base/langflow/custom/utils.py @@ -428,11 +428,11 @@ def create_component_template(component): component_extractor = Component(code=component_code) - component_template, _ = build_custom_component_template(component_extractor) + component_template, component_instance = build_custom_component_template(component_extractor) if not component_template["output_types"] and component_output_types: component_template["output_types"] = component_output_types - return component_template + return component_template, component_instance def build_custom_components(components_paths: List[str]): @@ -543,8 +543,8 @@ def sanitize_field_config(field_config: Union[Dict, Input]): def build_component(component): """Build a single component.""" - component_name = determine_component_name(component) - component_template = create_component_template(component) + component_template, component_instance = create_component_template(component) + component_name = type(component_instance).__name__ return component_name, component_template From d6e978f55f7b2a7f42e6b7955a1b98cc473f356e Mon Sep 17 00:00:00 2001 From: italojohnny Date: Tue, 2 Jul 2024 17:16:56 -0300 Subject: [PATCH 14/20] chore: add the name attribute to the CustomComponent --- .../base/langflow/custom/custom_component/custom_component.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/base/langflow/custom/custom_component/custom_component.py b/src/backend/base/langflow/custom/custom_component/custom_component.py index ee819249607..24818dabe83 100644 --- a/src/backend/base/langflow/custom/custom_component/custom_component.py +++ b/src/backend/base/langflow/custom/custom_component/custom_component.py @@ -36,6 +36,7 @@ class CustomComponent(BaseComponent): Represents a custom component in Langflow. Attributes: + name (Optional[str]): This attribute helps the frontend apply styles to known components. display_name (Optional[str]): The display name of the custom component. description (Optional[str]): The description of the custom component. code (Optional[str]): The code of the custom component. @@ -49,6 +50,8 @@ class CustomComponent(BaseComponent): _tree (Optional[dict]): The code tree of the custom component. """ + name: Optional[str] = None + """The name of the component used to styles. Defaults to None.""" display_name: Optional[str] = None """The display name of the component. Defaults to None.""" description: Optional[str] = None From 6a277d7424fce7136e72700fb0fb677554d8c42e Mon Sep 17 00:00:00 2001 From: italojohnny Date: Tue, 2 Jul 2024 17:14:03 -0300 Subject: [PATCH 15/20] chore: assign the value of name to the components --- src/backend/base/langflow/components/agents/CSVAgent.py | 1 + src/backend/base/langflow/components/agents/JsonAgent.py | 1 + src/backend/base/langflow/components/agents/SQLAgent.py | 1 + src/backend/base/langflow/components/agents/ToolCallingAgent.py | 1 + src/backend/base/langflow/components/agents/VectorStoreAgent.py | 1 + .../base/langflow/components/agents/VectorStoreRouterAgent.py | 1 + src/backend/base/langflow/components/agents/XMLAgent.py | 1 + .../base/langflow/components/chains/ConversationChain.py | 1 + src/backend/base/langflow/components/chains/LLMChain.py | 1 + src/backend/base/langflow/components/chains/LLMCheckerChain.py | 1 + src/backend/base/langflow/components/chains/LLMMathChain.py | 1 + src/backend/base/langflow/components/chains/RetrievalQA.py | 1 + .../langflow/components/chains/RetrievalQAWithSourcesChain.py | 1 + src/backend/base/langflow/components/chains/SQLGenerator.py | 1 + src/backend/base/langflow/components/data/APIRequest.py | 1 + src/backend/base/langflow/components/data/Directory.py | 1 + src/backend/base/langflow/components/data/File.py | 1 + src/backend/base/langflow/components/data/URL.py | 1 + src/backend/base/langflow/components/data/Webhook.py | 1 + .../base/langflow/components/deactivated/AgentComponent.py | 1 + .../base/langflow/components/deactivated/CodeBlockExtractor.py | 1 + .../base/langflow/components/deactivated/DocumentsToData.py | 1 + src/backend/base/langflow/components/deactivated/Embed.py | 1 + .../base/langflow/components/deactivated/ExtractKeyFromData.py | 1 + src/backend/base/langflow/components/deactivated/ListFlows.py | 1 + src/backend/base/langflow/components/deactivated/MergeData.py | 1 + src/backend/base/langflow/components/deactivated/Message.py | 1 + .../langflow/components/deactivated/SelectivePassThrough.py | 1 + .../base/langflow/components/deactivated/ShouldRunNext.py | 1 + src/backend/base/langflow/components/deactivated/SplitText.py | 1 + .../base/langflow/components/deactivated/StoreMessage.py | 1 + src/backend/base/langflow/components/deactivated/SubFlow.py | 1 + .../langflow/components/embeddings/AmazonBedrockEmbeddings.py | 1 + .../base/langflow/components/embeddings/AstraVectorize.py | 1 + .../langflow/components/embeddings/AzureOpenAIEmbeddings.py | 1 + .../base/langflow/components/embeddings/CohereEmbeddings.py | 2 ++ .../langflow/components/embeddings/HuggingFaceEmbeddings.py | 1 + .../components/embeddings/HuggingFaceInferenceAPIEmbeddings.py | 1 + .../base/langflow/components/embeddings/MistalAIEmbeddings.py | 1 + .../base/langflow/components/embeddings/OllamaEmbeddings.py | 1 + .../base/langflow/components/embeddings/OpenAIEmbeddings.py | 2 ++ .../base/langflow/components/embeddings/VertexAIEmbeddings.py | 1 + src/backend/base/langflow/components/helpers/CombineText.py | 1 + src/backend/base/langflow/components/helpers/CreateList.py | 1 + src/backend/base/langflow/components/helpers/CustomComponent.py | 1 + src/backend/base/langflow/components/helpers/FilterData.py | 1 + src/backend/base/langflow/components/helpers/IDGenerator.py | 1 + src/backend/base/langflow/components/helpers/Memory.py | 1 + src/backend/base/langflow/components/helpers/MergeData.py | 1 + src/backend/base/langflow/components/helpers/ParseData.py | 1 + src/backend/base/langflow/components/helpers/SplitText.py | 1 + src/backend/base/langflow/components/helpers/StoreMessage.py | 1 + src/backend/base/langflow/components/inputs/ChatInput.py | 1 + src/backend/base/langflow/components/inputs/TextInput.py | 1 + .../components/langchain_utilities/BingSearchAPIWrapper.py | 1 + .../components/langchain_utilities/FirecrawlCrawlApi.py | 2 ++ .../components/langchain_utilities/FirecrawlScrapeApi.py | 2 ++ .../components/langchain_utilities/GoogleSearchAPIWrapper.py | 1 + .../components/langchain_utilities/GoogleSerperAPIWrapper.py | 1 + .../components/langchain_utilities/JSONDocumentBuilder.py | 2 ++ .../base/langflow/components/langchain_utilities/SQLDatabase.py | 1 + .../base/langflow/components/langchain_utilities/SearchApi.py | 2 ++ .../components/langchain_utilities/SearxSearchWrapper.py | 1 + .../langflow/components/langchain_utilities/SerpAPIWrapper.py | 1 + .../components/langchain_utilities/WikipediaAPIWrapper.py | 1 + .../components/langchain_utilities/WolframAlphaAPIWrapper.py | 1 + .../base/langflow/components/memories/AstraDBMessageReader.py | 1 + .../base/langflow/components/memories/AstraDBMessageWriter.py | 1 + .../base/langflow/components/memories/CassandraMessageReader.py | 1 + .../base/langflow/components/memories/CassandraMessageWriter.py | 1 + .../base/langflow/components/memories/ZepMessageReader.py | 1 + .../base/langflow/components/memories/ZepMessageWriter.py | 1 + .../base/langflow/components/models/AmazonBedrockModel.py | 1 + src/backend/base/langflow/components/models/AnthropicModel.py | 1 + src/backend/base/langflow/components/models/AzureOpenAIModel.py | 1 + .../base/langflow/components/models/BaiduQianfanChatModel.py | 1 + src/backend/base/langflow/components/models/CohereModel.py | 1 + .../base/langflow/components/models/GoogleGenerativeAIModel.py | 1 + src/backend/base/langflow/components/models/GroqModel.py | 1 + src/backend/base/langflow/components/models/HuggingFaceModel.py | 1 + src/backend/base/langflow/components/models/MistralModel.py | 1 + src/backend/base/langflow/components/models/OllamaModel.py | 1 + src/backend/base/langflow/components/models/OpenAIModel.py | 1 + src/backend/base/langflow/components/models/VertexAiModel.py | 1 + src/backend/base/langflow/components/outputs/ChatOutput.py | 1 + src/backend/base/langflow/components/outputs/TextOutput.py | 1 + src/backend/base/langflow/components/prompts/Prompt.py | 1 + .../base/langflow/components/prototypes/ConditionalRouter.py | 1 + src/backend/base/langflow/components/prototypes/CreateData.py | 1 + src/backend/base/langflow/components/prototypes/FlowTool.py | 1 + src/backend/base/langflow/components/prototypes/Listen.py | 1 + src/backend/base/langflow/components/prototypes/Notify.py | 1 + src/backend/base/langflow/components/prototypes/Pass.py | 1 + .../base/langflow/components/prototypes/PythonFunction.py | 1 + src/backend/base/langflow/components/prototypes/RunFlow.py | 1 + .../base/langflow/components/prototypes/RunnableExecutor.py | 1 + src/backend/base/langflow/components/prototypes/SQLExecutor.py | 1 + src/backend/base/langflow/components/prototypes/SubFlow.py | 1 + src/backend/base/langflow/components/prototypes/UpdateData.py | 1 + src/backend/base/langflow/components/retrievers/AmazonKendra.py | 1 + src/backend/base/langflow/components/retrievers/CohereRerank.py | 1 + .../base/langflow/components/retrievers/MetalRetriever.py | 1 + .../base/langflow/components/retrievers/MultiQueryRetriever.py | 1 + .../base/langflow/components/retrievers/SelfQueryRetriever.py | 1 + .../langflow/components/retrievers/VectaraSelfQueryRetriver.py | 1 + .../base/langflow/components/retrievers/VectorStoreRetriever.py | 1 + .../langflow/components/textsplitters/CharacterTextSplitter.py | 1 + .../components/textsplitters/LanguageRecursiveTextSplitter.py | 1 + .../components/textsplitters/RecursiveCharacterTextSplitter.py | 1 + src/backend/base/langflow/components/toolkits/JsonToolkit.py | 1 + src/backend/base/langflow/components/toolkits/Metaphor.py | 1 + src/backend/base/langflow/components/toolkits/OpenAPIToolkit.py | 1 + .../base/langflow/components/toolkits/VectorStoreInfo.py | 1 + .../langflow/components/toolkits/VectorStoreRouterToolkit.py | 1 + .../base/langflow/components/toolkits/VectorStoreToolkit.py | 1 + .../base/langflow/components/tools/PythonCodeStructuredTool.py | 1 + src/backend/base/langflow/components/tools/PythonREPLTool.py | 1 + src/backend/base/langflow/components/tools/RetrieverTool.py | 1 + src/backend/base/langflow/components/tools/SearchAPITool.py | 1 + src/backend/base/langflow/components/tools/SearchApi.py | 2 ++ src/backend/base/langflow/components/vectorstores/AstraDB.py | 1 + src/backend/base/langflow/components/vectorstores/Cassandra.py | 1 + src/backend/base/langflow/components/vectorstores/Chroma.py | 1 + src/backend/base/langflow/components/vectorstores/Couchbase.py | 1 + src/backend/base/langflow/components/vectorstores/FAISS.py | 1 + .../base/langflow/components/vectorstores/MongoDBAtlasVector.py | 1 + src/backend/base/langflow/components/vectorstores/Pinecone.py | 1 + src/backend/base/langflow/components/vectorstores/Qdrant.py | 1 + src/backend/base/langflow/components/vectorstores/Redis.py | 1 + .../langflow/components/vectorstores/SupabaseVectorStore.py | 1 + src/backend/base/langflow/components/vectorstores/Upstash.py | 1 + src/backend/base/langflow/components/vectorstores/Vectara.py | 1 + src/backend/base/langflow/components/vectorstores/Weaviate.py | 1 + src/backend/base/langflow/components/vectorstores/pgvector.py | 1 + 134 files changed, 141 insertions(+) diff --git a/src/backend/base/langflow/components/agents/CSVAgent.py b/src/backend/base/langflow/components/agents/CSVAgent.py index 21b285de283..53a3bbdf74e 100644 --- a/src/backend/base/langflow/components/agents/CSVAgent.py +++ b/src/backend/base/langflow/components/agents/CSVAgent.py @@ -8,6 +8,7 @@ class CSVAgentComponent(CustomComponent): display_name = "CSVAgent" description = "Construct a CSV agent from a CSV and tools." documentation = "https://python.langchain.com/docs/modules/agents/toolkits/csv" + name = 'CSVAgent' def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/JsonAgent.py b/src/backend/base/langflow/components/agents/JsonAgent.py index cadc684f804..b057ce0d577 100644 --- a/src/backend/base/langflow/components/agents/JsonAgent.py +++ b/src/backend/base/langflow/components/agents/JsonAgent.py @@ -9,6 +9,7 @@ class JsonAgentComponent(CustomComponent): display_name = "JsonAgent" description = "Construct a json agent from an LLM and tools." + name = 'JsonAgent' def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/SQLAgent.py b/src/backend/base/langflow/components/agents/SQLAgent.py index 4f2a8e89ec5..93f481c2bc4 100644 --- a/src/backend/base/langflow/components/agents/SQLAgent.py +++ b/src/backend/base/langflow/components/agents/SQLAgent.py @@ -12,6 +12,7 @@ class SQLAgentComponent(CustomComponent): display_name = "SQLAgent" description = "Construct an SQL agent from an LLM and tools." + name = 'SQLAgent' def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/ToolCallingAgent.py b/src/backend/base/langflow/components/agents/ToolCallingAgent.py index 407ab333dc0..d53c58985da 100644 --- a/src/backend/base/langflow/components/agents/ToolCallingAgent.py +++ b/src/backend/base/langflow/components/agents/ToolCallingAgent.py @@ -15,6 +15,7 @@ class ToolCallingAgentComponent(Component): description: str = "Agent that uses tools. Only models that are compatible with function calling are supported." icon = "LangChain" beta = True + name = 'ToolCallingAgent' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/agents/VectorStoreAgent.py b/src/backend/base/langflow/components/agents/VectorStoreAgent.py index 2bb324e50d6..4dbdf30d3f4 100644 --- a/src/backend/base/langflow/components/agents/VectorStoreAgent.py +++ b/src/backend/base/langflow/components/agents/VectorStoreAgent.py @@ -10,6 +10,7 @@ class VectorStoreAgentComponent(CustomComponent): display_name = "VectorStoreAgent" description = "Construct an agent from a Vector Store." + name = 'VectorStoreAgent' def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py b/src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py index a696a19c2c7..72d21944f16 100644 --- a/src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py +++ b/src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py @@ -10,6 +10,7 @@ class VectorStoreRouterAgentComponent(CustomComponent): display_name = "VectorStoreRouterAgent" description = "Construct an agent from a Vector Store Router." + name = 'VectorStoreRouterAgent' def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/XMLAgent.py b/src/backend/base/langflow/components/agents/XMLAgent.py index b0a9b18732b..1e1a763b038 100644 --- a/src/backend/base/langflow/components/agents/XMLAgent.py +++ b/src/backend/base/langflow/components/agents/XMLAgent.py @@ -11,6 +11,7 @@ class XMLAgentComponent(LCAgentComponent): display_name = "XMLAgent" description = "Construct an XML agent from an LLM and tools." + name = 'XMLAgent' def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/ConversationChain.py b/src/backend/base/langflow/components/chains/ConversationChain.py index a400d4993d2..855a8f73fdb 100644 --- a/src/backend/base/langflow/components/chains/ConversationChain.py +++ b/src/backend/base/langflow/components/chains/ConversationChain.py @@ -9,6 +9,7 @@ class ConversationChainComponent(CustomComponent): display_name = "ConversationChain" description = "Chain to have a conversation and load context from memory." + name = 'ConversationChain' def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/LLMChain.py b/src/backend/base/langflow/components/chains/LLMChain.py index b0f6913bf00..33396846baf 100644 --- a/src/backend/base/langflow/components/chains/LLMChain.py +++ b/src/backend/base/langflow/components/chains/LLMChain.py @@ -10,6 +10,7 @@ class LLMChainComponent(CustomComponent): display_name = "LLMChain" description = "Chain to run queries against LLMs" + name = 'LLMChain' def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/LLMCheckerChain.py b/src/backend/base/langflow/components/chains/LLMCheckerChain.py index 63bf5613c50..7e01f95ccf0 100644 --- a/src/backend/base/langflow/components/chains/LLMCheckerChain.py +++ b/src/backend/base/langflow/components/chains/LLMCheckerChain.py @@ -8,6 +8,7 @@ class LLMCheckerChainComponent(CustomComponent): display_name = "LLMCheckerChain" description = "" documentation = "https://python.langchain.com/docs/modules/chains/additional/llm_checker" + name = 'LLMCheckerChain' def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/LLMMathChain.py b/src/backend/base/langflow/components/chains/LLMMathChain.py index 795b8ee087d..d4e1e41b792 100644 --- a/src/backend/base/langflow/components/chains/LLMMathChain.py +++ b/src/backend/base/langflow/components/chains/LLMMathChain.py @@ -10,6 +10,7 @@ class LLMMathChainComponent(CustomComponent): display_name = "LLMMathChain" description = "Chain that interprets a prompt and executes python code to do math." documentation = "https://python.langchain.com/docs/modules/chains/additional/llm_math" + name = 'LLMMathChain' def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/RetrievalQA.py b/src/backend/base/langflow/components/chains/RetrievalQA.py index 295a03bfbed..303197c1dd0 100644 --- a/src/backend/base/langflow/components/chains/RetrievalQA.py +++ b/src/backend/base/langflow/components/chains/RetrievalQA.py @@ -11,6 +11,7 @@ class RetrievalQAComponent(CustomComponent): display_name = "Retrieval QA" description = "Chain for question-answering against an index." + name = 'RetrievalQA' def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/RetrievalQAWithSourcesChain.py b/src/backend/base/langflow/components/chains/RetrievalQAWithSourcesChain.py index fee16beaecf..2bf144c2b8e 100644 --- a/src/backend/base/langflow/components/chains/RetrievalQAWithSourcesChain.py +++ b/src/backend/base/langflow/components/chains/RetrievalQAWithSourcesChain.py @@ -10,6 +10,7 @@ class RetrievalQAWithSourcesChainComponent(CustomComponent): display_name = "RetrievalQAWithSourcesChain" description = "Question-answering with sources over an index." + name = 'RetrievalQAWithSourcesChain' def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/SQLGenerator.py b/src/backend/base/langflow/components/chains/SQLGenerator.py index dc085c46e05..5811d5a91e4 100644 --- a/src/backend/base/langflow/components/chains/SQLGenerator.py +++ b/src/backend/base/langflow/components/chains/SQLGenerator.py @@ -12,6 +12,7 @@ class SQLGeneratorComponent(CustomComponent): display_name = "Natural Language to SQL" description = "Generate SQL from natural language." + name = 'SQLGenerator' def build_config(self): return { diff --git a/src/backend/base/langflow/components/data/APIRequest.py b/src/backend/base/langflow/components/data/APIRequest.py index e92dc210ed8..0bef46b2fbb 100644 --- a/src/backend/base/langflow/components/data/APIRequest.py +++ b/src/backend/base/langflow/components/data/APIRequest.py @@ -22,6 +22,7 @@ class APIRequestComponent(Component): "**Note:** Check advanced options for more settings." ) icon = "Globe" + name = 'APIRequest' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/data/Directory.py b/src/backend/base/langflow/components/data/Directory.py index 267869ebb34..fb795b61c2f 100644 --- a/src/backend/base/langflow/components/data/Directory.py +++ b/src/backend/base/langflow/components/data/Directory.py @@ -11,6 +11,7 @@ class DirectoryComponent(Component): display_name = "Directory" description = "Recursively load files from a directory." icon = "folder" + name = 'Directory' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/data/File.py b/src/backend/base/langflow/components/data/File.py index a0a4385e62d..ec68e4511aa 100644 --- a/src/backend/base/langflow/components/data/File.py +++ b/src/backend/base/langflow/components/data/File.py @@ -10,6 +10,7 @@ class FileComponent(Component): display_name = "File" description = "A generic file loader." icon = "file-text" + name = 'File' inputs = [ FileInput( diff --git a/src/backend/base/langflow/components/data/URL.py b/src/backend/base/langflow/components/data/URL.py index c475cc63559..e0f136b6106 100644 --- a/src/backend/base/langflow/components/data/URL.py +++ b/src/backend/base/langflow/components/data/URL.py @@ -11,6 +11,7 @@ class URLComponent(Component): display_name = "URL" description = "Fetch content from one or more URLs." icon = "layout-template" + name = 'URL' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/data/Webhook.py b/src/backend/base/langflow/components/data/Webhook.py index 67e188f6e00..1efac4dd513 100644 --- a/src/backend/base/langflow/components/data/Webhook.py +++ b/src/backend/base/langflow/components/data/Webhook.py @@ -8,6 +8,7 @@ class WebhookComponent(Component): display_name = "Webhook Input" description = "Defines a webhook input for the flow." + name = 'Webhook' inputs = [ MultilineInput( diff --git a/src/backend/base/langflow/components/deactivated/AgentComponent.py b/src/backend/base/langflow/components/deactivated/AgentComponent.py index 117b9e676ea..e3cd865decd 100644 --- a/src/backend/base/langflow/components/deactivated/AgentComponent.py +++ b/src/backend/base/langflow/components/deactivated/AgentComponent.py @@ -23,6 +23,7 @@ class AgentComponent(LCAgentComponent): "memory", "input_value", ] + name = 'AgentComponent' def build_config(self): return { diff --git a/src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py b/src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py index 316ed8a95fc..fc7643cd363 100644 --- a/src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py +++ b/src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py @@ -7,6 +7,7 @@ class CodeBlockExtractor(Component): display_name = "Code Block Extractor" description = "Extracts code block from text." + name = 'CodeBlockExtractor' inputs = [Input(name="text", field_type=Text, description="Text to extract code blocks from.")] diff --git a/src/backend/base/langflow/components/deactivated/DocumentsToData.py b/src/backend/base/langflow/components/deactivated/DocumentsToData.py index 13111db591f..ed8713b52b5 100644 --- a/src/backend/base/langflow/components/deactivated/DocumentsToData.py +++ b/src/backend/base/langflow/components/deactivated/DocumentsToData.py @@ -10,6 +10,7 @@ class DocumentsToDataComponent(CustomComponent): display_name = "Documents ⇢ Data" description = "Convert LangChain Documents into Data." icon = "LangChain" + name = 'DocumentsToData' field_config = { "documents": {"display_name": "Documents"}, diff --git a/src/backend/base/langflow/components/deactivated/Embed.py b/src/backend/base/langflow/components/deactivated/Embed.py index a67c6c4cfa7..88d6d76e7cb 100644 --- a/src/backend/base/langflow/components/deactivated/Embed.py +++ b/src/backend/base/langflow/components/deactivated/Embed.py @@ -5,6 +5,7 @@ class EmbedComponent(CustomComponent): display_name = "Embed Texts" + name = 'Embed' def build_config(self): return {"texts": {"display_name": "Texts"}, "embbedings": {"display_name": "Embeddings"}} diff --git a/src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py b/src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py index a8ca7826262..2680fa9e267 100644 --- a/src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py +++ b/src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py @@ -6,6 +6,7 @@ class ExtractKeyFromDataComponent(CustomComponent): display_name = "Extract Key From Data" description = "Extracts a key from a data." beta: bool = True + name = 'ExtractKeyFromData' field_config = { "data": {"display_name": "Data"}, diff --git a/src/backend/base/langflow/components/deactivated/ListFlows.py b/src/backend/base/langflow/components/deactivated/ListFlows.py index 38fb2b967d9..9ee52bcacfd 100644 --- a/src/backend/base/langflow/components/deactivated/ListFlows.py +++ b/src/backend/base/langflow/components/deactivated/ListFlows.py @@ -9,6 +9,7 @@ class ListFlowsComponent(CustomComponent): description = "A component to list all available flows." icon = "ListFlows" beta: bool = True + name = 'ListFlows' def build_config(self): return {} diff --git a/src/backend/base/langflow/components/deactivated/MergeData.py b/src/backend/base/langflow/components/deactivated/MergeData.py index 51dfc4a6a71..50d72f30ae6 100644 --- a/src/backend/base/langflow/components/deactivated/MergeData.py +++ b/src/backend/base/langflow/components/deactivated/MergeData.py @@ -6,6 +6,7 @@ class MergeDataComponent(CustomComponent): display_name = "Merge Data" description = "Merges data." beta: bool = True + name = 'MergeData' field_config = { "data": {"display_name": "Data"}, diff --git a/src/backend/base/langflow/components/deactivated/Message.py b/src/backend/base/langflow/components/deactivated/Message.py index 9fdd8a0da52..b4fdc78396b 100644 --- a/src/backend/base/langflow/components/deactivated/Message.py +++ b/src/backend/base/langflow/components/deactivated/Message.py @@ -7,6 +7,7 @@ class MessageComponent(CustomComponent): display_name = "Message" description = "Creates a Message object given a Session ID." + name = 'Message' def build_config(self): return { diff --git a/src/backend/base/langflow/components/deactivated/SelectivePassThrough.py b/src/backend/base/langflow/components/deactivated/SelectivePassThrough.py index 605b54dfebd..466e535bd5c 100644 --- a/src/backend/base/langflow/components/deactivated/SelectivePassThrough.py +++ b/src/backend/base/langflow/components/deactivated/SelectivePassThrough.py @@ -7,6 +7,7 @@ class SelectivePassThroughComponent(Component): display_name = "Selective Pass Through" description = "Passes the specified value if a specified condition is met." icon = "filter" + name = 'SelectivePassThrough' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/deactivated/ShouldRunNext.py b/src/backend/base/langflow/components/deactivated/ShouldRunNext.py index 7ca5651a7c1..6b5ebd09490 100644 --- a/src/backend/base/langflow/components/deactivated/ShouldRunNext.py +++ b/src/backend/base/langflow/components/deactivated/ShouldRunNext.py @@ -8,6 +8,7 @@ class ShouldRunNextComponent(CustomComponent): display_name = "Should Run Next" description = "Determines if a vertex is runnable." + name = 'ShouldRunNext' def build(self, llm: LanguageModel, question: str, context: str, retries: int = 3) -> Text: template = "Given the following question and the context below, answer with a yes or no.\n\n{error_message}\n\nQuestion: {question}\n\nContext: {context}\n\nAnswer:" diff --git a/src/backend/base/langflow/components/deactivated/SplitText.py b/src/backend/base/langflow/components/deactivated/SplitText.py index f3529baf3ff..def81187519 100644 --- a/src/backend/base/langflow/components/deactivated/SplitText.py +++ b/src/backend/base/langflow/components/deactivated/SplitText.py @@ -12,6 +12,7 @@ class SplitTextComponent(Component): display_name: str = "Split Text" description: str = "Split text into chunks based on specified criteria." icon = "scissors-line-dashed" + name = 'SplitText' inputs = [ HandleInput( diff --git a/src/backend/base/langflow/components/deactivated/StoreMessage.py b/src/backend/base/langflow/components/deactivated/StoreMessage.py index 5d0abfbb977..32a5829c29d 100644 --- a/src/backend/base/langflow/components/deactivated/StoreMessage.py +++ b/src/backend/base/langflow/components/deactivated/StoreMessage.py @@ -6,6 +6,7 @@ class StoreMessageComponent(CustomComponent): display_name = "Store Message" description = "Stores a chat message." + name = 'StoreMessage' def build_config(self): return { diff --git a/src/backend/base/langflow/components/deactivated/SubFlow.py b/src/backend/base/langflow/components/deactivated/SubFlow.py index b0631ee9910..490f73cbc91 100644 --- a/src/backend/base/langflow/components/deactivated/SubFlow.py +++ b/src/backend/base/langflow/components/deactivated/SubFlow.py @@ -19,6 +19,7 @@ class SubFlowComponent(CustomComponent): ) beta: bool = True field_order = ["flow_name"] + name = 'SubFlow' def get_flow_names(self) -> List[str]: flow_datas = self.list_flows() diff --git a/src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py b/src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py index 9578bedc5f9..413f3a0a380 100644 --- a/src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py @@ -10,6 +10,7 @@ class AmazonBedrockEmbeddingsComponent(LCModelComponent): description: str = "Generate embeddings using Amazon Bedrock models." documentation = "https://python.langchain.com/docs/modules/data_connection/text_embedding/integrations/bedrock" icon = "Amazon" + name = 'AmazonBedrockEmbeddings' inputs = [ DropdownInput( diff --git a/src/backend/base/langflow/components/embeddings/AstraVectorize.py b/src/backend/base/langflow/components/embeddings/AstraVectorize.py index cd618f34659..09b9d9e8bef 100644 --- a/src/backend/base/langflow/components/embeddings/AstraVectorize.py +++ b/src/backend/base/langflow/components/embeddings/AstraVectorize.py @@ -9,6 +9,7 @@ class AstraVectorize(Component): description: str = "Configuration options for Astra Vectorize server-side embeddings." documentation: str = "https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html" icon = "AstraDB" + name = 'AstraVectorize' VECTORIZE_PROVIDERS_MAPPING = { "Azure OpenAI": ["azureOpenAI", ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"]], diff --git a/src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py index c838b328e15..484e6a6bf25 100644 --- a/src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py @@ -11,6 +11,7 @@ class AzureOpenAIEmbeddingsComponent(LCModelComponent): description: str = "Generate embeddings using Azure OpenAI models." documentation: str = "https://python.langchain.com/docs/integrations/text_embedding/azureopenai" icon = "Azure" + name = 'AzureOpenAIEmbeddings' API_VERSION_OPTIONS = [ "2022-12-01", diff --git a/src/backend/base/langflow/components/embeddings/CohereEmbeddings.py b/src/backend/base/langflow/components/embeddings/CohereEmbeddings.py index 80967becf95..2808aa1ca3d 100644 --- a/src/backend/base/langflow/components/embeddings/CohereEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/CohereEmbeddings.py @@ -9,6 +9,8 @@ class CohereEmbeddingsComponent(LCModelComponent): display_name = "Cohere Embeddings" description = "Generate embeddings using Cohere models." icon = "Cohere" + name = 'CohereEmbeddings' + inputs = [ SecretStrInput(name="cohere_api_key", display_name="Cohere API Key"), DropdownInput( diff --git a/src/backend/base/langflow/components/embeddings/HuggingFaceEmbeddings.py b/src/backend/base/langflow/components/embeddings/HuggingFaceEmbeddings.py index fda48b2a38e..919ec9f5b30 100644 --- a/src/backend/base/langflow/components/embeddings/HuggingFaceEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/HuggingFaceEmbeddings.py @@ -12,6 +12,7 @@ class HuggingFaceEmbeddingsComponent(LCModelComponent): "https://python.langchain.com/docs/modules/data_connection/text_embedding/integrations/sentence_transformers" ) icon = "HuggingFace" + name = 'HuggingFaceEmbeddings' inputs = [ MessageTextInput(name="cache_folder", display_name="Cache Folder", advanced=True), diff --git a/src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py b/src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py index 215ba944283..a841aa4bed7 100644 --- a/src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py @@ -11,6 +11,7 @@ class HuggingFaceInferenceAPIEmbeddingsComponent(LCModelComponent): description = "Generate embeddings using Hugging Face Inference API models." documentation = "https://github.com/huggingface/text-embeddings-inference" icon = "HuggingFace" + name = 'HuggingFaceInferenceAPIEmbeddings' inputs = [ SecretStrInput(name="api_key", display_name="API Key", advanced=True), diff --git a/src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py index 39e63c53ccf..0691463c4d0 100644 --- a/src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py @@ -10,6 +10,7 @@ class MistralAIEmbeddingsComponent(LCModelComponent): display_name = "MistralAI Embeddings" description = "Generate embeddings using MistralAI models." icon = "MistralAI" + name = 'MistalAIEmbeddings' inputs = [ DropdownInput( diff --git a/src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py b/src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py index 103ca3f1bde..389bc8eff89 100644 --- a/src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py @@ -10,6 +10,7 @@ class OllamaEmbeddingsComponent(LCModelComponent): description: str = "Generate embeddings using Ollama models." documentation = "https://python.langchain.com/docs/integrations/text_embedding/ollama" icon = "Ollama" + name = 'OllamaEmbeddings' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py index 7f56874be21..5acf5d46bb7 100644 --- a/src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py @@ -9,6 +9,8 @@ class OpenAIEmbeddingsComponent(LCEmbeddingsModel): display_name = "OpenAI Embeddings" description = "Generate embeddings using OpenAI models." icon = "OpenAI" + name = 'OpenAIEmbeddings' + inputs = [ DictInput( name="default_headers", diff --git a/src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py index 31c1ae52867..f820e835707 100644 --- a/src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py @@ -7,6 +7,7 @@ class VertexAIEmbeddingsComponent(LCModelComponent): display_name = "VertexAI Embeddings" description = "Generate embeddings using Google Cloud VertexAI models." icon = "VertexAI" + name = 'VertexAIEmbeddings' inputs = [ FileInput( diff --git a/src/backend/base/langflow/components/helpers/CombineText.py b/src/backend/base/langflow/components/helpers/CombineText.py index 6bb3246c072..2d01817e445 100644 --- a/src/backend/base/langflow/components/helpers/CombineText.py +++ b/src/backend/base/langflow/components/helpers/CombineText.py @@ -7,6 +7,7 @@ class CombineTextComponent(Component): display_name = "Combine Text" description = "Concatenate two text sources into a single text chunk using a specified delimiter." icon = "merge" + name = 'CombineText' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/helpers/CreateList.py b/src/backend/base/langflow/components/helpers/CreateList.py index ea0130eccee..b67da272d89 100644 --- a/src/backend/base/langflow/components/helpers/CreateList.py +++ b/src/backend/base/langflow/components/helpers/CreateList.py @@ -8,6 +8,7 @@ class CreateListComponent(Component): display_name = "Create List" description = "Creates a list of texts." icon = "list" + name = 'CreateList' inputs = [ StrInput( diff --git a/src/backend/base/langflow/components/helpers/CustomComponent.py b/src/backend/base/langflow/components/helpers/CustomComponent.py index 1ff54fe8055..b4f85cd8a94 100644 --- a/src/backend/base/langflow/components/helpers/CustomComponent.py +++ b/src/backend/base/langflow/components/helpers/CustomComponent.py @@ -9,6 +9,7 @@ class CustomComponent(Component): description = "Use as a template to create your own component." documentation: str = "http://docs.langflow.org/components/custom" icon = "custom_components" + name = 'CustomComponent' inputs = [ MessageTextInput(name="input_value", display_name="Input Value", value="Hello, World!"), diff --git a/src/backend/base/langflow/components/helpers/FilterData.py b/src/backend/base/langflow/components/helpers/FilterData.py index 94551854d7b..3e21c8d0cda 100644 --- a/src/backend/base/langflow/components/helpers/FilterData.py +++ b/src/backend/base/langflow/components/helpers/FilterData.py @@ -10,6 +10,7 @@ class FilterDataComponent(Component): description = "Filters a Data object based on a list of keys." icon = "filter" beta = True + name = 'FilterData' inputs = [ DataInput( diff --git a/src/backend/base/langflow/components/helpers/IDGenerator.py b/src/backend/base/langflow/components/helpers/IDGenerator.py index 7e63f870b43..9fbd8fbfbfe 100644 --- a/src/backend/base/langflow/components/helpers/IDGenerator.py +++ b/src/backend/base/langflow/components/helpers/IDGenerator.py @@ -8,6 +8,7 @@ class IDGeneratorComponent(CustomComponent): display_name = "ID Generator" description = "Generates a unique ID." + name = 'IDGenerator' def update_build_config( # type: ignore self, build_config: dotdict, field_value: Any, field_name: Optional[str] = None diff --git a/src/backend/base/langflow/components/helpers/Memory.py b/src/backend/base/langflow/components/helpers/Memory.py index 757526bbab4..74eff809789 100644 --- a/src/backend/base/langflow/components/helpers/Memory.py +++ b/src/backend/base/langflow/components/helpers/Memory.py @@ -10,6 +10,7 @@ class MemoryComponent(Component): display_name = "Chat Memory" description = "Retrieves stored chat messages." icon = "message-square-more" + name = 'Memory' inputs = [ DropdownInput( diff --git a/src/backend/base/langflow/components/helpers/MergeData.py b/src/backend/base/langflow/components/helpers/MergeData.py index 5d434d3cf6f..b83e273c7ad 100644 --- a/src/backend/base/langflow/components/helpers/MergeData.py +++ b/src/backend/base/langflow/components/helpers/MergeData.py @@ -6,6 +6,7 @@ class MergeDataComponent(CustomComponent): display_name = "Merge Data" description = "Combines multiple data sources into a single unified Data object." beta: bool = True + name = 'MergeData' field_config = { "data": {"display_name": "Data"}, diff --git a/src/backend/base/langflow/components/helpers/ParseData.py b/src/backend/base/langflow/components/helpers/ParseData.py index 32482bcdb56..04c59bb4ec0 100644 --- a/src/backend/base/langflow/components/helpers/ParseData.py +++ b/src/backend/base/langflow/components/helpers/ParseData.py @@ -8,6 +8,7 @@ class ParseDataComponent(Component): display_name = "Parse Data" description = "Convert Data into plain text following a specified template." icon = "braces" + name = 'ParseData' inputs = [ DataInput(name="data", display_name="Data", info="The data to convert to text."), diff --git a/src/backend/base/langflow/components/helpers/SplitText.py b/src/backend/base/langflow/components/helpers/SplitText.py index f3529baf3ff..def81187519 100644 --- a/src/backend/base/langflow/components/helpers/SplitText.py +++ b/src/backend/base/langflow/components/helpers/SplitText.py @@ -12,6 +12,7 @@ class SplitTextComponent(Component): display_name: str = "Split Text" description: str = "Split text into chunks based on specified criteria." icon = "scissors-line-dashed" + name = 'SplitText' inputs = [ HandleInput( diff --git a/src/backend/base/langflow/components/helpers/StoreMessage.py b/src/backend/base/langflow/components/helpers/StoreMessage.py index ce1abbe29e9..6229ee6604e 100644 --- a/src/backend/base/langflow/components/helpers/StoreMessage.py +++ b/src/backend/base/langflow/components/helpers/StoreMessage.py @@ -9,6 +9,7 @@ class StoreMessageComponent(Component): display_name = "Store Message" description = "Stores a chat message or text." icon = "save" + name = 'StoreMessage' inputs = [ MessageInput(name="message", display_name="Message", info="The chat message to be stored.", required=True), diff --git a/src/backend/base/langflow/components/inputs/ChatInput.py b/src/backend/base/langflow/components/inputs/ChatInput.py index 4d42dece4f2..9eeaa1f6379 100644 --- a/src/backend/base/langflow/components/inputs/ChatInput.py +++ b/src/backend/base/langflow/components/inputs/ChatInput.py @@ -8,6 +8,7 @@ class ChatInput(ChatComponent): display_name = "Chat Input" description = "Get chat inputs from the Playground." icon = "ChatInput" + name = 'ChatInput' inputs = [ MultilineInput( diff --git a/src/backend/base/langflow/components/inputs/TextInput.py b/src/backend/base/langflow/components/inputs/TextInput.py index f05398369ed..505b43fb7bf 100644 --- a/src/backend/base/langflow/components/inputs/TextInput.py +++ b/src/backend/base/langflow/components/inputs/TextInput.py @@ -7,6 +7,7 @@ class TextInputComponent(TextComponent): display_name = "Text Input" description = "Get text inputs from the Playground." icon = "type" + name = 'TextInput' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/langchain_utilities/BingSearchAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/BingSearchAPIWrapper.py index 848d1098587..d84f0cf92c0 100644 --- a/src/backend/base/langflow/components/langchain_utilities/BingSearchAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/BingSearchAPIWrapper.py @@ -9,6 +9,7 @@ class BingSearchAPIWrapperComponent(CustomComponent): display_name = "BingSearchAPIWrapper" description = "Wrapper for Bing Search API." + name = 'BingSearchAPIWrapper' def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py b/src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py index 7b48677b0fa..1889a991687 100644 --- a/src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py +++ b/src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py @@ -8,6 +8,8 @@ class FirecrawlCrawlApi(CustomComponent): display_name: str = "FirecrawlCrawlApi" description: str = "Firecrawl Crawl API." + name = 'FirecrawlCrawlApi' + output_types: list[str] = ["Document"] documentation: str = "https://docs.firecrawl.dev/api-reference/endpoint/crawl" field_config = { diff --git a/src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py b/src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py index ae5fbe784a2..6d5a11ba4b1 100644 --- a/src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py +++ b/src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py @@ -7,6 +7,8 @@ class FirecrawlScrapeApi(CustomComponent): display_name: str = "FirecrawlScrapeApi" description: str = "Firecrawl Scrape API." + name = 'FirecrawlScrapeApi' + output_types: list[str] = ["Document"] documentation: str = "https://docs.firecrawl.dev/api-reference/endpoint/scrape" field_config = { diff --git a/src/backend/base/langflow/components/langchain_utilities/GoogleSearchAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/GoogleSearchAPIWrapper.py index 5e45219ccde..3d698f89609 100644 --- a/src/backend/base/langflow/components/langchain_utilities/GoogleSearchAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/GoogleSearchAPIWrapper.py @@ -8,6 +8,7 @@ class GoogleSearchAPIWrapperComponent(CustomComponent): display_name = "GoogleSearchAPIWrapper" description = "Wrapper for Google Search API." + name = 'GoogleSearchAPIWrapper' def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/GoogleSerperAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/GoogleSerperAPIWrapper.py index 2b9a494582c..9a302e01e8c 100644 --- a/src/backend/base/langflow/components/langchain_utilities/GoogleSerperAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/GoogleSerperAPIWrapper.py @@ -10,6 +10,7 @@ class GoogleSerperAPIWrapperComponent(CustomComponent): display_name = "GoogleSerperAPIWrapper" description = "Wrapper around the Serper.dev Google Search API." + name = 'GoogleSerperAPIWrapper' def build_config(self) -> Dict[str, Dict]: return { diff --git a/src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py b/src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py index c0300cff056..20a476e41de 100644 --- a/src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py +++ b/src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py @@ -20,6 +20,8 @@ class JSONDocumentBuilder(CustomComponent): display_name: str = "JSON Document Builder" description: str = "Build a Document containing a JSON object using a key and another Document page content." + name = 'JSONDocumentBuilder' + output_types: list[str] = ["Document"] documentation: str = "https://docs.langflow.org/components/utilities#json-document-builder" diff --git a/src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py b/src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py index 93c46087dfd..9bd9fb7a6a7 100644 --- a/src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py +++ b/src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py @@ -6,6 +6,7 @@ class SQLDatabaseComponent(CustomComponent): display_name = "SQLDatabase" description = "SQL Database" + name = 'SQLDatabase' def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/SearchApi.py b/src/backend/base/langflow/components/langchain_utilities/SearchApi.py index 5dfd5525019..619e30c2b17 100644 --- a/src/backend/base/langflow/components/langchain_utilities/SearchApi.py +++ b/src/backend/base/langflow/components/langchain_utilities/SearchApi.py @@ -10,6 +10,8 @@ class SearchApi(CustomComponent): display_name: str = "SearchApi" description: str = "Real-time search engine results API." + name = 'SearchApi' + output_types: list[str] = ["Document"] documentation: str = "https://www.searchapi.io/docs/google" field_config = { diff --git a/src/backend/base/langflow/components/langchain_utilities/SearxSearchWrapper.py b/src/backend/base/langflow/components/langchain_utilities/SearxSearchWrapper.py index 4fe0706f88a..97367f7bc57 100644 --- a/src/backend/base/langflow/components/langchain_utilities/SearxSearchWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/SearxSearchWrapper.py @@ -8,6 +8,7 @@ class SearxSearchWrapperComponent(CustomComponent): display_name = "SearxSearchWrapper" description = "Wrapper for Searx API." + name = 'SearxSearchWrapper' def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/SerpAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/SerpAPIWrapper.py index d8aa404cb90..be113da7ae6 100644 --- a/src/backend/base/langflow/components/langchain_utilities/SerpAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/SerpAPIWrapper.py @@ -8,6 +8,7 @@ class SerpAPIWrapperComponent(CustomComponent): display_name = "SerpAPIWrapper" description = "Wrapper around SerpAPI" + name = 'SerpAPIWrapper' def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/WikipediaAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/WikipediaAPIWrapper.py index 1c10dd4bdce..0e510b33a0d 100644 --- a/src/backend/base/langflow/components/langchain_utilities/WikipediaAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/WikipediaAPIWrapper.py @@ -12,6 +12,7 @@ class WikipediaAPIWrapperComponent(CustomComponent): display_name = "WikipediaAPIWrapper" description = "Wrapper around WikipediaAPI." + name = 'WikipediaAPIWrapper' def build_config(self): return {} diff --git a/src/backend/base/langflow/components/langchain_utilities/WolframAlphaAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/WolframAlphaAPIWrapper.py index 42be1f1995c..bf007937704 100644 --- a/src/backend/base/langflow/components/langchain_utilities/WolframAlphaAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/WolframAlphaAPIWrapper.py @@ -11,6 +11,7 @@ class WolframAlphaAPIWrapperComponent(CustomComponent): display_name = "WolframAlphaAPIWrapper" description = "Wrapper for Wolfram Alpha." + name = 'WolframAlphaAPIWrapper' def build_config(self): return {"appid": {"display_name": "App ID", "type": "str", "password": True}} diff --git a/src/backend/base/langflow/components/memories/AstraDBMessageReader.py b/src/backend/base/langflow/components/memories/AstraDBMessageReader.py index dfb8ef86a27..060e17af962 100644 --- a/src/backend/base/langflow/components/memories/AstraDBMessageReader.py +++ b/src/backend/base/langflow/components/memories/AstraDBMessageReader.py @@ -7,6 +7,7 @@ class AstraDBMessageReaderComponent(BaseMemoryComponent): display_name = "Astra DB Message Reader" description = "Retrieves stored chat messages from Astra DB." + name = 'AstraDBMessageReader' def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/AstraDBMessageWriter.py b/src/backend/base/langflow/components/memories/AstraDBMessageWriter.py index c929aca9e55..75638707418 100644 --- a/src/backend/base/langflow/components/memories/AstraDBMessageWriter.py +++ b/src/backend/base/langflow/components/memories/AstraDBMessageWriter.py @@ -9,6 +9,7 @@ class AstraDBMessageWriterComponent(BaseMemoryComponent): display_name = "Astra DB Message Writer" description = "Writes a message to Astra DB." + name = 'AstraDBMessageWriter' def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/CassandraMessageReader.py b/src/backend/base/langflow/components/memories/CassandraMessageReader.py index a8bd1c36584..0c87ed313fc 100644 --- a/src/backend/base/langflow/components/memories/CassandraMessageReader.py +++ b/src/backend/base/langflow/components/memories/CassandraMessageReader.py @@ -9,6 +9,7 @@ class CassandraMessageReaderComponent(BaseMemoryComponent): display_name = "Cassandra Message Reader" description = "Retrieves stored chat messages from a Cassandra table on Astra DB." + name = 'CassandraMessageReader' def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/CassandraMessageWriter.py b/src/backend/base/langflow/components/memories/CassandraMessageWriter.py index 15da272749a..89a9f9966a8 100644 --- a/src/backend/base/langflow/components/memories/CassandraMessageWriter.py +++ b/src/backend/base/langflow/components/memories/CassandraMessageWriter.py @@ -10,6 +10,7 @@ class CassandraMessageWriterComponent(BaseMemoryComponent): display_name = "Cassandra Message Writer" description = "Writes a message to a Cassandra table on Astra DB." + name = 'CassandraMessageWriter' def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/ZepMessageReader.py b/src/backend/base/langflow/components/memories/ZepMessageReader.py index 89a16587bce..43f6ca45d07 100644 --- a/src/backend/base/langflow/components/memories/ZepMessageReader.py +++ b/src/backend/base/langflow/components/memories/ZepMessageReader.py @@ -10,6 +10,7 @@ class ZepMessageReaderComponent(BaseMemoryComponent): display_name = "Zep Message Reader" description = "Retrieves stored chat messages from Zep." + name = 'ZepMessageReader' def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/ZepMessageWriter.py b/src/backend/base/langflow/components/memories/ZepMessageWriter.py index cc343488e9e..25e89b6b538 100644 --- a/src/backend/base/langflow/components/memories/ZepMessageWriter.py +++ b/src/backend/base/langflow/components/memories/ZepMessageWriter.py @@ -11,6 +11,7 @@ class ZepMessageWriterComponent(BaseMemoryComponent): display_name = "Zep Message Writer" description = "Writes a message to Zep." + name = 'ZepMessageWriter' def build_config(self): return { diff --git a/src/backend/base/langflow/components/models/AmazonBedrockModel.py b/src/backend/base/langflow/components/models/AmazonBedrockModel.py index 21c778a891b..07125e79bd7 100644 --- a/src/backend/base/langflow/components/models/AmazonBedrockModel.py +++ b/src/backend/base/langflow/components/models/AmazonBedrockModel.py @@ -10,6 +10,7 @@ class AmazonBedrockComponent(LCModelComponent): display_name: str = "Amazon Bedrock" description: str = "Generate text using Amazon Bedrock LLMs." icon = "Amazon" + name = 'AmazonBedrockModel' inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/AnthropicModel.py b/src/backend/base/langflow/components/models/AnthropicModel.py index 39a78c3840f..56cb148b190 100644 --- a/src/backend/base/langflow/components/models/AnthropicModel.py +++ b/src/backend/base/langflow/components/models/AnthropicModel.py @@ -11,6 +11,7 @@ class AnthropicModelComponent(LCModelComponent): display_name = "Anthropic" description = "Generate text using Anthropic Chat&Completion LLMs with prefill support." icon = "Anthropic" + name = 'AnthropicModel' inputs = [ MessageTextInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/AzureOpenAIModel.py b/src/backend/base/langflow/components/models/AzureOpenAIModel.py index 23528ed29a4..972ce40e08f 100644 --- a/src/backend/base/langflow/components/models/AzureOpenAIModel.py +++ b/src/backend/base/langflow/components/models/AzureOpenAIModel.py @@ -13,6 +13,7 @@ class AzureChatOpenAIComponent(LCModelComponent): documentation: str = "https://python.langchain.com/docs/integrations/llms/azure_openai" beta = False icon = "Azure" + name = 'AzureOpenAIModel' AZURE_OPENAI_MODELS = [ "gpt-35-turbo", diff --git a/src/backend/base/langflow/components/models/BaiduQianfanChatModel.py b/src/backend/base/langflow/components/models/BaiduQianfanChatModel.py index c8c9d38a957..d5af35e1656 100644 --- a/src/backend/base/langflow/components/models/BaiduQianfanChatModel.py +++ b/src/backend/base/langflow/components/models/BaiduQianfanChatModel.py @@ -12,6 +12,7 @@ class QianfanChatEndpointComponent(LCModelComponent): description: str = "Generate text using Baidu Qianfan LLMs." documentation: str = "https://python.langchain.com/docs/integrations/chat/baidu_qianfan_endpoint" icon = "BaiduQianfan" + name = 'BaiduQianfanChatModel' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/models/CohereModel.py b/src/backend/base/langflow/components/models/CohereModel.py index 101b72397c7..2894557a51b 100644 --- a/src/backend/base/langflow/components/models/CohereModel.py +++ b/src/backend/base/langflow/components/models/CohereModel.py @@ -13,6 +13,7 @@ class CohereComponent(LCModelComponent): description = "Generate text using Cohere LLMs." documentation = "https://python.langchain.com/docs/modules/model_io/models/llms/integrations/cohere" icon = "Cohere" + name = 'CohereModel' inputs = [ SecretStrInput( diff --git a/src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py b/src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py index 7bcaf0b0760..e95c8db77a9 100644 --- a/src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py +++ b/src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py @@ -10,6 +10,7 @@ class GoogleGenerativeAIComponent(LCModelComponent): display_name = "Google Generative AI" description = "Generate text using Google Generative AI." icon = "GoogleGenerativeAI" + name = 'GoogleGenerativeAIModel' inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/GroqModel.py b/src/backend/base/langflow/components/models/GroqModel.py index fe1f4f4b150..437f02105ea 100644 --- a/src/backend/base/langflow/components/models/GroqModel.py +++ b/src/backend/base/langflow/components/models/GroqModel.py @@ -12,6 +12,7 @@ class GroqModel(LCModelComponent): display_name: str = "Groq" description: str = "Generate text using Groq." icon = "Groq" + name = 'GroqModel' inputs = [ SecretStrInput( diff --git a/src/backend/base/langflow/components/models/HuggingFaceModel.py b/src/backend/base/langflow/components/models/HuggingFaceModel.py index 28c341114b6..b280c932b98 100644 --- a/src/backend/base/langflow/components/models/HuggingFaceModel.py +++ b/src/backend/base/langflow/components/models/HuggingFaceModel.py @@ -11,6 +11,7 @@ class HuggingFaceEndpointsComponent(LCModelComponent): display_name: str = "Hugging Face API" description: str = "Generate text using Hugging Face Inference APIs." icon = "HuggingFace" + name = 'HuggingFaceModel' inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/MistralModel.py b/src/backend/base/langflow/components/models/MistralModel.py index 1604ecb5bb0..a389e2759e8 100644 --- a/src/backend/base/langflow/components/models/MistralModel.py +++ b/src/backend/base/langflow/components/models/MistralModel.py @@ -11,6 +11,7 @@ class MistralAIModelComponent(LCModelComponent): display_name = "MistralAI" description = "Generates text using MistralAI LLMs." icon = "MistralAI" + name = 'MistralModel' inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/OllamaModel.py b/src/backend/base/langflow/components/models/OllamaModel.py index 1c0e5fd2ca2..33c2e70ec7d 100644 --- a/src/backend/base/langflow/components/models/OllamaModel.py +++ b/src/backend/base/langflow/components/models/OllamaModel.py @@ -13,6 +13,7 @@ class ChatOllamaComponent(LCModelComponent): display_name = "Ollama" description = "Generate text using Ollama Local LLMs." icon = "Ollama" + name = 'OllamaModel' def update_build_config(self, build_config: dict, field_value: Any, field_name: str | None = None): if field_name == "mirostat": diff --git a/src/backend/base/langflow/components/models/OpenAIModel.py b/src/backend/base/langflow/components/models/OpenAIModel.py index 0cdc8fdf9e2..7154101c969 100644 --- a/src/backend/base/langflow/components/models/OpenAIModel.py +++ b/src/backend/base/langflow/components/models/OpenAIModel.py @@ -24,6 +24,7 @@ class OpenAIModelComponent(LCModelComponent): display_name = "OpenAI" description = "Generates text using OpenAI LLMs." icon = "OpenAI" + name = 'OpenAIModel' inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/VertexAiModel.py b/src/backend/base/langflow/components/models/VertexAiModel.py index 0415a797162..344be49f627 100644 --- a/src/backend/base/langflow/components/models/VertexAiModel.py +++ b/src/backend/base/langflow/components/models/VertexAiModel.py @@ -10,6 +10,7 @@ class ChatVertexAIComponent(LCModelComponent): display_name = "Vertex AI" description = "Generate text using Vertex AI LLMs." icon = "VertexAI" + name = 'VertexAiModel' inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/outputs/ChatOutput.py b/src/backend/base/langflow/components/outputs/ChatOutput.py index 534ccf2f035..3f4710ae6f6 100644 --- a/src/backend/base/langflow/components/outputs/ChatOutput.py +++ b/src/backend/base/langflow/components/outputs/ChatOutput.py @@ -7,6 +7,7 @@ class ChatOutput(ChatComponent): display_name = "Chat Output" description = "Display a chat message in the Playground." icon = "ChatOutput" + name = 'ChatOutput' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/outputs/TextOutput.py b/src/backend/base/langflow/components/outputs/TextOutput.py index 4bd03e2e027..80790161822 100644 --- a/src/backend/base/langflow/components/outputs/TextOutput.py +++ b/src/backend/base/langflow/components/outputs/TextOutput.py @@ -7,6 +7,7 @@ class TextOutputComponent(TextComponent): display_name = "Text Output" description = "Display a text output in the Playground." icon = "type" + name = 'TextOutput' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/prompts/Prompt.py b/src/backend/base/langflow/components/prompts/Prompt.py index 8f8d3d6a269..4fa1687faa3 100644 --- a/src/backend/base/langflow/components/prompts/Prompt.py +++ b/src/backend/base/langflow/components/prompts/Prompt.py @@ -10,6 +10,7 @@ class PromptComponent(Component): description: str = "Create a prompt template with dynamic variables." icon = "prompts" trace_type = "prompt" + name = 'Prompt' inputs = [ PromptInput(name="template", display_name="Template"), diff --git a/src/backend/base/langflow/components/prototypes/ConditionalRouter.py b/src/backend/base/langflow/components/prototypes/ConditionalRouter.py index 6d24bfa5e1e..c2ddce4787d 100644 --- a/src/backend/base/langflow/components/prototypes/ConditionalRouter.py +++ b/src/backend/base/langflow/components/prototypes/ConditionalRouter.py @@ -7,6 +7,7 @@ class ConditionalRouterComponent(Component): display_name = "Conditional Router" description = "Routes an input message to a corresponding output based on text comparison." icon = "equal" + name = 'ConditionalRouter' inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/prototypes/CreateData.py b/src/backend/base/langflow/components/prototypes/CreateData.py index c39199f4cf4..d7e3a1d0ddd 100644 --- a/src/backend/base/langflow/components/prototypes/CreateData.py +++ b/src/backend/base/langflow/components/prototypes/CreateData.py @@ -10,6 +10,7 @@ class CreateDataComponent(CustomComponent): display_name = "Create Data" description = "Dynamically create a Data with a specified number of fields." + name = 'CreateData' field_order = ["number_of_fields", "text_key"] def update_build_config(self, build_config: dotdict, field_value: Any, field_name: str | None = None): diff --git a/src/backend/base/langflow/components/prototypes/FlowTool.py b/src/backend/base/langflow/components/prototypes/FlowTool.py index a1c9bc4eb6d..39dae746122 100644 --- a/src/backend/base/langflow/components/prototypes/FlowTool.py +++ b/src/backend/base/langflow/components/prototypes/FlowTool.py @@ -16,6 +16,7 @@ class FlowToolComponent(CustomComponent): description = "Construct a Tool from a function that runs the loaded Flow." field_order = ["flow_name", "name", "description", "return_direct"] trace_type = "tool" + name = 'FlowTool' beta = True def get_flow_names(self) -> List[str]: diff --git a/src/backend/base/langflow/components/prototypes/Listen.py b/src/backend/base/langflow/components/prototypes/Listen.py index 03a81d130ee..d08e527421b 100644 --- a/src/backend/base/langflow/components/prototypes/Listen.py +++ b/src/backend/base/langflow/components/prototypes/Listen.py @@ -5,6 +5,7 @@ class ListenComponent(CustomComponent): display_name = "Listen" description = "A component to listen for a notification." + name = 'Listen' beta: bool = True def build_config(self): diff --git a/src/backend/base/langflow/components/prototypes/Notify.py b/src/backend/base/langflow/components/prototypes/Notify.py index e4bd0b090b1..89c1f02af6a 100644 --- a/src/backend/base/langflow/components/prototypes/Notify.py +++ b/src/backend/base/langflow/components/prototypes/Notify.py @@ -8,6 +8,7 @@ class NotifyComponent(CustomComponent): display_name = "Notify" description = "A component to generate a notification to Get Notified component." icon = "Notify" + name = 'Notify' beta: bool = True def build_config(self): diff --git a/src/backend/base/langflow/components/prototypes/Pass.py b/src/backend/base/langflow/components/prototypes/Pass.py index 28e9ea524e4..98fe9dd2971 100644 --- a/src/backend/base/langflow/components/prototypes/Pass.py +++ b/src/backend/base/langflow/components/prototypes/Pass.py @@ -7,6 +7,7 @@ class PassMessageComponent(Component): display_name = "Pass" description = "Forwards the input message, unchanged." + name = 'Pass' icon = "arrow-right" inputs = [ diff --git a/src/backend/base/langflow/components/prototypes/PythonFunction.py b/src/backend/base/langflow/components/prototypes/PythonFunction.py index f0f2386366c..21d6f125d3c 100644 --- a/src/backend/base/langflow/components/prototypes/PythonFunction.py +++ b/src/backend/base/langflow/components/prototypes/PythonFunction.py @@ -9,6 +9,7 @@ class PythonFunctionComponent(CustomComponent): display_name = "Python Function" description = "Define a Python function." icon = "Python" + name = 'PythonFunction' beta = True def build_config(self): diff --git a/src/backend/base/langflow/components/prototypes/RunFlow.py b/src/backend/base/langflow/components/prototypes/RunFlow.py index d5b2362fb80..3c2c0d02d9b 100644 --- a/src/backend/base/langflow/components/prototypes/RunFlow.py +++ b/src/backend/base/langflow/components/prototypes/RunFlow.py @@ -10,6 +10,7 @@ class RunFlowComponent(CustomComponent): display_name = "Run Flow" description = "A component to run a flow." + name = 'RunFlow' beta: bool = True def get_flow_names(self) -> List[str]: diff --git a/src/backend/base/langflow/components/prototypes/RunnableExecutor.py b/src/backend/base/langflow/components/prototypes/RunnableExecutor.py index 82260b76b8a..a8920cfab44 100644 --- a/src/backend/base/langflow/components/prototypes/RunnableExecutor.py +++ b/src/backend/base/langflow/components/prototypes/RunnableExecutor.py @@ -7,6 +7,7 @@ class RunnableExecComponent(CustomComponent): description = "Execute a runnable. It will try to guess the input and output keys." display_name = "Runnable Executor" + name = 'RunnableExecutor' beta: bool = True field_order = [ "input_key", diff --git a/src/backend/base/langflow/components/prototypes/SQLExecutor.py b/src/backend/base/langflow/components/prototypes/SQLExecutor.py index 6ef92ba6dcf..472ffecbbba 100644 --- a/src/backend/base/langflow/components/prototypes/SQLExecutor.py +++ b/src/backend/base/langflow/components/prototypes/SQLExecutor.py @@ -8,6 +8,7 @@ class SQLExecutorComponent(CustomComponent): display_name = "SQL Executor" description = "Execute SQL query." + name = 'SQLExecutor' beta: bool = True def build_config(self): diff --git a/src/backend/base/langflow/components/prototypes/SubFlow.py b/src/backend/base/langflow/components/prototypes/SubFlow.py index b0631ee9910..1ec4c36f2d5 100644 --- a/src/backend/base/langflow/components/prototypes/SubFlow.py +++ b/src/backend/base/langflow/components/prototypes/SubFlow.py @@ -17,6 +17,7 @@ class SubFlowComponent(CustomComponent): description = ( "Dynamically Generates a Component from a Flow. The output is a list of data with keys 'result' and 'message'." ) + name = 'SubFlow' beta: bool = True field_order = ["flow_name"] diff --git a/src/backend/base/langflow/components/prototypes/UpdateData.py b/src/backend/base/langflow/components/prototypes/UpdateData.py index eebd35ec8b4..625fd9ae20a 100644 --- a/src/backend/base/langflow/components/prototypes/UpdateData.py +++ b/src/backend/base/langflow/components/prototypes/UpdateData.py @@ -5,6 +5,7 @@ class UpdateDataComponent(CustomComponent): display_name = "Update Data" description = "Update Data with text-based key/value pairs, similar to updating a Python dictionary." + name = 'UpdateData' def build_config(self): return { diff --git a/src/backend/base/langflow/components/retrievers/AmazonKendra.py b/src/backend/base/langflow/components/retrievers/AmazonKendra.py index 90c70a7bc01..916ec997af8 100644 --- a/src/backend/base/langflow/components/retrievers/AmazonKendra.py +++ b/src/backend/base/langflow/components/retrievers/AmazonKendra.py @@ -9,6 +9,7 @@ class AmazonKendraRetrieverComponent(CustomComponent): display_name: str = "Amazon Kendra Retriever" description: str = "Retriever that uses the Amazon Kendra API." + name = 'AmazonKendra' icon = "Amazon" def build_config(self): diff --git a/src/backend/base/langflow/components/retrievers/CohereRerank.py b/src/backend/base/langflow/components/retrievers/CohereRerank.py index 7eedc1ee068..741ab947509 100644 --- a/src/backend/base/langflow/components/retrievers/CohereRerank.py +++ b/src/backend/base/langflow/components/retrievers/CohereRerank.py @@ -12,6 +12,7 @@ class CohereRerankComponent(LCVectorStoreComponent): display_name = "Cohere Rerank" description = "Rerank documents using the Cohere API and a retriever." + name = 'CohereRerank' icon = "Cohere" inputs = [ diff --git a/src/backend/base/langflow/components/retrievers/MetalRetriever.py b/src/backend/base/langflow/components/retrievers/MetalRetriever.py index f3af0ebb056..65fd6ea9dd7 100644 --- a/src/backend/base/langflow/components/retrievers/MetalRetriever.py +++ b/src/backend/base/langflow/components/retrievers/MetalRetriever.py @@ -10,6 +10,7 @@ class MetalRetrieverComponent(CustomComponent): display_name: str = "Metal Retriever" description: str = "Retriever that uses the Metal API." + name = 'MetalRetriever' def build_config(self): return { diff --git a/src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py b/src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py index f7b2eda6ba9..aa4ff0ba44c 100644 --- a/src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py +++ b/src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py @@ -10,6 +10,7 @@ class MultiQueryRetrieverComponent(CustomComponent): display_name = "MultiQueryRetriever" description = "Initialize from llm using default template." documentation = "https://python.langchain.com/docs/modules/data_connection/retrievers/how_to/MultiQueryRetriever" + name = 'MultiQueryRetriever' def build_config(self): return { diff --git a/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py b/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py index fd61a32deaf..20ac0c9d4b5 100644 --- a/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py +++ b/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py @@ -12,6 +12,7 @@ class SelfQueryRetrieverComponent(CustomComponent): display_name: str = "Self Query Retriever" description: str = "Retriever that uses a vector store and an LLM to generate the vector store queries." + name = 'SelfQueryRetriever' icon = "LangChain" def build_config(self): diff --git a/src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py b/src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py index a328b2b20f7..d426b1aed6d 100644 --- a/src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py +++ b/src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py @@ -18,6 +18,7 @@ class VectaraSelfQueryRetriverComponent(CustomComponent): display_name: str = "Vectara Self Query Retriever for Vectara Vector Store" description: str = "Implementation of Vectara Self Query Retriever" documentation = "https://python.langchain.com/docs/integrations/retrievers/self_query/vectara_self_query" + name = 'VectaraSelfQueryRetriver' icon = "Vectara" field_config = { diff --git a/src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py b/src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py index 6460e04582f..9fdf26e0bbd 100644 --- a/src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py +++ b/src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py @@ -7,6 +7,7 @@ class VectoStoreRetrieverComponent(CustomComponent): display_name = "VectorStore Retriever" description = "A vector store retriever" + name = 'VectorStoreRetriever' def build_config(self): return { diff --git a/src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py b/src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py index c0f00b07867..addb0e23896 100644 --- a/src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py +++ b/src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py @@ -10,6 +10,7 @@ class CharacterTextSplitterComponent(CustomComponent): display_name = "CharacterTextSplitter" description = "Splitting text that looks at characters." + name = 'CharacterTextSplitter' def build_config(self): return { diff --git a/src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py b/src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py index 4c074e8616b..7c8137fd3eb 100644 --- a/src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py +++ b/src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py @@ -10,6 +10,7 @@ class LanguageRecursiveTextSplitterComponent(CustomComponent): display_name: str = "Language Recursive Text Splitter" description: str = "Split text into chunks of a specified length based on language." documentation: str = "https://docs.langflow.org/components/text-splitters#languagerecursivetextsplitter" + name = 'LanguageRecursiveTextSplitter' def build_config(self): options = [x.value for x in Language] diff --git a/src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py b/src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py index f1385f16532..08fbb53332a 100644 --- a/src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py +++ b/src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py @@ -11,6 +11,7 @@ class RecursiveCharacterTextSplitterComponent(Component): display_name: str = "Recursive Character Text Splitter" description: str = "Split text into chunks of a specified length." documentation: str = "https://docs.langflow.org/components/text-splitters#recursivecharactertextsplitter" + name = 'RecursiveCharacterTextSplitter' inputs = [ IntInput( diff --git a/src/backend/base/langflow/components/toolkits/JsonToolkit.py b/src/backend/base/langflow/components/toolkits/JsonToolkit.py index 09a613336a5..52a0e4b0c0d 100644 --- a/src/backend/base/langflow/components/toolkits/JsonToolkit.py +++ b/src/backend/base/langflow/components/toolkits/JsonToolkit.py @@ -10,6 +10,7 @@ class JsonToolkitComponent(CustomComponent): display_name = "JsonToolkit" description = "Toolkit for interacting with a JSON spec." + name = 'JsonToolkit' def build_config(self): return { diff --git a/src/backend/base/langflow/components/toolkits/Metaphor.py b/src/backend/base/langflow/components/toolkits/Metaphor.py index 9ebd4f7713d..96b3f5bf99a 100644 --- a/src/backend/base/langflow/components/toolkits/Metaphor.py +++ b/src/backend/base/langflow/components/toolkits/Metaphor.py @@ -12,6 +12,7 @@ class MetaphorToolkit(CustomComponent): description: str = "Metaphor Toolkit" documentation = "https://python.langchain.com/docs/integrations/tools/metaphor_search" beta: bool = True + name = 'Metaphor' # api key should be password = True field_config = { "metaphor_api_key": {"display_name": "Metaphor API Key", "password": True}, diff --git a/src/backend/base/langflow/components/toolkits/OpenAPIToolkit.py b/src/backend/base/langflow/components/toolkits/OpenAPIToolkit.py index 0639dae0ca5..eb11f88faf5 100644 --- a/src/backend/base/langflow/components/toolkits/OpenAPIToolkit.py +++ b/src/backend/base/langflow/components/toolkits/OpenAPIToolkit.py @@ -12,6 +12,7 @@ class OpenAPIToolkitComponent(CustomComponent): display_name = "OpenAPIToolkit" description = "Toolkit for interacting with an OpenAPI API." + name = 'OpenAPIToolkit' def build_config(self): return { diff --git a/src/backend/base/langflow/components/toolkits/VectorStoreInfo.py b/src/backend/base/langflow/components/toolkits/VectorStoreInfo.py index 60bd6598ece..c2a092757eb 100644 --- a/src/backend/base/langflow/components/toolkits/VectorStoreInfo.py +++ b/src/backend/base/langflow/components/toolkits/VectorStoreInfo.py @@ -7,6 +7,7 @@ class VectorStoreInfoComponent(CustomComponent): display_name = "VectorStoreInfo" description = "Information about a VectorStore" + name = 'VectorStoreInfo' def build_config(self): return { diff --git a/src/backend/base/langflow/components/toolkits/VectorStoreRouterToolkit.py b/src/backend/base/langflow/components/toolkits/VectorStoreRouterToolkit.py index 6e5b5d6137f..10dcaddfba1 100644 --- a/src/backend/base/langflow/components/toolkits/VectorStoreRouterToolkit.py +++ b/src/backend/base/langflow/components/toolkits/VectorStoreRouterToolkit.py @@ -9,6 +9,7 @@ class VectorStoreRouterToolkitComponent(CustomComponent): display_name = "VectorStoreRouterToolkit" description = "Toolkit for routing between Vector Stores." + name = 'VectorStoreRouterToolkit' def build_config(self): return { diff --git a/src/backend/base/langflow/components/toolkits/VectorStoreToolkit.py b/src/backend/base/langflow/components/toolkits/VectorStoreToolkit.py index fc63bb66f14..6c6ce57554f 100644 --- a/src/backend/base/langflow/components/toolkits/VectorStoreToolkit.py +++ b/src/backend/base/langflow/components/toolkits/VectorStoreToolkit.py @@ -9,6 +9,7 @@ class VectorStoreToolkitComponent(CustomComponent): display_name = "VectorStoreToolkit" description = "Toolkit for interacting with a Vector Store." + name = 'VectorStoreToolkit' def build_config(self): return { diff --git a/src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py b/src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py index 84392cbdb4a..53f9c6a1862 100644 --- a/src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py +++ b/src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py @@ -12,6 +12,7 @@ class PythonCodeStructuredTool(CustomComponent): display_name = "PythonCodeTool" description = "structuredtool dataclass code to tool" documentation = "https://python.langchain.com/docs/modules/tools/custom_tools/#structuredtool-dataclass" + name = 'PythonCodeStructuredTool' icon = "🐍" field_order = ["name", "description", "tool_code", "return_direct", "tool_function", "tool_class"] diff --git a/src/backend/base/langflow/components/tools/PythonREPLTool.py b/src/backend/base/langflow/components/tools/PythonREPLTool.py index 914b6b965a0..2a87f03aad0 100644 --- a/src/backend/base/langflow/components/tools/PythonREPLTool.py +++ b/src/backend/base/langflow/components/tools/PythonREPLTool.py @@ -9,6 +9,7 @@ class PythonREPLToolComponent(CustomComponent): display_name = "Python REPL Tool" description = "A tool for running Python code in a REPL environment." + name = 'PythonREPLTool' def build_config(self): return { diff --git a/src/backend/base/langflow/components/tools/RetrieverTool.py b/src/backend/base/langflow/components/tools/RetrieverTool.py index 28829321e0c..d009cdb3f71 100644 --- a/src/backend/base/langflow/components/tools/RetrieverTool.py +++ b/src/backend/base/langflow/components/tools/RetrieverTool.py @@ -7,6 +7,7 @@ class RetrieverToolComponent(CustomComponent): display_name = "RetrieverTool" description = "Tool for interacting with retriever" + name = 'RetrieverTool' def build_config(self): return { diff --git a/src/backend/base/langflow/components/tools/SearchAPITool.py b/src/backend/base/langflow/components/tools/SearchAPITool.py index e0658c8c8d5..c8a0afee86a 100644 --- a/src/backend/base/langflow/components/tools/SearchAPITool.py +++ b/src/backend/base/langflow/components/tools/SearchAPITool.py @@ -8,6 +8,7 @@ class SearchApiToolComponent(CustomComponent): display_name: str = "SearchApi Tool" description: str = "Real-time search engine results API." + name = 'SearchAPITool' documentation: str = "https://www.searchapi.io/docs/google" field_config = { "engine": { diff --git a/src/backend/base/langflow/components/tools/SearchApi.py b/src/backend/base/langflow/components/tools/SearchApi.py index 5dfd5525019..619e30c2b17 100644 --- a/src/backend/base/langflow/components/tools/SearchApi.py +++ b/src/backend/base/langflow/components/tools/SearchApi.py @@ -10,6 +10,8 @@ class SearchApi(CustomComponent): display_name: str = "SearchApi" description: str = "Real-time search engine results API." + name = 'SearchApi' + output_types: list[str] = ["Document"] documentation: str = "https://www.searchapi.io/docs/google" field_config = { diff --git a/src/backend/base/langflow/components/vectorstores/AstraDB.py b/src/backend/base/langflow/components/vectorstores/AstraDB.py index aabbb91a713..bfaf41bc52c 100644 --- a/src/backend/base/langflow/components/vectorstores/AstraDB.py +++ b/src/backend/base/langflow/components/vectorstores/AstraDB.py @@ -18,6 +18,7 @@ class AstraVectorStoreComponent(LCVectorStoreComponent): display_name: str = "Astra DB" description: str = "Implementation of Vector Store using Astra DB with search capabilities" documentation: str = "https://python.langchain.com/docs/integrations/vectorstores/astradb" + name = 'AstraDB' icon: str = "AstraDB" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Cassandra.py b/src/backend/base/langflow/components/vectorstores/Cassandra.py index 053e06ec06e..a7d412aa5c6 100644 --- a/src/backend/base/langflow/components/vectorstores/Cassandra.py +++ b/src/backend/base/langflow/components/vectorstores/Cassandra.py @@ -21,6 +21,7 @@ class CassandraVectorStoreComponent(LCVectorStoreComponent): display_name = "Cassandra" description = "Cassandra Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/cassandra" + name = 'Cassandra' icon = "Cassandra" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Chroma.py b/src/backend/base/langflow/components/vectorstores/Chroma.py index ae2964ea6eb..0315fb28aff 100644 --- a/src/backend/base/langflow/components/vectorstores/Chroma.py +++ b/src/backend/base/langflow/components/vectorstores/Chroma.py @@ -22,6 +22,7 @@ class ChromaVectorStoreComponent(LCVectorStoreComponent): display_name: str = "Chroma DB" description: str = "Chroma Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/integrations/vectorstores/chroma" + name = 'Chroma' icon = "Chroma" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Couchbase.py b/src/backend/base/langflow/components/vectorstores/Couchbase.py index a25fa0479c1..0f66be78114 100644 --- a/src/backend/base/langflow/components/vectorstores/Couchbase.py +++ b/src/backend/base/langflow/components/vectorstores/Couchbase.py @@ -13,6 +13,7 @@ class CouchbaseVectorStoreComponent(LCVectorStoreComponent): display_name = "Couchbase" description = "Couchbase Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.1/docs/integrations/document_loaders/couchbase/" + name = 'Couchbase' icon = "Couchbase" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/FAISS.py b/src/backend/base/langflow/components/vectorstores/FAISS.py index 24b6e6a7665..76056c8cccc 100644 --- a/src/backend/base/langflow/components/vectorstores/FAISS.py +++ b/src/backend/base/langflow/components/vectorstores/FAISS.py @@ -17,6 +17,7 @@ class FaissVectorStoreComponent(LCVectorStoreComponent): display_name: str = "FAISS" description: str = "FAISS Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/faiss" + name = 'FAISS' icon = "FAISS" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py b/src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py index 4833a4feef5..0ae6840ec88 100644 --- a/src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py +++ b/src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py @@ -12,6 +12,7 @@ class MongoVectorStoreComponent(LCVectorStoreComponent): display_name = "MongoDB Atlas" description = "MongoDB Atlas Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/mongodb_atlas" + name = 'MongoDBAtlasVector' icon = "MongoDB" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Pinecone.py b/src/backend/base/langflow/components/vectorstores/Pinecone.py index bf5d0d546f6..4b2d08e934a 100644 --- a/src/backend/base/langflow/components/vectorstores/Pinecone.py +++ b/src/backend/base/langflow/components/vectorstores/Pinecone.py @@ -20,6 +20,7 @@ class PineconeVectorStoreComponent(LCVectorStoreComponent): display_name = "Pinecone" description = "Pinecone Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.2/docs/integrations/vectorstores/pinecone/" + name = 'Pinecone' icon = "Pinecone" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Qdrant.py b/src/backend/base/langflow/components/vectorstores/Qdrant.py index 15282c0331c..a30eeb53522 100644 --- a/src/backend/base/langflow/components/vectorstores/Qdrant.py +++ b/src/backend/base/langflow/components/vectorstores/Qdrant.py @@ -21,6 +21,7 @@ class QdrantVectorStoreComponent(LCVectorStoreComponent): display_name = "Qdrant" description = "Qdrant Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/qdrant" + name = 'Qdrant' icon = "Qdrant" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Redis.py b/src/backend/base/langflow/components/vectorstores/Redis.py index 9ce42b41255..5974fad1110 100644 --- a/src/backend/base/langflow/components/vectorstores/Redis.py +++ b/src/backend/base/langflow/components/vectorstores/Redis.py @@ -17,6 +17,7 @@ class RedisVectorStoreComponent(LCVectorStoreComponent): display_name: str = "Redis" description: str = "Implementation of Vector Store using Redis" documentation = "https://python.langchain.com/docs/integrations/vectorstores/redis" + name = 'Redis' inputs = [ SecretStrInput(name="redis_server_url", display_name="Redis Server Connection String", required=True), diff --git a/src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py b/src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py index 4c9d89669a3..7ace87c7139 100644 --- a/src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py +++ b/src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py @@ -13,6 +13,7 @@ class SupabaseVectorStoreComponent(LCVectorStoreComponent): display_name = "Supabase" description = "Supabase Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.2/docs/integrations/vectorstores/supabase/" + name = 'SupabaseVectorStore' icon = "Supabase" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Upstash.py b/src/backend/base/langflow/components/vectorstores/Upstash.py index 951bea0206b..547b1911b71 100644 --- a/src/backend/base/langflow/components/vectorstores/Upstash.py +++ b/src/backend/base/langflow/components/vectorstores/Upstash.py @@ -12,6 +12,7 @@ class UpstashVectorStoreComponent(LCVectorStoreComponent): display_name = "Upstash" description = "Upstash Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.2/docs/integrations/vectorstores/upstash/" + name = 'Upstash' icon = "Upstash" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Vectara.py b/src/backend/base/langflow/components/vectorstores/Vectara.py index 4945eb902f7..181e876ca00 100644 --- a/src/backend/base/langflow/components/vectorstores/Vectara.py +++ b/src/backend/base/langflow/components/vectorstores/Vectara.py @@ -20,6 +20,7 @@ class VectaraVectorStoreComponent(LCVectorStoreComponent): display_name: str = "Vectara" description: str = "Vectara Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/vectara" + name = 'Vectara' icon = "Vectara" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Weaviate.py b/src/backend/base/langflow/components/vectorstores/Weaviate.py index 2292af672f1..b32415299ba 100644 --- a/src/backend/base/langflow/components/vectorstores/Weaviate.py +++ b/src/backend/base/langflow/components/vectorstores/Weaviate.py @@ -13,6 +13,7 @@ class WeaviateVectorStoreComponent(LCVectorStoreComponent): display_name = "Weaviate" description = "Weaviate Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/weaviate" + name = 'Weaviate' icon = "Weaviate" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/pgvector.py b/src/backend/base/langflow/components/vectorstores/pgvector.py index e4f1211a5ee..e73b63de7b7 100644 --- a/src/backend/base/langflow/components/vectorstores/pgvector.py +++ b/src/backend/base/langflow/components/vectorstores/pgvector.py @@ -12,6 +12,7 @@ class PGVectorStoreComponent(LCVectorStoreComponent): display_name = "PGVector" description = "PGVector Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.2/docs/integrations/vectorstores/pgvector/" + name = 'pgvector' icon = "PGVector" inputs = [ From 73a9d711b71d08b1fb968b22ab00cd057d41eb21 Mon Sep 17 00:00:00 2001 From: italojohnny Date: Tue, 2 Jul 2024 17:20:06 -0300 Subject: [PATCH 16/20] chore: change the logic of the type value returned --- src/backend/base/langflow/api/v1/endpoints.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/api/v1/endpoints.py b/src/backend/base/langflow/api/v1/endpoints.py index 35a8f66375f..e7b9c157d55 100644 --- a/src/backend/base/langflow/api/v1/endpoints.py +++ b/src/backend/base/langflow/api/v1/endpoints.py @@ -519,7 +519,12 @@ async def custom_component( built_frontend_node, component_instance = build_custom_component_template(component, user_id=user.id) if raw_code.frontend_node is not None: built_frontend_node = component_instance.post_code_processing(built_frontend_node, raw_code.frontend_node) - return CustomComponentResponse(data=built_frontend_node, type=component_instance.__class__.__name__) + + _type = component_instance.__class__.__name__ + if hasattr(component_instance, 'name') and component_instance.name: + _type = component_instance.name + return CustomComponentResponse(data=built_frontend_node, type=_type) + @router.post("/custom_component/update", status_code=HTTPStatus.OK) From af8a9738798d6f8a68bf474b60e922fd09cb577c Mon Sep 17 00:00:00 2001 From: italojohnny Date: Wed, 3 Jul 2024 14:53:25 -0300 Subject: [PATCH 17/20] chore: extract code to new func --- src/backend/base/langflow/api/v1/endpoints.py | 6 ++---- src/backend/base/langflow/custom/utils.py | 7 +++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/backend/base/langflow/api/v1/endpoints.py b/src/backend/base/langflow/api/v1/endpoints.py index e7b9c157d55..5d278d4fb09 100644 --- a/src/backend/base/langflow/api/v1/endpoints.py +++ b/src/backend/base/langflow/api/v1/endpoints.py @@ -22,7 +22,7 @@ UploadFileResponse, ) from langflow.custom.custom_component.component import Component -from langflow.custom.utils import build_custom_component_template +from langflow.custom.utils import build_custom_component_template, get_instance_name from langflow.graph.graph.base import Graph from langflow.graph.schema import RunOutputs from langflow.helpers.flow import get_flow_by_id_or_endpoint_name @@ -520,9 +520,7 @@ async def custom_component( if raw_code.frontend_node is not None: built_frontend_node = component_instance.post_code_processing(built_frontend_node, raw_code.frontend_node) - _type = component_instance.__class__.__name__ - if hasattr(component_instance, 'name') and component_instance.name: - _type = component_instance.name + _type = get_instance_name(component_instance) return CustomComponentResponse(data=built_frontend_node, type=_type) diff --git a/src/backend/base/langflow/custom/utils.py b/src/backend/base/langflow/custom/utils.py index 5c5695d7bbc..dc3d809b7f8 100644 --- a/src/backend/base/langflow/custom/utils.py +++ b/src/backend/base/langflow/custom/utils.py @@ -554,3 +554,10 @@ def get_function(code): function_name = validate.extract_function_name(code) return validate.create_function(code, function_name) + + +def get_instance_name(instance): + name = instance.__class__.__name__ + if hasattr(instance, 'name') and instance.name: + name = instance.name + return name From 267341a9c0016cb1dc09de0b649462aef79d6c7e Mon Sep 17 00:00:00 2001 From: italojohnny Date: Wed, 3 Jul 2024 14:56:04 -0300 Subject: [PATCH 18/20] chore: change component_name value --- src/backend/base/langflow/custom/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/base/langflow/custom/utils.py b/src/backend/base/langflow/custom/utils.py index dc3d809b7f8..759e5f5c34d 100644 --- a/src/backend/base/langflow/custom/utils.py +++ b/src/backend/base/langflow/custom/utils.py @@ -544,8 +544,7 @@ def sanitize_field_config(field_config: Union[Dict, Input]): def build_component(component): """Build a single component.""" component_template, component_instance = create_component_template(component) - component_name = type(component_instance).__name__ - + component_name = get_instance_name(component_instance) return component_name, component_template From 278041fd6b7ccf28b96bc38b29bcd824f18f7694 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 20:18:26 +0000 Subject: [PATCH 19/20] [autofix.ci] apply automated fixes --- .../GenericNode/components/parameterComponent/index.tsx | 6 +++++- .../FlowPage/components/nodeToolbarComponent/index.tsx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index 37f4a7cd9cf..a2233070edc 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -180,7 +180,11 @@ export default function ParameterComponent({ handleOnNewValueHook(newValue, dbValue, skipSnapshot); }; - const handleNodeClass = (newNodeClass: APIClassType, code?: string, type?: string): void => { + const handleNodeClass = ( + newNodeClass: APIClassType, + code?: string, + type?: string, + ): void => { handleNodeClassHook(newNodeClass, code, type); }; diff --git a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx index a3e796eedd8..ceb79f5a0e0 100644 --- a/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/index.tsx @@ -390,7 +390,11 @@ export default function NodeToolbarComponent({ }); }; - const handleNodeClass = (newNodeClass: APIClassType, code?: string, type?: string): void => { + const handleNodeClass = ( + newNodeClass: APIClassType, + code?: string, + type?: string, + ): void => { if (!data.node) return; if (data.node!.template[name].value !== code) { takeSnapshot(); From ca91eb28b66d7417b518d2eed50f021eafd40ebe Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Wed, 3 Jul 2024 17:19:25 -0300 Subject: [PATCH 20/20] Formatted files --- src/backend/base/langflow/api/v1/endpoints.py | 1 - src/backend/base/langflow/components/agents/CSVAgent.py | 2 +- src/backend/base/langflow/components/agents/JsonAgent.py | 2 +- src/backend/base/langflow/components/agents/SQLAgent.py | 2 +- .../base/langflow/components/agents/ToolCallingAgent.py | 2 +- .../base/langflow/components/agents/VectorStoreAgent.py | 2 +- .../base/langflow/components/agents/VectorStoreRouterAgent.py | 2 +- src/backend/base/langflow/components/agents/XMLAgent.py | 2 +- .../base/langflow/components/chains/ConversationChain.py | 2 +- src/backend/base/langflow/components/chains/LLMChain.py | 2 +- src/backend/base/langflow/components/chains/LLMCheckerChain.py | 2 +- src/backend/base/langflow/components/chains/LLMMathChain.py | 2 +- src/backend/base/langflow/components/chains/RetrievalQA.py | 2 +- .../langflow/components/chains/RetrievalQAWithSourcesChain.py | 2 +- src/backend/base/langflow/components/chains/SQLGenerator.py | 2 +- src/backend/base/langflow/components/data/APIRequest.py | 2 +- src/backend/base/langflow/components/data/Directory.py | 2 +- src/backend/base/langflow/components/data/File.py | 2 +- src/backend/base/langflow/components/data/URL.py | 2 +- src/backend/base/langflow/components/data/Webhook.py | 2 +- .../base/langflow/components/deactivated/AgentComponent.py | 2 +- .../base/langflow/components/deactivated/CodeBlockExtractor.py | 2 +- .../base/langflow/components/deactivated/DocumentsToData.py | 2 +- src/backend/base/langflow/components/deactivated/Embed.py | 2 +- .../base/langflow/components/deactivated/ExtractKeyFromData.py | 2 +- src/backend/base/langflow/components/deactivated/ListFlows.py | 2 +- src/backend/base/langflow/components/deactivated/MergeData.py | 2 +- src/backend/base/langflow/components/deactivated/Message.py | 2 +- .../langflow/components/deactivated/SelectivePassThrough.py | 2 +- .../base/langflow/components/deactivated/ShouldRunNext.py | 2 +- src/backend/base/langflow/components/deactivated/SplitText.py | 2 +- .../base/langflow/components/deactivated/StoreMessage.py | 2 +- src/backend/base/langflow/components/deactivated/SubFlow.py | 2 +- .../langflow/components/embeddings/AmazonBedrockEmbeddings.py | 2 +- .../base/langflow/components/embeddings/AstraVectorize.py | 2 +- .../langflow/components/embeddings/AzureOpenAIEmbeddings.py | 2 +- .../base/langflow/components/embeddings/CohereEmbeddings.py | 2 +- .../langflow/components/embeddings/HuggingFaceEmbeddings.py | 2 +- .../components/embeddings/HuggingFaceInferenceAPIEmbeddings.py | 2 +- .../base/langflow/components/embeddings/MistalAIEmbeddings.py | 2 +- .../base/langflow/components/embeddings/OllamaEmbeddings.py | 2 +- .../base/langflow/components/embeddings/OpenAIEmbeddings.py | 2 +- .../base/langflow/components/embeddings/VertexAIEmbeddings.py | 2 +- src/backend/base/langflow/components/helpers/CombineText.py | 2 +- src/backend/base/langflow/components/helpers/CreateList.py | 2 +- .../base/langflow/components/helpers/CustomComponent.py | 2 +- src/backend/base/langflow/components/helpers/FilterData.py | 2 +- src/backend/base/langflow/components/helpers/IDGenerator.py | 2 +- src/backend/base/langflow/components/helpers/Memory.py | 2 +- src/backend/base/langflow/components/helpers/MergeData.py | 2 +- src/backend/base/langflow/components/helpers/ParseData.py | 2 +- src/backend/base/langflow/components/helpers/SplitText.py | 2 +- src/backend/base/langflow/components/helpers/StoreMessage.py | 2 +- src/backend/base/langflow/components/inputs/ChatInput.py | 2 +- src/backend/base/langflow/components/inputs/TextInput.py | 2 +- .../components/langchain_utilities/BingSearchAPIWrapper.py | 2 +- .../components/langchain_utilities/FirecrawlCrawlApi.py | 2 +- .../components/langchain_utilities/FirecrawlScrapeApi.py | 2 +- .../components/langchain_utilities/GoogleSearchAPIWrapper.py | 2 +- .../components/langchain_utilities/GoogleSerperAPIWrapper.py | 2 +- .../components/langchain_utilities/JSONDocumentBuilder.py | 2 +- .../langflow/components/langchain_utilities/SQLDatabase.py | 2 +- .../base/langflow/components/langchain_utilities/SearchApi.py | 2 +- .../components/langchain_utilities/SearxSearchWrapper.py | 2 +- .../langflow/components/langchain_utilities/SerpAPIWrapper.py | 2 +- .../components/langchain_utilities/WikipediaAPIWrapper.py | 2 +- .../components/langchain_utilities/WolframAlphaAPIWrapper.py | 2 +- .../base/langflow/components/memories/AstraDBMessageReader.py | 2 +- .../base/langflow/components/memories/AstraDBMessageWriter.py | 2 +- .../langflow/components/memories/CassandraMessageReader.py | 2 +- .../langflow/components/memories/CassandraMessageWriter.py | 2 +- .../base/langflow/components/memories/ZepMessageReader.py | 2 +- .../base/langflow/components/memories/ZepMessageWriter.py | 2 +- .../base/langflow/components/models/AmazonBedrockModel.py | 2 +- src/backend/base/langflow/components/models/AnthropicModel.py | 2 +- .../base/langflow/components/models/AzureOpenAIModel.py | 2 +- .../base/langflow/components/models/BaiduQianfanChatModel.py | 2 +- src/backend/base/langflow/components/models/CohereModel.py | 2 +- .../base/langflow/components/models/GoogleGenerativeAIModel.py | 2 +- src/backend/base/langflow/components/models/GroqModel.py | 2 +- .../base/langflow/components/models/HuggingFaceModel.py | 2 +- src/backend/base/langflow/components/models/MistralModel.py | 2 +- src/backend/base/langflow/components/models/OllamaModel.py | 2 +- src/backend/base/langflow/components/models/OpenAIModel.py | 2 +- src/backend/base/langflow/components/models/VertexAiModel.py | 2 +- src/backend/base/langflow/components/outputs/ChatOutput.py | 2 +- src/backend/base/langflow/components/outputs/TextOutput.py | 2 +- src/backend/base/langflow/components/prompts/Prompt.py | 2 +- .../base/langflow/components/prototypes/ConditionalRouter.py | 2 +- src/backend/base/langflow/components/prototypes/CreateData.py | 2 +- src/backend/base/langflow/components/prototypes/FlowTool.py | 2 +- src/backend/base/langflow/components/prototypes/Listen.py | 2 +- src/backend/base/langflow/components/prototypes/Notify.py | 2 +- src/backend/base/langflow/components/prototypes/Pass.py | 2 +- .../base/langflow/components/prototypes/PythonFunction.py | 2 +- src/backend/base/langflow/components/prototypes/RunFlow.py | 2 +- .../base/langflow/components/prototypes/RunnableExecutor.py | 2 +- src/backend/base/langflow/components/prototypes/SQLExecutor.py | 2 +- src/backend/base/langflow/components/prototypes/SubFlow.py | 2 +- src/backend/base/langflow/components/prototypes/UpdateData.py | 2 +- .../base/langflow/components/retrievers/AmazonKendra.py | 2 +- .../base/langflow/components/retrievers/CohereRerank.py | 2 +- .../base/langflow/components/retrievers/MetalRetriever.py | 2 +- .../base/langflow/components/retrievers/MultiQueryRetriever.py | 2 +- .../base/langflow/components/retrievers/SelfQueryRetriever.py | 2 +- .../langflow/components/retrievers/VectaraSelfQueryRetriver.py | 2 +- .../langflow/components/retrievers/VectorStoreRetriever.py | 2 +- .../langflow/components/textsplitters/CharacterTextSplitter.py | 2 +- .../components/textsplitters/LanguageRecursiveTextSplitter.py | 2 +- .../components/textsplitters/RecursiveCharacterTextSplitter.py | 2 +- src/backend/base/langflow/components/toolkits/JsonToolkit.py | 2 +- src/backend/base/langflow/components/toolkits/Metaphor.py | 2 +- .../base/langflow/components/toolkits/OpenAPIToolkit.py | 2 +- .../base/langflow/components/toolkits/VectorStoreInfo.py | 2 +- .../langflow/components/toolkits/VectorStoreRouterToolkit.py | 2 +- .../base/langflow/components/toolkits/VectorStoreToolkit.py | 2 +- .../base/langflow/components/tools/PythonCodeStructuredTool.py | 2 +- src/backend/base/langflow/components/tools/PythonREPLTool.py | 2 +- src/backend/base/langflow/components/tools/RetrieverTool.py | 2 +- src/backend/base/langflow/components/tools/SearchAPITool.py | 2 +- src/backend/base/langflow/components/tools/SearchApi.py | 2 +- src/backend/base/langflow/components/vectorstores/AstraDB.py | 2 +- src/backend/base/langflow/components/vectorstores/Cassandra.py | 2 +- src/backend/base/langflow/components/vectorstores/Chroma.py | 2 +- src/backend/base/langflow/components/vectorstores/Couchbase.py | 2 +- src/backend/base/langflow/components/vectorstores/FAISS.py | 2 +- .../langflow/components/vectorstores/MongoDBAtlasVector.py | 2 +- src/backend/base/langflow/components/vectorstores/Pinecone.py | 2 +- src/backend/base/langflow/components/vectorstores/Qdrant.py | 2 +- src/backend/base/langflow/components/vectorstores/Redis.py | 2 +- .../langflow/components/vectorstores/SupabaseVectorStore.py | 2 +- src/backend/base/langflow/components/vectorstores/Upstash.py | 2 +- src/backend/base/langflow/components/vectorstores/Vectara.py | 2 +- src/backend/base/langflow/components/vectorstores/Weaviate.py | 2 +- src/backend/base/langflow/components/vectorstores/pgvector.py | 2 +- src/backend/base/langflow/custom/utils.py | 3 +-- 136 files changed, 135 insertions(+), 137 deletions(-) diff --git a/src/backend/base/langflow/api/v1/endpoints.py b/src/backend/base/langflow/api/v1/endpoints.py index 5d278d4fb09..05b637060c7 100644 --- a/src/backend/base/langflow/api/v1/endpoints.py +++ b/src/backend/base/langflow/api/v1/endpoints.py @@ -524,7 +524,6 @@ async def custom_component( return CustomComponentResponse(data=built_frontend_node, type=_type) - @router.post("/custom_component/update", status_code=HTTPStatus.OK) async def custom_component_update( code_request: UpdateCustomComponentRequest, diff --git a/src/backend/base/langflow/components/agents/CSVAgent.py b/src/backend/base/langflow/components/agents/CSVAgent.py index 53a3bbdf74e..b336045703a 100644 --- a/src/backend/base/langflow/components/agents/CSVAgent.py +++ b/src/backend/base/langflow/components/agents/CSVAgent.py @@ -8,7 +8,7 @@ class CSVAgentComponent(CustomComponent): display_name = "CSVAgent" description = "Construct a CSV agent from a CSV and tools." documentation = "https://python.langchain.com/docs/modules/agents/toolkits/csv" - name = 'CSVAgent' + name = "CSVAgent" def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/JsonAgent.py b/src/backend/base/langflow/components/agents/JsonAgent.py index b057ce0d577..3746e989d51 100644 --- a/src/backend/base/langflow/components/agents/JsonAgent.py +++ b/src/backend/base/langflow/components/agents/JsonAgent.py @@ -9,7 +9,7 @@ class JsonAgentComponent(CustomComponent): display_name = "JsonAgent" description = "Construct a json agent from an LLM and tools." - name = 'JsonAgent' + name = "JsonAgent" def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/SQLAgent.py b/src/backend/base/langflow/components/agents/SQLAgent.py index 93f481c2bc4..ddc6f49c603 100644 --- a/src/backend/base/langflow/components/agents/SQLAgent.py +++ b/src/backend/base/langflow/components/agents/SQLAgent.py @@ -12,7 +12,7 @@ class SQLAgentComponent(CustomComponent): display_name = "SQLAgent" description = "Construct an SQL agent from an LLM and tools." - name = 'SQLAgent' + name = "SQLAgent" def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/ToolCallingAgent.py b/src/backend/base/langflow/components/agents/ToolCallingAgent.py index c8d42762c97..c08c97ca55c 100644 --- a/src/backend/base/langflow/components/agents/ToolCallingAgent.py +++ b/src/backend/base/langflow/components/agents/ToolCallingAgent.py @@ -15,7 +15,7 @@ class ToolCallingAgentComponent(Component): description: str = "Agent that uses tools. Only models that are compatible with function calling are supported." icon = "LangChain" beta = True - name = 'ToolCallingAgent' + name = "ToolCallingAgent" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/agents/VectorStoreAgent.py b/src/backend/base/langflow/components/agents/VectorStoreAgent.py index 4dbdf30d3f4..1d3a5e890f9 100644 --- a/src/backend/base/langflow/components/agents/VectorStoreAgent.py +++ b/src/backend/base/langflow/components/agents/VectorStoreAgent.py @@ -10,7 +10,7 @@ class VectorStoreAgentComponent(CustomComponent): display_name = "VectorStoreAgent" description = "Construct an agent from a Vector Store." - name = 'VectorStoreAgent' + name = "VectorStoreAgent" def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py b/src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py index 72d21944f16..7750b2e01ac 100644 --- a/src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py +++ b/src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py @@ -10,7 +10,7 @@ class VectorStoreRouterAgentComponent(CustomComponent): display_name = "VectorStoreRouterAgent" description = "Construct an agent from a Vector Store Router." - name = 'VectorStoreRouterAgent' + name = "VectorStoreRouterAgent" def build_config(self): return { diff --git a/src/backend/base/langflow/components/agents/XMLAgent.py b/src/backend/base/langflow/components/agents/XMLAgent.py index 1e1a763b038..7972f8dfb89 100644 --- a/src/backend/base/langflow/components/agents/XMLAgent.py +++ b/src/backend/base/langflow/components/agents/XMLAgent.py @@ -11,7 +11,7 @@ class XMLAgentComponent(LCAgentComponent): display_name = "XMLAgent" description = "Construct an XML agent from an LLM and tools." - name = 'XMLAgent' + name = "XMLAgent" def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/ConversationChain.py b/src/backend/base/langflow/components/chains/ConversationChain.py index 855a8f73fdb..f4a6e1b392c 100644 --- a/src/backend/base/langflow/components/chains/ConversationChain.py +++ b/src/backend/base/langflow/components/chains/ConversationChain.py @@ -9,7 +9,7 @@ class ConversationChainComponent(CustomComponent): display_name = "ConversationChain" description = "Chain to have a conversation and load context from memory." - name = 'ConversationChain' + name = "ConversationChain" def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/LLMChain.py b/src/backend/base/langflow/components/chains/LLMChain.py index 33396846baf..d0f0c097523 100644 --- a/src/backend/base/langflow/components/chains/LLMChain.py +++ b/src/backend/base/langflow/components/chains/LLMChain.py @@ -10,7 +10,7 @@ class LLMChainComponent(CustomComponent): display_name = "LLMChain" description = "Chain to run queries against LLMs" - name = 'LLMChain' + name = "LLMChain" def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/LLMCheckerChain.py b/src/backend/base/langflow/components/chains/LLMCheckerChain.py index 7e01f95ccf0..080a8d7dde5 100644 --- a/src/backend/base/langflow/components/chains/LLMCheckerChain.py +++ b/src/backend/base/langflow/components/chains/LLMCheckerChain.py @@ -8,7 +8,7 @@ class LLMCheckerChainComponent(CustomComponent): display_name = "LLMCheckerChain" description = "" documentation = "https://python.langchain.com/docs/modules/chains/additional/llm_checker" - name = 'LLMCheckerChain' + name = "LLMCheckerChain" def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/LLMMathChain.py b/src/backend/base/langflow/components/chains/LLMMathChain.py index d4e1e41b792..b23ad6350b2 100644 --- a/src/backend/base/langflow/components/chains/LLMMathChain.py +++ b/src/backend/base/langflow/components/chains/LLMMathChain.py @@ -10,7 +10,7 @@ class LLMMathChainComponent(CustomComponent): display_name = "LLMMathChain" description = "Chain that interprets a prompt and executes python code to do math." documentation = "https://python.langchain.com/docs/modules/chains/additional/llm_math" - name = 'LLMMathChain' + name = "LLMMathChain" def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/RetrievalQA.py b/src/backend/base/langflow/components/chains/RetrievalQA.py index 303197c1dd0..a15b358538b 100644 --- a/src/backend/base/langflow/components/chains/RetrievalQA.py +++ b/src/backend/base/langflow/components/chains/RetrievalQA.py @@ -11,7 +11,7 @@ class RetrievalQAComponent(CustomComponent): display_name = "Retrieval QA" description = "Chain for question-answering against an index." - name = 'RetrievalQA' + name = "RetrievalQA" def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/RetrievalQAWithSourcesChain.py b/src/backend/base/langflow/components/chains/RetrievalQAWithSourcesChain.py index 2bf144c2b8e..41efb1cc91e 100644 --- a/src/backend/base/langflow/components/chains/RetrievalQAWithSourcesChain.py +++ b/src/backend/base/langflow/components/chains/RetrievalQAWithSourcesChain.py @@ -10,7 +10,7 @@ class RetrievalQAWithSourcesChainComponent(CustomComponent): display_name = "RetrievalQAWithSourcesChain" description = "Question-answering with sources over an index." - name = 'RetrievalQAWithSourcesChain' + name = "RetrievalQAWithSourcesChain" def build_config(self): return { diff --git a/src/backend/base/langflow/components/chains/SQLGenerator.py b/src/backend/base/langflow/components/chains/SQLGenerator.py index 5811d5a91e4..b81b59470cb 100644 --- a/src/backend/base/langflow/components/chains/SQLGenerator.py +++ b/src/backend/base/langflow/components/chains/SQLGenerator.py @@ -12,7 +12,7 @@ class SQLGeneratorComponent(CustomComponent): display_name = "Natural Language to SQL" description = "Generate SQL from natural language." - name = 'SQLGenerator' + name = "SQLGenerator" def build_config(self): return { diff --git a/src/backend/base/langflow/components/data/APIRequest.py b/src/backend/base/langflow/components/data/APIRequest.py index 0bef46b2fbb..a7908ae2172 100644 --- a/src/backend/base/langflow/components/data/APIRequest.py +++ b/src/backend/base/langflow/components/data/APIRequest.py @@ -22,7 +22,7 @@ class APIRequestComponent(Component): "**Note:** Check advanced options for more settings." ) icon = "Globe" - name = 'APIRequest' + name = "APIRequest" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/data/Directory.py b/src/backend/base/langflow/components/data/Directory.py index fb795b61c2f..1c1e82890dd 100644 --- a/src/backend/base/langflow/components/data/Directory.py +++ b/src/backend/base/langflow/components/data/Directory.py @@ -11,7 +11,7 @@ class DirectoryComponent(Component): display_name = "Directory" description = "Recursively load files from a directory." icon = "folder" - name = 'Directory' + name = "Directory" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/data/File.py b/src/backend/base/langflow/components/data/File.py index ec68e4511aa..f36c1846e56 100644 --- a/src/backend/base/langflow/components/data/File.py +++ b/src/backend/base/langflow/components/data/File.py @@ -10,7 +10,7 @@ class FileComponent(Component): display_name = "File" description = "A generic file loader." icon = "file-text" - name = 'File' + name = "File" inputs = [ FileInput( diff --git a/src/backend/base/langflow/components/data/URL.py b/src/backend/base/langflow/components/data/URL.py index e0f136b6106..f4e3c06433f 100644 --- a/src/backend/base/langflow/components/data/URL.py +++ b/src/backend/base/langflow/components/data/URL.py @@ -11,7 +11,7 @@ class URLComponent(Component): display_name = "URL" description = "Fetch content from one or more URLs." icon = "layout-template" - name = 'URL' + name = "URL" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/data/Webhook.py b/src/backend/base/langflow/components/data/Webhook.py index 1efac4dd513..e02367332fe 100644 --- a/src/backend/base/langflow/components/data/Webhook.py +++ b/src/backend/base/langflow/components/data/Webhook.py @@ -8,7 +8,7 @@ class WebhookComponent(Component): display_name = "Webhook Input" description = "Defines a webhook input for the flow." - name = 'Webhook' + name = "Webhook" inputs = [ MultilineInput( diff --git a/src/backend/base/langflow/components/deactivated/AgentComponent.py b/src/backend/base/langflow/components/deactivated/AgentComponent.py index e3cd865decd..a89213feadc 100644 --- a/src/backend/base/langflow/components/deactivated/AgentComponent.py +++ b/src/backend/base/langflow/components/deactivated/AgentComponent.py @@ -23,7 +23,7 @@ class AgentComponent(LCAgentComponent): "memory", "input_value", ] - name = 'AgentComponent' + name = "AgentComponent" def build_config(self): return { diff --git a/src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py b/src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py index fc7643cd363..f1383fc8ada 100644 --- a/src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py +++ b/src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py @@ -7,7 +7,7 @@ class CodeBlockExtractor(Component): display_name = "Code Block Extractor" description = "Extracts code block from text." - name = 'CodeBlockExtractor' + name = "CodeBlockExtractor" inputs = [Input(name="text", field_type=Text, description="Text to extract code blocks from.")] diff --git a/src/backend/base/langflow/components/deactivated/DocumentsToData.py b/src/backend/base/langflow/components/deactivated/DocumentsToData.py index ed8713b52b5..3d0f6597027 100644 --- a/src/backend/base/langflow/components/deactivated/DocumentsToData.py +++ b/src/backend/base/langflow/components/deactivated/DocumentsToData.py @@ -10,7 +10,7 @@ class DocumentsToDataComponent(CustomComponent): display_name = "Documents ⇢ Data" description = "Convert LangChain Documents into Data." icon = "LangChain" - name = 'DocumentsToData' + name = "DocumentsToData" field_config = { "documents": {"display_name": "Documents"}, diff --git a/src/backend/base/langflow/components/deactivated/Embed.py b/src/backend/base/langflow/components/deactivated/Embed.py index 88d6d76e7cb..dee38e2347f 100644 --- a/src/backend/base/langflow/components/deactivated/Embed.py +++ b/src/backend/base/langflow/components/deactivated/Embed.py @@ -5,7 +5,7 @@ class EmbedComponent(CustomComponent): display_name = "Embed Texts" - name = 'Embed' + name = "Embed" def build_config(self): return {"texts": {"display_name": "Texts"}, "embbedings": {"display_name": "Embeddings"}} diff --git a/src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py b/src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py index 2680fa9e267..01f7abd008c 100644 --- a/src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py +++ b/src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py @@ -6,7 +6,7 @@ class ExtractKeyFromDataComponent(CustomComponent): display_name = "Extract Key From Data" description = "Extracts a key from a data." beta: bool = True - name = 'ExtractKeyFromData' + name = "ExtractKeyFromData" field_config = { "data": {"display_name": "Data"}, diff --git a/src/backend/base/langflow/components/deactivated/ListFlows.py b/src/backend/base/langflow/components/deactivated/ListFlows.py index 9ee52bcacfd..fa46839a263 100644 --- a/src/backend/base/langflow/components/deactivated/ListFlows.py +++ b/src/backend/base/langflow/components/deactivated/ListFlows.py @@ -9,7 +9,7 @@ class ListFlowsComponent(CustomComponent): description = "A component to list all available flows." icon = "ListFlows" beta: bool = True - name = 'ListFlows' + name = "ListFlows" def build_config(self): return {} diff --git a/src/backend/base/langflow/components/deactivated/MergeData.py b/src/backend/base/langflow/components/deactivated/MergeData.py index 50d72f30ae6..3d2ac582c81 100644 --- a/src/backend/base/langflow/components/deactivated/MergeData.py +++ b/src/backend/base/langflow/components/deactivated/MergeData.py @@ -6,7 +6,7 @@ class MergeDataComponent(CustomComponent): display_name = "Merge Data" description = "Merges data." beta: bool = True - name = 'MergeData' + name = "MergeData" field_config = { "data": {"display_name": "Data"}, diff --git a/src/backend/base/langflow/components/deactivated/Message.py b/src/backend/base/langflow/components/deactivated/Message.py index b4fdc78396b..b5eecf19d2e 100644 --- a/src/backend/base/langflow/components/deactivated/Message.py +++ b/src/backend/base/langflow/components/deactivated/Message.py @@ -7,7 +7,7 @@ class MessageComponent(CustomComponent): display_name = "Message" description = "Creates a Message object given a Session ID." - name = 'Message' + name = "Message" def build_config(self): return { diff --git a/src/backend/base/langflow/components/deactivated/SelectivePassThrough.py b/src/backend/base/langflow/components/deactivated/SelectivePassThrough.py index 466e535bd5c..4a33418953d 100644 --- a/src/backend/base/langflow/components/deactivated/SelectivePassThrough.py +++ b/src/backend/base/langflow/components/deactivated/SelectivePassThrough.py @@ -7,7 +7,7 @@ class SelectivePassThroughComponent(Component): display_name = "Selective Pass Through" description = "Passes the specified value if a specified condition is met." icon = "filter" - name = 'SelectivePassThrough' + name = "SelectivePassThrough" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/deactivated/ShouldRunNext.py b/src/backend/base/langflow/components/deactivated/ShouldRunNext.py index 6b5ebd09490..5723c148684 100644 --- a/src/backend/base/langflow/components/deactivated/ShouldRunNext.py +++ b/src/backend/base/langflow/components/deactivated/ShouldRunNext.py @@ -8,7 +8,7 @@ class ShouldRunNextComponent(CustomComponent): display_name = "Should Run Next" description = "Determines if a vertex is runnable." - name = 'ShouldRunNext' + name = "ShouldRunNext" def build(self, llm: LanguageModel, question: str, context: str, retries: int = 3) -> Text: template = "Given the following question and the context below, answer with a yes or no.\n\n{error_message}\n\nQuestion: {question}\n\nContext: {context}\n\nAnswer:" diff --git a/src/backend/base/langflow/components/deactivated/SplitText.py b/src/backend/base/langflow/components/deactivated/SplitText.py index def81187519..88f911057e9 100644 --- a/src/backend/base/langflow/components/deactivated/SplitText.py +++ b/src/backend/base/langflow/components/deactivated/SplitText.py @@ -12,7 +12,7 @@ class SplitTextComponent(Component): display_name: str = "Split Text" description: str = "Split text into chunks based on specified criteria." icon = "scissors-line-dashed" - name = 'SplitText' + name = "SplitText" inputs = [ HandleInput( diff --git a/src/backend/base/langflow/components/deactivated/StoreMessage.py b/src/backend/base/langflow/components/deactivated/StoreMessage.py index 32a5829c29d..64a770aeadf 100644 --- a/src/backend/base/langflow/components/deactivated/StoreMessage.py +++ b/src/backend/base/langflow/components/deactivated/StoreMessage.py @@ -6,7 +6,7 @@ class StoreMessageComponent(CustomComponent): display_name = "Store Message" description = "Stores a chat message." - name = 'StoreMessage' + name = "StoreMessage" def build_config(self): return { diff --git a/src/backend/base/langflow/components/deactivated/SubFlow.py b/src/backend/base/langflow/components/deactivated/SubFlow.py index 490f73cbc91..6207e85f069 100644 --- a/src/backend/base/langflow/components/deactivated/SubFlow.py +++ b/src/backend/base/langflow/components/deactivated/SubFlow.py @@ -19,7 +19,7 @@ class SubFlowComponent(CustomComponent): ) beta: bool = True field_order = ["flow_name"] - name = 'SubFlow' + name = "SubFlow" def get_flow_names(self) -> List[str]: flow_datas = self.list_flows() diff --git a/src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py b/src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py index 413f3a0a380..5e91e801ac7 100644 --- a/src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py @@ -10,7 +10,7 @@ class AmazonBedrockEmbeddingsComponent(LCModelComponent): description: str = "Generate embeddings using Amazon Bedrock models." documentation = "https://python.langchain.com/docs/modules/data_connection/text_embedding/integrations/bedrock" icon = "Amazon" - name = 'AmazonBedrockEmbeddings' + name = "AmazonBedrockEmbeddings" inputs = [ DropdownInput( diff --git a/src/backend/base/langflow/components/embeddings/AstraVectorize.py b/src/backend/base/langflow/components/embeddings/AstraVectorize.py index 09b9d9e8bef..7b3feab31db 100644 --- a/src/backend/base/langflow/components/embeddings/AstraVectorize.py +++ b/src/backend/base/langflow/components/embeddings/AstraVectorize.py @@ -9,7 +9,7 @@ class AstraVectorize(Component): description: str = "Configuration options for Astra Vectorize server-side embeddings." documentation: str = "https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html" icon = "AstraDB" - name = 'AstraVectorize' + name = "AstraVectorize" VECTORIZE_PROVIDERS_MAPPING = { "Azure OpenAI": ["azureOpenAI", ["text-embedding-3-small", "text-embedding-3-large", "text-embedding-ada-002"]], diff --git a/src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py index 484e6a6bf25..e206074a680 100644 --- a/src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py @@ -11,7 +11,7 @@ class AzureOpenAIEmbeddingsComponent(LCModelComponent): description: str = "Generate embeddings using Azure OpenAI models." documentation: str = "https://python.langchain.com/docs/integrations/text_embedding/azureopenai" icon = "Azure" - name = 'AzureOpenAIEmbeddings' + name = "AzureOpenAIEmbeddings" API_VERSION_OPTIONS = [ "2022-12-01", diff --git a/src/backend/base/langflow/components/embeddings/CohereEmbeddings.py b/src/backend/base/langflow/components/embeddings/CohereEmbeddings.py index 2808aa1ca3d..6c72563389b 100644 --- a/src/backend/base/langflow/components/embeddings/CohereEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/CohereEmbeddings.py @@ -9,7 +9,7 @@ class CohereEmbeddingsComponent(LCModelComponent): display_name = "Cohere Embeddings" description = "Generate embeddings using Cohere models." icon = "Cohere" - name = 'CohereEmbeddings' + name = "CohereEmbeddings" inputs = [ SecretStrInput(name="cohere_api_key", display_name="Cohere API Key"), diff --git a/src/backend/base/langflow/components/embeddings/HuggingFaceEmbeddings.py b/src/backend/base/langflow/components/embeddings/HuggingFaceEmbeddings.py index 919ec9f5b30..bf2bdfd0f47 100644 --- a/src/backend/base/langflow/components/embeddings/HuggingFaceEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/HuggingFaceEmbeddings.py @@ -12,7 +12,7 @@ class HuggingFaceEmbeddingsComponent(LCModelComponent): "https://python.langchain.com/docs/modules/data_connection/text_embedding/integrations/sentence_transformers" ) icon = "HuggingFace" - name = 'HuggingFaceEmbeddings' + name = "HuggingFaceEmbeddings" inputs = [ MessageTextInput(name="cache_folder", display_name="Cache Folder", advanced=True), diff --git a/src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py b/src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py index a841aa4bed7..54b6c312c13 100644 --- a/src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py @@ -11,7 +11,7 @@ class HuggingFaceInferenceAPIEmbeddingsComponent(LCModelComponent): description = "Generate embeddings using Hugging Face Inference API models." documentation = "https://github.com/huggingface/text-embeddings-inference" icon = "HuggingFace" - name = 'HuggingFaceInferenceAPIEmbeddings' + name = "HuggingFaceInferenceAPIEmbeddings" inputs = [ SecretStrInput(name="api_key", display_name="API Key", advanced=True), diff --git a/src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py index 0691463c4d0..f46a81f96ef 100644 --- a/src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py @@ -10,7 +10,7 @@ class MistralAIEmbeddingsComponent(LCModelComponent): display_name = "MistralAI Embeddings" description = "Generate embeddings using MistralAI models." icon = "MistralAI" - name = 'MistalAIEmbeddings' + name = "MistalAIEmbeddings" inputs = [ DropdownInput( diff --git a/src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py b/src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py index 389bc8eff89..5a17c0ed455 100644 --- a/src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py @@ -10,7 +10,7 @@ class OllamaEmbeddingsComponent(LCModelComponent): description: str = "Generate embeddings using Ollama models." documentation = "https://python.langchain.com/docs/integrations/text_embedding/ollama" icon = "Ollama" - name = 'OllamaEmbeddings' + name = "OllamaEmbeddings" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py index 5acf5d46bb7..7fde4c32696 100644 --- a/src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py @@ -9,7 +9,7 @@ class OpenAIEmbeddingsComponent(LCEmbeddingsModel): display_name = "OpenAI Embeddings" description = "Generate embeddings using OpenAI models." icon = "OpenAI" - name = 'OpenAIEmbeddings' + name = "OpenAIEmbeddings" inputs = [ DictInput( diff --git a/src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py index f820e835707..7b2374482aa 100644 --- a/src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py @@ -7,7 +7,7 @@ class VertexAIEmbeddingsComponent(LCModelComponent): display_name = "VertexAI Embeddings" description = "Generate embeddings using Google Cloud VertexAI models." icon = "VertexAI" - name = 'VertexAIEmbeddings' + name = "VertexAIEmbeddings" inputs = [ FileInput( diff --git a/src/backend/base/langflow/components/helpers/CombineText.py b/src/backend/base/langflow/components/helpers/CombineText.py index 2d01817e445..251d337cc42 100644 --- a/src/backend/base/langflow/components/helpers/CombineText.py +++ b/src/backend/base/langflow/components/helpers/CombineText.py @@ -7,7 +7,7 @@ class CombineTextComponent(Component): display_name = "Combine Text" description = "Concatenate two text sources into a single text chunk using a specified delimiter." icon = "merge" - name = 'CombineText' + name = "CombineText" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/helpers/CreateList.py b/src/backend/base/langflow/components/helpers/CreateList.py index b67da272d89..678500b2381 100644 --- a/src/backend/base/langflow/components/helpers/CreateList.py +++ b/src/backend/base/langflow/components/helpers/CreateList.py @@ -8,7 +8,7 @@ class CreateListComponent(Component): display_name = "Create List" description = "Creates a list of texts." icon = "list" - name = 'CreateList' + name = "CreateList" inputs = [ StrInput( diff --git a/src/backend/base/langflow/components/helpers/CustomComponent.py b/src/backend/base/langflow/components/helpers/CustomComponent.py index b4f85cd8a94..df5db7dc013 100644 --- a/src/backend/base/langflow/components/helpers/CustomComponent.py +++ b/src/backend/base/langflow/components/helpers/CustomComponent.py @@ -9,7 +9,7 @@ class CustomComponent(Component): description = "Use as a template to create your own component." documentation: str = "http://docs.langflow.org/components/custom" icon = "custom_components" - name = 'CustomComponent' + name = "CustomComponent" inputs = [ MessageTextInput(name="input_value", display_name="Input Value", value="Hello, World!"), diff --git a/src/backend/base/langflow/components/helpers/FilterData.py b/src/backend/base/langflow/components/helpers/FilterData.py index 3e21c8d0cda..3832e4e84df 100644 --- a/src/backend/base/langflow/components/helpers/FilterData.py +++ b/src/backend/base/langflow/components/helpers/FilterData.py @@ -10,7 +10,7 @@ class FilterDataComponent(Component): description = "Filters a Data object based on a list of keys." icon = "filter" beta = True - name = 'FilterData' + name = "FilterData" inputs = [ DataInput( diff --git a/src/backend/base/langflow/components/helpers/IDGenerator.py b/src/backend/base/langflow/components/helpers/IDGenerator.py index 9fbd8fbfbfe..5dd5ebe90e5 100644 --- a/src/backend/base/langflow/components/helpers/IDGenerator.py +++ b/src/backend/base/langflow/components/helpers/IDGenerator.py @@ -8,7 +8,7 @@ class IDGeneratorComponent(CustomComponent): display_name = "ID Generator" description = "Generates a unique ID." - name = 'IDGenerator' + name = "IDGenerator" def update_build_config( # type: ignore self, build_config: dotdict, field_value: Any, field_name: Optional[str] = None diff --git a/src/backend/base/langflow/components/helpers/Memory.py b/src/backend/base/langflow/components/helpers/Memory.py index 74eff809789..db5fe6acc43 100644 --- a/src/backend/base/langflow/components/helpers/Memory.py +++ b/src/backend/base/langflow/components/helpers/Memory.py @@ -10,7 +10,7 @@ class MemoryComponent(Component): display_name = "Chat Memory" description = "Retrieves stored chat messages." icon = "message-square-more" - name = 'Memory' + name = "Memory" inputs = [ DropdownInput( diff --git a/src/backend/base/langflow/components/helpers/MergeData.py b/src/backend/base/langflow/components/helpers/MergeData.py index b83e273c7ad..9d4847f0868 100644 --- a/src/backend/base/langflow/components/helpers/MergeData.py +++ b/src/backend/base/langflow/components/helpers/MergeData.py @@ -6,7 +6,7 @@ class MergeDataComponent(CustomComponent): display_name = "Merge Data" description = "Combines multiple data sources into a single unified Data object." beta: bool = True - name = 'MergeData' + name = "MergeData" field_config = { "data": {"display_name": "Data"}, diff --git a/src/backend/base/langflow/components/helpers/ParseData.py b/src/backend/base/langflow/components/helpers/ParseData.py index 04c59bb4ec0..62f757d49cf 100644 --- a/src/backend/base/langflow/components/helpers/ParseData.py +++ b/src/backend/base/langflow/components/helpers/ParseData.py @@ -8,7 +8,7 @@ class ParseDataComponent(Component): display_name = "Parse Data" description = "Convert Data into plain text following a specified template." icon = "braces" - name = 'ParseData' + name = "ParseData" inputs = [ DataInput(name="data", display_name="Data", info="The data to convert to text."), diff --git a/src/backend/base/langflow/components/helpers/SplitText.py b/src/backend/base/langflow/components/helpers/SplitText.py index def81187519..88f911057e9 100644 --- a/src/backend/base/langflow/components/helpers/SplitText.py +++ b/src/backend/base/langflow/components/helpers/SplitText.py @@ -12,7 +12,7 @@ class SplitTextComponent(Component): display_name: str = "Split Text" description: str = "Split text into chunks based on specified criteria." icon = "scissors-line-dashed" - name = 'SplitText' + name = "SplitText" inputs = [ HandleInput( diff --git a/src/backend/base/langflow/components/helpers/StoreMessage.py b/src/backend/base/langflow/components/helpers/StoreMessage.py index 6229ee6604e..ce138bb9cb0 100644 --- a/src/backend/base/langflow/components/helpers/StoreMessage.py +++ b/src/backend/base/langflow/components/helpers/StoreMessage.py @@ -9,7 +9,7 @@ class StoreMessageComponent(Component): display_name = "Store Message" description = "Stores a chat message or text." icon = "save" - name = 'StoreMessage' + name = "StoreMessage" inputs = [ MessageInput(name="message", display_name="Message", info="The chat message to be stored.", required=True), diff --git a/src/backend/base/langflow/components/inputs/ChatInput.py b/src/backend/base/langflow/components/inputs/ChatInput.py index 9eeaa1f6379..b921b167378 100644 --- a/src/backend/base/langflow/components/inputs/ChatInput.py +++ b/src/backend/base/langflow/components/inputs/ChatInput.py @@ -8,7 +8,7 @@ class ChatInput(ChatComponent): display_name = "Chat Input" description = "Get chat inputs from the Playground." icon = "ChatInput" - name = 'ChatInput' + name = "ChatInput" inputs = [ MultilineInput( diff --git a/src/backend/base/langflow/components/inputs/TextInput.py b/src/backend/base/langflow/components/inputs/TextInput.py index 505b43fb7bf..6495f9ab63f 100644 --- a/src/backend/base/langflow/components/inputs/TextInput.py +++ b/src/backend/base/langflow/components/inputs/TextInput.py @@ -7,7 +7,7 @@ class TextInputComponent(TextComponent): display_name = "Text Input" description = "Get text inputs from the Playground." icon = "type" - name = 'TextInput' + name = "TextInput" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/langchain_utilities/BingSearchAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/BingSearchAPIWrapper.py index d84f0cf92c0..04520dd3349 100644 --- a/src/backend/base/langflow/components/langchain_utilities/BingSearchAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/BingSearchAPIWrapper.py @@ -9,7 +9,7 @@ class BingSearchAPIWrapperComponent(CustomComponent): display_name = "BingSearchAPIWrapper" description = "Wrapper for Bing Search API." - name = 'BingSearchAPIWrapper' + name = "BingSearchAPIWrapper" def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py b/src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py index 1889a991687..e152b797edc 100644 --- a/src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py +++ b/src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py @@ -8,7 +8,7 @@ class FirecrawlCrawlApi(CustomComponent): display_name: str = "FirecrawlCrawlApi" description: str = "Firecrawl Crawl API." - name = 'FirecrawlCrawlApi' + name = "FirecrawlCrawlApi" output_types: list[str] = ["Document"] documentation: str = "https://docs.firecrawl.dev/api-reference/endpoint/crawl" diff --git a/src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py b/src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py index 6d5a11ba4b1..9ed720a6770 100644 --- a/src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py +++ b/src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py @@ -7,7 +7,7 @@ class FirecrawlScrapeApi(CustomComponent): display_name: str = "FirecrawlScrapeApi" description: str = "Firecrawl Scrape API." - name = 'FirecrawlScrapeApi' + name = "FirecrawlScrapeApi" output_types: list[str] = ["Document"] documentation: str = "https://docs.firecrawl.dev/api-reference/endpoint/scrape" diff --git a/src/backend/base/langflow/components/langchain_utilities/GoogleSearchAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/GoogleSearchAPIWrapper.py index 3d698f89609..fe804961e3b 100644 --- a/src/backend/base/langflow/components/langchain_utilities/GoogleSearchAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/GoogleSearchAPIWrapper.py @@ -8,7 +8,7 @@ class GoogleSearchAPIWrapperComponent(CustomComponent): display_name = "GoogleSearchAPIWrapper" description = "Wrapper for Google Search API." - name = 'GoogleSearchAPIWrapper' + name = "GoogleSearchAPIWrapper" def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/GoogleSerperAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/GoogleSerperAPIWrapper.py index 9a302e01e8c..2f52614113b 100644 --- a/src/backend/base/langflow/components/langchain_utilities/GoogleSerperAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/GoogleSerperAPIWrapper.py @@ -10,7 +10,7 @@ class GoogleSerperAPIWrapperComponent(CustomComponent): display_name = "GoogleSerperAPIWrapper" description = "Wrapper around the Serper.dev Google Search API." - name = 'GoogleSerperAPIWrapper' + name = "GoogleSerperAPIWrapper" def build_config(self) -> Dict[str, Dict]: return { diff --git a/src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py b/src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py index 20a476e41de..e4d3300641d 100644 --- a/src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py +++ b/src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py @@ -20,7 +20,7 @@ class JSONDocumentBuilder(CustomComponent): display_name: str = "JSON Document Builder" description: str = "Build a Document containing a JSON object using a key and another Document page content." - name = 'JSONDocumentBuilder' + name = "JSONDocumentBuilder" output_types: list[str] = ["Document"] documentation: str = "https://docs.langflow.org/components/utilities#json-document-builder" diff --git a/src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py b/src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py index 9bd9fb7a6a7..e9c7565d6e4 100644 --- a/src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py +++ b/src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py @@ -6,7 +6,7 @@ class SQLDatabaseComponent(CustomComponent): display_name = "SQLDatabase" description = "SQL Database" - name = 'SQLDatabase' + name = "SQLDatabase" def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/SearchApi.py b/src/backend/base/langflow/components/langchain_utilities/SearchApi.py index 619e30c2b17..2b6f54de7a2 100644 --- a/src/backend/base/langflow/components/langchain_utilities/SearchApi.py +++ b/src/backend/base/langflow/components/langchain_utilities/SearchApi.py @@ -10,7 +10,7 @@ class SearchApi(CustomComponent): display_name: str = "SearchApi" description: str = "Real-time search engine results API." - name = 'SearchApi' + name = "SearchApi" output_types: list[str] = ["Document"] documentation: str = "https://www.searchapi.io/docs/google" diff --git a/src/backend/base/langflow/components/langchain_utilities/SearxSearchWrapper.py b/src/backend/base/langflow/components/langchain_utilities/SearxSearchWrapper.py index 97367f7bc57..90c1f6b5537 100644 --- a/src/backend/base/langflow/components/langchain_utilities/SearxSearchWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/SearxSearchWrapper.py @@ -8,7 +8,7 @@ class SearxSearchWrapperComponent(CustomComponent): display_name = "SearxSearchWrapper" description = "Wrapper for Searx API." - name = 'SearxSearchWrapper' + name = "SearxSearchWrapper" def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/SerpAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/SerpAPIWrapper.py index be113da7ae6..7bd8d911bcb 100644 --- a/src/backend/base/langflow/components/langchain_utilities/SerpAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/SerpAPIWrapper.py @@ -8,7 +8,7 @@ class SerpAPIWrapperComponent(CustomComponent): display_name = "SerpAPIWrapper" description = "Wrapper around SerpAPI" - name = 'SerpAPIWrapper' + name = "SerpAPIWrapper" def build_config(self): return { diff --git a/src/backend/base/langflow/components/langchain_utilities/WikipediaAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/WikipediaAPIWrapper.py index 0e510b33a0d..ef1485532cd 100644 --- a/src/backend/base/langflow/components/langchain_utilities/WikipediaAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/WikipediaAPIWrapper.py @@ -12,7 +12,7 @@ class WikipediaAPIWrapperComponent(CustomComponent): display_name = "WikipediaAPIWrapper" description = "Wrapper around WikipediaAPI." - name = 'WikipediaAPIWrapper' + name = "WikipediaAPIWrapper" def build_config(self): return {} diff --git a/src/backend/base/langflow/components/langchain_utilities/WolframAlphaAPIWrapper.py b/src/backend/base/langflow/components/langchain_utilities/WolframAlphaAPIWrapper.py index bf007937704..f8771d0ce57 100644 --- a/src/backend/base/langflow/components/langchain_utilities/WolframAlphaAPIWrapper.py +++ b/src/backend/base/langflow/components/langchain_utilities/WolframAlphaAPIWrapper.py @@ -11,7 +11,7 @@ class WolframAlphaAPIWrapperComponent(CustomComponent): display_name = "WolframAlphaAPIWrapper" description = "Wrapper for Wolfram Alpha." - name = 'WolframAlphaAPIWrapper' + name = "WolframAlphaAPIWrapper" def build_config(self): return {"appid": {"display_name": "App ID", "type": "str", "password": True}} diff --git a/src/backend/base/langflow/components/memories/AstraDBMessageReader.py b/src/backend/base/langflow/components/memories/AstraDBMessageReader.py index 060e17af962..52cdccdca15 100644 --- a/src/backend/base/langflow/components/memories/AstraDBMessageReader.py +++ b/src/backend/base/langflow/components/memories/AstraDBMessageReader.py @@ -7,7 +7,7 @@ class AstraDBMessageReaderComponent(BaseMemoryComponent): display_name = "Astra DB Message Reader" description = "Retrieves stored chat messages from Astra DB." - name = 'AstraDBMessageReader' + name = "AstraDBMessageReader" def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/AstraDBMessageWriter.py b/src/backend/base/langflow/components/memories/AstraDBMessageWriter.py index 75638707418..b36b32882e6 100644 --- a/src/backend/base/langflow/components/memories/AstraDBMessageWriter.py +++ b/src/backend/base/langflow/components/memories/AstraDBMessageWriter.py @@ -9,7 +9,7 @@ class AstraDBMessageWriterComponent(BaseMemoryComponent): display_name = "Astra DB Message Writer" description = "Writes a message to Astra DB." - name = 'AstraDBMessageWriter' + name = "AstraDBMessageWriter" def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/CassandraMessageReader.py b/src/backend/base/langflow/components/memories/CassandraMessageReader.py index 0c87ed313fc..889be0a9a02 100644 --- a/src/backend/base/langflow/components/memories/CassandraMessageReader.py +++ b/src/backend/base/langflow/components/memories/CassandraMessageReader.py @@ -9,7 +9,7 @@ class CassandraMessageReaderComponent(BaseMemoryComponent): display_name = "Cassandra Message Reader" description = "Retrieves stored chat messages from a Cassandra table on Astra DB." - name = 'CassandraMessageReader' + name = "CassandraMessageReader" def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/CassandraMessageWriter.py b/src/backend/base/langflow/components/memories/CassandraMessageWriter.py index 89a9f9966a8..33ca0fed1f1 100644 --- a/src/backend/base/langflow/components/memories/CassandraMessageWriter.py +++ b/src/backend/base/langflow/components/memories/CassandraMessageWriter.py @@ -10,7 +10,7 @@ class CassandraMessageWriterComponent(BaseMemoryComponent): display_name = "Cassandra Message Writer" description = "Writes a message to a Cassandra table on Astra DB." - name = 'CassandraMessageWriter' + name = "CassandraMessageWriter" def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/ZepMessageReader.py b/src/backend/base/langflow/components/memories/ZepMessageReader.py index 43f6ca45d07..93570679461 100644 --- a/src/backend/base/langflow/components/memories/ZepMessageReader.py +++ b/src/backend/base/langflow/components/memories/ZepMessageReader.py @@ -10,7 +10,7 @@ class ZepMessageReaderComponent(BaseMemoryComponent): display_name = "Zep Message Reader" description = "Retrieves stored chat messages from Zep." - name = 'ZepMessageReader' + name = "ZepMessageReader" def build_config(self): return { diff --git a/src/backend/base/langflow/components/memories/ZepMessageWriter.py b/src/backend/base/langflow/components/memories/ZepMessageWriter.py index 25e89b6b538..82382e70172 100644 --- a/src/backend/base/langflow/components/memories/ZepMessageWriter.py +++ b/src/backend/base/langflow/components/memories/ZepMessageWriter.py @@ -11,7 +11,7 @@ class ZepMessageWriterComponent(BaseMemoryComponent): display_name = "Zep Message Writer" description = "Writes a message to Zep." - name = 'ZepMessageWriter' + name = "ZepMessageWriter" def build_config(self): return { diff --git a/src/backend/base/langflow/components/models/AmazonBedrockModel.py b/src/backend/base/langflow/components/models/AmazonBedrockModel.py index 68afed57549..d21546502be 100644 --- a/src/backend/base/langflow/components/models/AmazonBedrockModel.py +++ b/src/backend/base/langflow/components/models/AmazonBedrockModel.py @@ -11,7 +11,7 @@ class AmazonBedrockComponent(LCModelComponent): display_name: str = "Amazon Bedrock" description: str = "Generate text using Amazon Bedrock LLMs." icon = "Amazon" - name = 'AmazonBedrockModel' + name = "AmazonBedrockModel" inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/AnthropicModel.py b/src/backend/base/langflow/components/models/AnthropicModel.py index 5955076ec02..0972dd57747 100644 --- a/src/backend/base/langflow/components/models/AnthropicModel.py +++ b/src/backend/base/langflow/components/models/AnthropicModel.py @@ -11,7 +11,7 @@ class AnthropicModelComponent(LCModelComponent): display_name = "Anthropic" description = "Generate text using Anthropic Chat&Completion LLMs with prefill support." icon = "Anthropic" - name = 'AnthropicModel' + name = "AnthropicModel" inputs = [ MessageTextInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/AzureOpenAIModel.py b/src/backend/base/langflow/components/models/AzureOpenAIModel.py index f55bfdba053..57b488cfae7 100644 --- a/src/backend/base/langflow/components/models/AzureOpenAIModel.py +++ b/src/backend/base/langflow/components/models/AzureOpenAIModel.py @@ -12,7 +12,7 @@ class AzureChatOpenAIComponent(LCModelComponent): documentation: str = "https://python.langchain.com/docs/integrations/llms/azure_openai" beta = False icon = "Azure" - name = 'AzureOpenAIModel' + name = "AzureOpenAIModel" AZURE_OPENAI_API_VERSIONS = [ "2023-03-15-preview", diff --git a/src/backend/base/langflow/components/models/BaiduQianfanChatModel.py b/src/backend/base/langflow/components/models/BaiduQianfanChatModel.py index 7e01022964e..15ede57f7a3 100644 --- a/src/backend/base/langflow/components/models/BaiduQianfanChatModel.py +++ b/src/backend/base/langflow/components/models/BaiduQianfanChatModel.py @@ -12,7 +12,7 @@ class QianfanChatEndpointComponent(LCModelComponent): description: str = "Generate text using Baidu Qianfan LLMs." documentation: str = "https://python.langchain.com/docs/integrations/chat/baidu_qianfan_endpoint" icon = "BaiduQianfan" - name = 'BaiduQianfanChatModel' + name = "BaiduQianfanChatModel" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/models/CohereModel.py b/src/backend/base/langflow/components/models/CohereModel.py index 6e3832d30ed..890f916061a 100644 --- a/src/backend/base/langflow/components/models/CohereModel.py +++ b/src/backend/base/langflow/components/models/CohereModel.py @@ -12,7 +12,7 @@ class CohereComponent(LCModelComponent): description = "Generate text using Cohere LLMs." documentation = "https://python.langchain.com/docs/modules/model_io/models/llms/integrations/cohere" icon = "Cohere" - name = 'CohereModel' + name = "CohereModel" inputs = [ SecretStrInput( diff --git a/src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py b/src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py index e95c8db77a9..e20f3150c1e 100644 --- a/src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py +++ b/src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py @@ -10,7 +10,7 @@ class GoogleGenerativeAIComponent(LCModelComponent): display_name = "Google Generative AI" description = "Generate text using Google Generative AI." icon = "GoogleGenerativeAI" - name = 'GoogleGenerativeAIModel' + name = "GoogleGenerativeAIModel" inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/GroqModel.py b/src/backend/base/langflow/components/models/GroqModel.py index 7818095b17b..d24ba3cf622 100644 --- a/src/backend/base/langflow/components/models/GroqModel.py +++ b/src/backend/base/langflow/components/models/GroqModel.py @@ -12,7 +12,7 @@ class GroqModel(LCModelComponent): display_name: str = "Groq" description: str = "Generate text using Groq." icon = "Groq" - name = 'GroqModel' + name = "GroqModel" inputs = [ SecretStrInput( diff --git a/src/backend/base/langflow/components/models/HuggingFaceModel.py b/src/backend/base/langflow/components/models/HuggingFaceModel.py index 88bad04daa3..6995eb76502 100644 --- a/src/backend/base/langflow/components/models/HuggingFaceModel.py +++ b/src/backend/base/langflow/components/models/HuggingFaceModel.py @@ -11,7 +11,7 @@ class HuggingFaceEndpointsComponent(LCModelComponent): display_name: str = "Hugging Face API" description: str = "Generate text using Hugging Face Inference APIs." icon = "HuggingFace" - name = 'HuggingFaceModel' + name = "HuggingFaceModel" inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/MistralModel.py b/src/backend/base/langflow/components/models/MistralModel.py index 4dc6b3f8133..3aa9fcb3a4f 100644 --- a/src/backend/base/langflow/components/models/MistralModel.py +++ b/src/backend/base/langflow/components/models/MistralModel.py @@ -11,7 +11,7 @@ class MistralAIModelComponent(LCModelComponent): display_name = "MistralAI" description = "Generates text using MistralAI LLMs." icon = "MistralAI" - name = 'MistralModel' + name = "MistralModel" inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/OllamaModel.py b/src/backend/base/langflow/components/models/OllamaModel.py index 4b9590c5ec7..3419aace27a 100644 --- a/src/backend/base/langflow/components/models/OllamaModel.py +++ b/src/backend/base/langflow/components/models/OllamaModel.py @@ -13,7 +13,7 @@ class ChatOllamaComponent(LCModelComponent): display_name = "Ollama" description = "Generate text using Ollama Local LLMs." icon = "Ollama" - name = 'OllamaModel' + name = "OllamaModel" def update_build_config(self, build_config: dict, field_value: Any, field_name: str | None = None): if field_name == "mirostat": diff --git a/src/backend/base/langflow/components/models/OpenAIModel.py b/src/backend/base/langflow/components/models/OpenAIModel.py index 7154101c969..9c5fc1d4832 100644 --- a/src/backend/base/langflow/components/models/OpenAIModel.py +++ b/src/backend/base/langflow/components/models/OpenAIModel.py @@ -24,7 +24,7 @@ class OpenAIModelComponent(LCModelComponent): display_name = "OpenAI" description = "Generates text using OpenAI LLMs." icon = "OpenAI" - name = 'OpenAIModel' + name = "OpenAIModel" inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/models/VertexAiModel.py b/src/backend/base/langflow/components/models/VertexAiModel.py index 8ed3e66d14d..32cb8f51dd0 100644 --- a/src/backend/base/langflow/components/models/VertexAiModel.py +++ b/src/backend/base/langflow/components/models/VertexAiModel.py @@ -10,7 +10,7 @@ class ChatVertexAIComponent(LCModelComponent): display_name = "Vertex AI" description = "Generate text using Vertex AI LLMs." icon = "VertexAI" - name = 'VertexAiModel' + name = "VertexAiModel" inputs = [ MessageInput(name="input_value", display_name="Input"), diff --git a/src/backend/base/langflow/components/outputs/ChatOutput.py b/src/backend/base/langflow/components/outputs/ChatOutput.py index 3f4710ae6f6..e1f40ec7639 100644 --- a/src/backend/base/langflow/components/outputs/ChatOutput.py +++ b/src/backend/base/langflow/components/outputs/ChatOutput.py @@ -7,7 +7,7 @@ class ChatOutput(ChatComponent): display_name = "Chat Output" description = "Display a chat message in the Playground." icon = "ChatOutput" - name = 'ChatOutput' + name = "ChatOutput" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/outputs/TextOutput.py b/src/backend/base/langflow/components/outputs/TextOutput.py index 80790161822..ee8276b42b7 100644 --- a/src/backend/base/langflow/components/outputs/TextOutput.py +++ b/src/backend/base/langflow/components/outputs/TextOutput.py @@ -7,7 +7,7 @@ class TextOutputComponent(TextComponent): display_name = "Text Output" description = "Display a text output in the Playground." icon = "type" - name = 'TextOutput' + name = "TextOutput" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/prompts/Prompt.py b/src/backend/base/langflow/components/prompts/Prompt.py index 4fa1687faa3..c102fba3b5a 100644 --- a/src/backend/base/langflow/components/prompts/Prompt.py +++ b/src/backend/base/langflow/components/prompts/Prompt.py @@ -10,7 +10,7 @@ class PromptComponent(Component): description: str = "Create a prompt template with dynamic variables." icon = "prompts" trace_type = "prompt" - name = 'Prompt' + name = "Prompt" inputs = [ PromptInput(name="template", display_name="Template"), diff --git a/src/backend/base/langflow/components/prototypes/ConditionalRouter.py b/src/backend/base/langflow/components/prototypes/ConditionalRouter.py index c2ddce4787d..133a84867e3 100644 --- a/src/backend/base/langflow/components/prototypes/ConditionalRouter.py +++ b/src/backend/base/langflow/components/prototypes/ConditionalRouter.py @@ -7,7 +7,7 @@ class ConditionalRouterComponent(Component): display_name = "Conditional Router" description = "Routes an input message to a corresponding output based on text comparison." icon = "equal" - name = 'ConditionalRouter' + name = "ConditionalRouter" inputs = [ MessageTextInput( diff --git a/src/backend/base/langflow/components/prototypes/CreateData.py b/src/backend/base/langflow/components/prototypes/CreateData.py index 8f7e18d2505..17a75962b73 100644 --- a/src/backend/base/langflow/components/prototypes/CreateData.py +++ b/src/backend/base/langflow/components/prototypes/CreateData.py @@ -13,7 +13,7 @@ class CreateDataComponent(Component): display_name: str = "Create Data" description: str = "Dynamically create a Data with a specified number of fields." - name: str = 'CreateData' + name: str = "CreateData" inputs = [ IntInput( diff --git a/src/backend/base/langflow/components/prototypes/FlowTool.py b/src/backend/base/langflow/components/prototypes/FlowTool.py index 39dae746122..d4a038e6f30 100644 --- a/src/backend/base/langflow/components/prototypes/FlowTool.py +++ b/src/backend/base/langflow/components/prototypes/FlowTool.py @@ -16,7 +16,7 @@ class FlowToolComponent(CustomComponent): description = "Construct a Tool from a function that runs the loaded Flow." field_order = ["flow_name", "name", "description", "return_direct"] trace_type = "tool" - name = 'FlowTool' + name = "FlowTool" beta = True def get_flow_names(self) -> List[str]: diff --git a/src/backend/base/langflow/components/prototypes/Listen.py b/src/backend/base/langflow/components/prototypes/Listen.py index d08e527421b..23b9c3ee13d 100644 --- a/src/backend/base/langflow/components/prototypes/Listen.py +++ b/src/backend/base/langflow/components/prototypes/Listen.py @@ -5,7 +5,7 @@ class ListenComponent(CustomComponent): display_name = "Listen" description = "A component to listen for a notification." - name = 'Listen' + name = "Listen" beta: bool = True def build_config(self): diff --git a/src/backend/base/langflow/components/prototypes/Notify.py b/src/backend/base/langflow/components/prototypes/Notify.py index 89c1f02af6a..c07baae34eb 100644 --- a/src/backend/base/langflow/components/prototypes/Notify.py +++ b/src/backend/base/langflow/components/prototypes/Notify.py @@ -8,7 +8,7 @@ class NotifyComponent(CustomComponent): display_name = "Notify" description = "A component to generate a notification to Get Notified component." icon = "Notify" - name = 'Notify' + name = "Notify" beta: bool = True def build_config(self): diff --git a/src/backend/base/langflow/components/prototypes/Pass.py b/src/backend/base/langflow/components/prototypes/Pass.py index 98fe9dd2971..ae527976c1c 100644 --- a/src/backend/base/langflow/components/prototypes/Pass.py +++ b/src/backend/base/langflow/components/prototypes/Pass.py @@ -7,7 +7,7 @@ class PassMessageComponent(Component): display_name = "Pass" description = "Forwards the input message, unchanged." - name = 'Pass' + name = "Pass" icon = "arrow-right" inputs = [ diff --git a/src/backend/base/langflow/components/prototypes/PythonFunction.py b/src/backend/base/langflow/components/prototypes/PythonFunction.py index 21d6f125d3c..bc5576f89c3 100644 --- a/src/backend/base/langflow/components/prototypes/PythonFunction.py +++ b/src/backend/base/langflow/components/prototypes/PythonFunction.py @@ -9,7 +9,7 @@ class PythonFunctionComponent(CustomComponent): display_name = "Python Function" description = "Define a Python function." icon = "Python" - name = 'PythonFunction' + name = "PythonFunction" beta = True def build_config(self): diff --git a/src/backend/base/langflow/components/prototypes/RunFlow.py b/src/backend/base/langflow/components/prototypes/RunFlow.py index 3c2c0d02d9b..2114cdc557b 100644 --- a/src/backend/base/langflow/components/prototypes/RunFlow.py +++ b/src/backend/base/langflow/components/prototypes/RunFlow.py @@ -10,7 +10,7 @@ class RunFlowComponent(CustomComponent): display_name = "Run Flow" description = "A component to run a flow." - name = 'RunFlow' + name = "RunFlow" beta: bool = True def get_flow_names(self) -> List[str]: diff --git a/src/backend/base/langflow/components/prototypes/RunnableExecutor.py b/src/backend/base/langflow/components/prototypes/RunnableExecutor.py index a8920cfab44..ab85e1e9c86 100644 --- a/src/backend/base/langflow/components/prototypes/RunnableExecutor.py +++ b/src/backend/base/langflow/components/prototypes/RunnableExecutor.py @@ -7,7 +7,7 @@ class RunnableExecComponent(CustomComponent): description = "Execute a runnable. It will try to guess the input and output keys." display_name = "Runnable Executor" - name = 'RunnableExecutor' + name = "RunnableExecutor" beta: bool = True field_order = [ "input_key", diff --git a/src/backend/base/langflow/components/prototypes/SQLExecutor.py b/src/backend/base/langflow/components/prototypes/SQLExecutor.py index 472ffecbbba..cafc92fb409 100644 --- a/src/backend/base/langflow/components/prototypes/SQLExecutor.py +++ b/src/backend/base/langflow/components/prototypes/SQLExecutor.py @@ -8,7 +8,7 @@ class SQLExecutorComponent(CustomComponent): display_name = "SQL Executor" description = "Execute SQL query." - name = 'SQLExecutor' + name = "SQLExecutor" beta: bool = True def build_config(self): diff --git a/src/backend/base/langflow/components/prototypes/SubFlow.py b/src/backend/base/langflow/components/prototypes/SubFlow.py index 1ec4c36f2d5..f3f0b46232f 100644 --- a/src/backend/base/langflow/components/prototypes/SubFlow.py +++ b/src/backend/base/langflow/components/prototypes/SubFlow.py @@ -17,7 +17,7 @@ class SubFlowComponent(CustomComponent): description = ( "Dynamically Generates a Component from a Flow. The output is a list of data with keys 'result' and 'message'." ) - name = 'SubFlow' + name = "SubFlow" beta: bool = True field_order = ["flow_name"] diff --git a/src/backend/base/langflow/components/prototypes/UpdateData.py b/src/backend/base/langflow/components/prototypes/UpdateData.py index 625fd9ae20a..10355d2df22 100644 --- a/src/backend/base/langflow/components/prototypes/UpdateData.py +++ b/src/backend/base/langflow/components/prototypes/UpdateData.py @@ -5,7 +5,7 @@ class UpdateDataComponent(CustomComponent): display_name = "Update Data" description = "Update Data with text-based key/value pairs, similar to updating a Python dictionary." - name = 'UpdateData' + name = "UpdateData" def build_config(self): return { diff --git a/src/backend/base/langflow/components/retrievers/AmazonKendra.py b/src/backend/base/langflow/components/retrievers/AmazonKendra.py index 916ec997af8..8c4252c2648 100644 --- a/src/backend/base/langflow/components/retrievers/AmazonKendra.py +++ b/src/backend/base/langflow/components/retrievers/AmazonKendra.py @@ -9,7 +9,7 @@ class AmazonKendraRetrieverComponent(CustomComponent): display_name: str = "Amazon Kendra Retriever" description: str = "Retriever that uses the Amazon Kendra API." - name = 'AmazonKendra' + name = "AmazonKendra" icon = "Amazon" def build_config(self): diff --git a/src/backend/base/langflow/components/retrievers/CohereRerank.py b/src/backend/base/langflow/components/retrievers/CohereRerank.py index 741ab947509..f7f22e4a171 100644 --- a/src/backend/base/langflow/components/retrievers/CohereRerank.py +++ b/src/backend/base/langflow/components/retrievers/CohereRerank.py @@ -12,7 +12,7 @@ class CohereRerankComponent(LCVectorStoreComponent): display_name = "Cohere Rerank" description = "Rerank documents using the Cohere API and a retriever." - name = 'CohereRerank' + name = "CohereRerank" icon = "Cohere" inputs = [ diff --git a/src/backend/base/langflow/components/retrievers/MetalRetriever.py b/src/backend/base/langflow/components/retrievers/MetalRetriever.py index 65fd6ea9dd7..f5ce37d05e1 100644 --- a/src/backend/base/langflow/components/retrievers/MetalRetriever.py +++ b/src/backend/base/langflow/components/retrievers/MetalRetriever.py @@ -10,7 +10,7 @@ class MetalRetrieverComponent(CustomComponent): display_name: str = "Metal Retriever" description: str = "Retriever that uses the Metal API." - name = 'MetalRetriever' + name = "MetalRetriever" def build_config(self): return { diff --git a/src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py b/src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py index aa4ff0ba44c..c662f701e33 100644 --- a/src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py +++ b/src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py @@ -10,7 +10,7 @@ class MultiQueryRetrieverComponent(CustomComponent): display_name = "MultiQueryRetriever" description = "Initialize from llm using default template." documentation = "https://python.langchain.com/docs/modules/data_connection/retrievers/how_to/MultiQueryRetriever" - name = 'MultiQueryRetriever' + name = "MultiQueryRetriever" def build_config(self): return { diff --git a/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py b/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py index 20ac0c9d4b5..405e8fc70b7 100644 --- a/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py +++ b/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py @@ -12,7 +12,7 @@ class SelfQueryRetrieverComponent(CustomComponent): display_name: str = "Self Query Retriever" description: str = "Retriever that uses a vector store and an LLM to generate the vector store queries." - name = 'SelfQueryRetriever' + name = "SelfQueryRetriever" icon = "LangChain" def build_config(self): diff --git a/src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py b/src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py index d426b1aed6d..d8580b55a3e 100644 --- a/src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py +++ b/src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py @@ -18,7 +18,7 @@ class VectaraSelfQueryRetriverComponent(CustomComponent): display_name: str = "Vectara Self Query Retriever for Vectara Vector Store" description: str = "Implementation of Vectara Self Query Retriever" documentation = "https://python.langchain.com/docs/integrations/retrievers/self_query/vectara_self_query" - name = 'VectaraSelfQueryRetriver' + name = "VectaraSelfQueryRetriver" icon = "Vectara" field_config = { diff --git a/src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py b/src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py index 9fdf26e0bbd..b4ef2c84649 100644 --- a/src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py +++ b/src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py @@ -7,7 +7,7 @@ class VectoStoreRetrieverComponent(CustomComponent): display_name = "VectorStore Retriever" description = "A vector store retriever" - name = 'VectorStoreRetriever' + name = "VectorStoreRetriever" def build_config(self): return { diff --git a/src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py b/src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py index addb0e23896..1a17b0cf72e 100644 --- a/src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py +++ b/src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py @@ -10,7 +10,7 @@ class CharacterTextSplitterComponent(CustomComponent): display_name = "CharacterTextSplitter" description = "Splitting text that looks at characters." - name = 'CharacterTextSplitter' + name = "CharacterTextSplitter" def build_config(self): return { diff --git a/src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py b/src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py index 7c8137fd3eb..39988aafa3c 100644 --- a/src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py +++ b/src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py @@ -10,7 +10,7 @@ class LanguageRecursiveTextSplitterComponent(CustomComponent): display_name: str = "Language Recursive Text Splitter" description: str = "Split text into chunks of a specified length based on language." documentation: str = "https://docs.langflow.org/components/text-splitters#languagerecursivetextsplitter" - name = 'LanguageRecursiveTextSplitter' + name = "LanguageRecursiveTextSplitter" def build_config(self): options = [x.value for x in Language] diff --git a/src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py b/src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py index 08fbb53332a..02aba8a666a 100644 --- a/src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py +++ b/src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py @@ -11,7 +11,7 @@ class RecursiveCharacterTextSplitterComponent(Component): display_name: str = "Recursive Character Text Splitter" description: str = "Split text into chunks of a specified length." documentation: str = "https://docs.langflow.org/components/text-splitters#recursivecharactertextsplitter" - name = 'RecursiveCharacterTextSplitter' + name = "RecursiveCharacterTextSplitter" inputs = [ IntInput( diff --git a/src/backend/base/langflow/components/toolkits/JsonToolkit.py b/src/backend/base/langflow/components/toolkits/JsonToolkit.py index 52a0e4b0c0d..96dc3324853 100644 --- a/src/backend/base/langflow/components/toolkits/JsonToolkit.py +++ b/src/backend/base/langflow/components/toolkits/JsonToolkit.py @@ -10,7 +10,7 @@ class JsonToolkitComponent(CustomComponent): display_name = "JsonToolkit" description = "Toolkit for interacting with a JSON spec." - name = 'JsonToolkit' + name = "JsonToolkit" def build_config(self): return { diff --git a/src/backend/base/langflow/components/toolkits/Metaphor.py b/src/backend/base/langflow/components/toolkits/Metaphor.py index 96b3f5bf99a..73c7645120a 100644 --- a/src/backend/base/langflow/components/toolkits/Metaphor.py +++ b/src/backend/base/langflow/components/toolkits/Metaphor.py @@ -12,7 +12,7 @@ class MetaphorToolkit(CustomComponent): description: str = "Metaphor Toolkit" documentation = "https://python.langchain.com/docs/integrations/tools/metaphor_search" beta: bool = True - name = 'Metaphor' + name = "Metaphor" # api key should be password = True field_config = { "metaphor_api_key": {"display_name": "Metaphor API Key", "password": True}, diff --git a/src/backend/base/langflow/components/toolkits/OpenAPIToolkit.py b/src/backend/base/langflow/components/toolkits/OpenAPIToolkit.py index eb11f88faf5..5a72c7f2f3c 100644 --- a/src/backend/base/langflow/components/toolkits/OpenAPIToolkit.py +++ b/src/backend/base/langflow/components/toolkits/OpenAPIToolkit.py @@ -12,7 +12,7 @@ class OpenAPIToolkitComponent(CustomComponent): display_name = "OpenAPIToolkit" description = "Toolkit for interacting with an OpenAPI API." - name = 'OpenAPIToolkit' + name = "OpenAPIToolkit" def build_config(self): return { diff --git a/src/backend/base/langflow/components/toolkits/VectorStoreInfo.py b/src/backend/base/langflow/components/toolkits/VectorStoreInfo.py index c2a092757eb..c1c47e45f02 100644 --- a/src/backend/base/langflow/components/toolkits/VectorStoreInfo.py +++ b/src/backend/base/langflow/components/toolkits/VectorStoreInfo.py @@ -7,7 +7,7 @@ class VectorStoreInfoComponent(CustomComponent): display_name = "VectorStoreInfo" description = "Information about a VectorStore" - name = 'VectorStoreInfo' + name = "VectorStoreInfo" def build_config(self): return { diff --git a/src/backend/base/langflow/components/toolkits/VectorStoreRouterToolkit.py b/src/backend/base/langflow/components/toolkits/VectorStoreRouterToolkit.py index 10dcaddfba1..0676312a2de 100644 --- a/src/backend/base/langflow/components/toolkits/VectorStoreRouterToolkit.py +++ b/src/backend/base/langflow/components/toolkits/VectorStoreRouterToolkit.py @@ -9,7 +9,7 @@ class VectorStoreRouterToolkitComponent(CustomComponent): display_name = "VectorStoreRouterToolkit" description = "Toolkit for routing between Vector Stores." - name = 'VectorStoreRouterToolkit' + name = "VectorStoreRouterToolkit" def build_config(self): return { diff --git a/src/backend/base/langflow/components/toolkits/VectorStoreToolkit.py b/src/backend/base/langflow/components/toolkits/VectorStoreToolkit.py index 6c6ce57554f..74fe5d33c26 100644 --- a/src/backend/base/langflow/components/toolkits/VectorStoreToolkit.py +++ b/src/backend/base/langflow/components/toolkits/VectorStoreToolkit.py @@ -9,7 +9,7 @@ class VectorStoreToolkitComponent(CustomComponent): display_name = "VectorStoreToolkit" description = "Toolkit for interacting with a Vector Store." - name = 'VectorStoreToolkit' + name = "VectorStoreToolkit" def build_config(self): return { diff --git a/src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py b/src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py index 53f9c6a1862..ef3c3b8a854 100644 --- a/src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py +++ b/src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py @@ -12,7 +12,7 @@ class PythonCodeStructuredTool(CustomComponent): display_name = "PythonCodeTool" description = "structuredtool dataclass code to tool" documentation = "https://python.langchain.com/docs/modules/tools/custom_tools/#structuredtool-dataclass" - name = 'PythonCodeStructuredTool' + name = "PythonCodeStructuredTool" icon = "🐍" field_order = ["name", "description", "tool_code", "return_direct", "tool_function", "tool_class"] diff --git a/src/backend/base/langflow/components/tools/PythonREPLTool.py b/src/backend/base/langflow/components/tools/PythonREPLTool.py index 2a87f03aad0..070630a7588 100644 --- a/src/backend/base/langflow/components/tools/PythonREPLTool.py +++ b/src/backend/base/langflow/components/tools/PythonREPLTool.py @@ -9,7 +9,7 @@ class PythonREPLToolComponent(CustomComponent): display_name = "Python REPL Tool" description = "A tool for running Python code in a REPL environment." - name = 'PythonREPLTool' + name = "PythonREPLTool" def build_config(self): return { diff --git a/src/backend/base/langflow/components/tools/RetrieverTool.py b/src/backend/base/langflow/components/tools/RetrieverTool.py index d009cdb3f71..6a87bcbf983 100644 --- a/src/backend/base/langflow/components/tools/RetrieverTool.py +++ b/src/backend/base/langflow/components/tools/RetrieverTool.py @@ -7,7 +7,7 @@ class RetrieverToolComponent(CustomComponent): display_name = "RetrieverTool" description = "Tool for interacting with retriever" - name = 'RetrieverTool' + name = "RetrieverTool" def build_config(self): return { diff --git a/src/backend/base/langflow/components/tools/SearchAPITool.py b/src/backend/base/langflow/components/tools/SearchAPITool.py index c8a0afee86a..3c8058ee9e7 100644 --- a/src/backend/base/langflow/components/tools/SearchAPITool.py +++ b/src/backend/base/langflow/components/tools/SearchAPITool.py @@ -8,7 +8,7 @@ class SearchApiToolComponent(CustomComponent): display_name: str = "SearchApi Tool" description: str = "Real-time search engine results API." - name = 'SearchAPITool' + name = "SearchAPITool" documentation: str = "https://www.searchapi.io/docs/google" field_config = { "engine": { diff --git a/src/backend/base/langflow/components/tools/SearchApi.py b/src/backend/base/langflow/components/tools/SearchApi.py index 619e30c2b17..2b6f54de7a2 100644 --- a/src/backend/base/langflow/components/tools/SearchApi.py +++ b/src/backend/base/langflow/components/tools/SearchApi.py @@ -10,7 +10,7 @@ class SearchApi(CustomComponent): display_name: str = "SearchApi" description: str = "Real-time search engine results API." - name = 'SearchApi' + name = "SearchApi" output_types: list[str] = ["Document"] documentation: str = "https://www.searchapi.io/docs/google" diff --git a/src/backend/base/langflow/components/vectorstores/AstraDB.py b/src/backend/base/langflow/components/vectorstores/AstraDB.py index 186daa9524e..6ed4ec7ab96 100644 --- a/src/backend/base/langflow/components/vectorstores/AstraDB.py +++ b/src/backend/base/langflow/components/vectorstores/AstraDB.py @@ -21,7 +21,7 @@ class AstraVectorStoreComponent(LCVectorStoreComponent): display_name: str = "Astra DB" description: str = "Implementation of Vector Store using Astra DB with search capabilities" documentation: str = "https://python.langchain.com/docs/integrations/vectorstores/astradb" - name = 'AstraDB' + name = "AstraDB" icon: str = "AstraDB" _cached_vectorstore: VectorStore | None = None diff --git a/src/backend/base/langflow/components/vectorstores/Cassandra.py b/src/backend/base/langflow/components/vectorstores/Cassandra.py index 03377289cfe..746783af97d 100644 --- a/src/backend/base/langflow/components/vectorstores/Cassandra.py +++ b/src/backend/base/langflow/components/vectorstores/Cassandra.py @@ -22,7 +22,7 @@ class CassandraVectorStoreComponent(LCVectorStoreComponent): display_name = "Cassandra" description = "Cassandra Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/cassandra" - name = 'Cassandra' + name = "Cassandra" icon = "Cassandra" _cached_vectorstore: Cassandra | None = None diff --git a/src/backend/base/langflow/components/vectorstores/Chroma.py b/src/backend/base/langflow/components/vectorstores/Chroma.py index 0315fb28aff..aa666f429ff 100644 --- a/src/backend/base/langflow/components/vectorstores/Chroma.py +++ b/src/backend/base/langflow/components/vectorstores/Chroma.py @@ -22,7 +22,7 @@ class ChromaVectorStoreComponent(LCVectorStoreComponent): display_name: str = "Chroma DB" description: str = "Chroma Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/integrations/vectorstores/chroma" - name = 'Chroma' + name = "Chroma" icon = "Chroma" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Couchbase.py b/src/backend/base/langflow/components/vectorstores/Couchbase.py index 0f66be78114..8adf642c4dd 100644 --- a/src/backend/base/langflow/components/vectorstores/Couchbase.py +++ b/src/backend/base/langflow/components/vectorstores/Couchbase.py @@ -13,7 +13,7 @@ class CouchbaseVectorStoreComponent(LCVectorStoreComponent): display_name = "Couchbase" description = "Couchbase Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.1/docs/integrations/document_loaders/couchbase/" - name = 'Couchbase' + name = "Couchbase" icon = "Couchbase" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/FAISS.py b/src/backend/base/langflow/components/vectorstores/FAISS.py index 76056c8cccc..68aa148d0fa 100644 --- a/src/backend/base/langflow/components/vectorstores/FAISS.py +++ b/src/backend/base/langflow/components/vectorstores/FAISS.py @@ -17,7 +17,7 @@ class FaissVectorStoreComponent(LCVectorStoreComponent): display_name: str = "FAISS" description: str = "FAISS Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/faiss" - name = 'FAISS' + name = "FAISS" icon = "FAISS" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py b/src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py index 0ae6840ec88..c3bb0666fc8 100644 --- a/src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py +++ b/src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py @@ -12,7 +12,7 @@ class MongoVectorStoreComponent(LCVectorStoreComponent): display_name = "MongoDB Atlas" description = "MongoDB Atlas Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/mongodb_atlas" - name = 'MongoDBAtlasVector' + name = "MongoDBAtlasVector" icon = "MongoDB" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Pinecone.py b/src/backend/base/langflow/components/vectorstores/Pinecone.py index 4b2d08e934a..e09711d0878 100644 --- a/src/backend/base/langflow/components/vectorstores/Pinecone.py +++ b/src/backend/base/langflow/components/vectorstores/Pinecone.py @@ -20,7 +20,7 @@ class PineconeVectorStoreComponent(LCVectorStoreComponent): display_name = "Pinecone" description = "Pinecone Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.2/docs/integrations/vectorstores/pinecone/" - name = 'Pinecone' + name = "Pinecone" icon = "Pinecone" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Qdrant.py b/src/backend/base/langflow/components/vectorstores/Qdrant.py index a30eeb53522..bf106cd5166 100644 --- a/src/backend/base/langflow/components/vectorstores/Qdrant.py +++ b/src/backend/base/langflow/components/vectorstores/Qdrant.py @@ -21,7 +21,7 @@ class QdrantVectorStoreComponent(LCVectorStoreComponent): display_name = "Qdrant" description = "Qdrant Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/qdrant" - name = 'Qdrant' + name = "Qdrant" icon = "Qdrant" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Redis.py b/src/backend/base/langflow/components/vectorstores/Redis.py index 5974fad1110..43c50de2b35 100644 --- a/src/backend/base/langflow/components/vectorstores/Redis.py +++ b/src/backend/base/langflow/components/vectorstores/Redis.py @@ -17,7 +17,7 @@ class RedisVectorStoreComponent(LCVectorStoreComponent): display_name: str = "Redis" description: str = "Implementation of Vector Store using Redis" documentation = "https://python.langchain.com/docs/integrations/vectorstores/redis" - name = 'Redis' + name = "Redis" inputs = [ SecretStrInput(name="redis_server_url", display_name="Redis Server Connection String", required=True), diff --git a/src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py b/src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py index 7ace87c7139..d4c210f599f 100644 --- a/src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py +++ b/src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py @@ -13,7 +13,7 @@ class SupabaseVectorStoreComponent(LCVectorStoreComponent): display_name = "Supabase" description = "Supabase Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.2/docs/integrations/vectorstores/supabase/" - name = 'SupabaseVectorStore' + name = "SupabaseVectorStore" icon = "Supabase" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Upstash.py b/src/backend/base/langflow/components/vectorstores/Upstash.py index 547b1911b71..bc39bde834d 100644 --- a/src/backend/base/langflow/components/vectorstores/Upstash.py +++ b/src/backend/base/langflow/components/vectorstores/Upstash.py @@ -12,7 +12,7 @@ class UpstashVectorStoreComponent(LCVectorStoreComponent): display_name = "Upstash" description = "Upstash Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.2/docs/integrations/vectorstores/upstash/" - name = 'Upstash' + name = "Upstash" icon = "Upstash" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Vectara.py b/src/backend/base/langflow/components/vectorstores/Vectara.py index 181e876ca00..3513ccd98df 100644 --- a/src/backend/base/langflow/components/vectorstores/Vectara.py +++ b/src/backend/base/langflow/components/vectorstores/Vectara.py @@ -20,7 +20,7 @@ class VectaraVectorStoreComponent(LCVectorStoreComponent): display_name: str = "Vectara" description: str = "Vectara Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/vectara" - name = 'Vectara' + name = "Vectara" icon = "Vectara" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/Weaviate.py b/src/backend/base/langflow/components/vectorstores/Weaviate.py index b32415299ba..6a2e69fe95f 100644 --- a/src/backend/base/langflow/components/vectorstores/Weaviate.py +++ b/src/backend/base/langflow/components/vectorstores/Weaviate.py @@ -13,7 +13,7 @@ class WeaviateVectorStoreComponent(LCVectorStoreComponent): display_name = "Weaviate" description = "Weaviate Vector Store with search capabilities" documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/weaviate" - name = 'Weaviate' + name = "Weaviate" icon = "Weaviate" inputs = [ diff --git a/src/backend/base/langflow/components/vectorstores/pgvector.py b/src/backend/base/langflow/components/vectorstores/pgvector.py index e73b63de7b7..5b0825d82da 100644 --- a/src/backend/base/langflow/components/vectorstores/pgvector.py +++ b/src/backend/base/langflow/components/vectorstores/pgvector.py @@ -12,7 +12,7 @@ class PGVectorStoreComponent(LCVectorStoreComponent): display_name = "PGVector" description = "PGVector Vector Store with search capabilities" documentation = "https://python.langchain.com/v0.2/docs/integrations/vectorstores/pgvector/" - name = 'pgvector' + name = "pgvector" icon = "PGVector" inputs = [ diff --git a/src/backend/base/langflow/custom/utils.py b/src/backend/base/langflow/custom/utils.py index ef61fa9665d..c5f2d9f3cc7 100644 --- a/src/backend/base/langflow/custom/utils.py +++ b/src/backend/base/langflow/custom/utils.py @@ -15,7 +15,6 @@ from langflow.custom.directory_reader.utils import ( abuild_custom_component_list_from_path, build_custom_component_list_from_path, - determine_component_name, merge_nested_dicts_with_renaming, ) from langflow.custom.eval import eval_custom_component_code @@ -568,6 +567,6 @@ def get_function(code): def get_instance_name(instance): name = instance.__class__.__name__ - if hasattr(instance, 'name') and instance.name: + if hasattr(instance, "name") and instance.name: name = instance.name return name