From dd55acb7f34c29dcd9678a5832ea0be0f56c9e1a Mon Sep 17 00:00:00 2001 From: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Date: Thu, 3 Jul 2025 17:08:13 -0400 Subject: [PATCH] docs: link components to docs pages (#8850) * docs-links * Update url.py --------- Co-authored-by: Edwin Jose --- src/backend/base/langflow/components/agents/mcp_component.py | 1 + src/backend/base/langflow/components/data/api_request.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/news_search.py | 1 + src/backend/base/langflow/components/data/rss.py | 1 + src/backend/base/langflow/components/data/sql_executor.py | 1 + src/backend/base/langflow/components/data/url.py | 1 + src/backend/base/langflow/components/data/web_search.py | 1 + src/backend/base/langflow/components/data/webhook.py | 1 + .../base/langflow/components/helpers/calculator_core.py | 1 + src/backend/base/langflow/components/helpers/current_date.py | 1 + src/backend/base/langflow/components/helpers/memory.py | 1 + src/backend/base/langflow/components/input_output/chat.py | 1 + .../base/langflow/components/input_output/chat_output.py | 1 + src/backend/base/langflow/components/input_output/text.py | 1 + .../base/langflow/components/input_output/text_output.py | 1 + .../base/langflow/components/logic/conditional_router.py | 1 + src/backend/base/langflow/components/logic/loop.py | 1 + src/backend/base/langflow/components/logic/run_flow.py | 1 + src/backend/base/langflow/components/models/embedding_model.py | 1 + src/backend/base/langflow/components/models/language_model.py | 3 ++- src/backend/base/langflow/components/processing/batch_run.py | 1 + src/backend/base/langflow/components/processing/converter.py | 1 + .../base/langflow/components/processing/data_operations.py | 1 + .../langflow/components/processing/dataframe_operations.py | 1 + .../base/langflow/components/processing/lambda_filter.py | 1 + src/backend/base/langflow/components/processing/llm_router.py | 1 + src/backend/base/langflow/components/processing/parser.py | 1 + src/backend/base/langflow/components/processing/prompt.py | 1 + .../base/langflow/components/processing/python_repl_core.py | 1 + src/backend/base/langflow/components/processing/save_file.py | 1 + src/backend/base/langflow/components/processing/split_text.py | 1 + .../base/langflow/components/processing/structured_output.py | 1 + 34 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/components/agents/mcp_component.py b/src/backend/base/langflow/components/agents/mcp_component.py index 696345ad5..8ee4dc8ae 100644 --- a/src/backend/base/langflow/components/agents/mcp_component.py +++ b/src/backend/base/langflow/components/agents/mcp_component.py @@ -94,6 +94,7 @@ class MCPToolsComponent(ComponentWithCache): display_name = "MCP Tools" description = "Connect to an MCP server to use its tools." + documentation: str = "https://docs.langflow.org/mcp-client" icon = "Mcp" name = "MCPTools" diff --git a/src/backend/base/langflow/components/data/api_request.py b/src/backend/base/langflow/components/data/api_request.py index a3f305088..67f4b0c73 100644 --- a/src/backend/base/langflow/components/data/api_request.py +++ b/src/backend/base/langflow/components/data/api_request.py @@ -45,6 +45,7 @@ DEFAULT_FIELDS = ["mode"] class APIRequestComponent(Component): display_name = "API Request" description = "Make HTTP requests using URL or cURL commands." + documentation: str = "https://docs.langflow.org/components-data#api-request" icon = "Globe" name = "APIRequest" diff --git a/src/backend/base/langflow/components/data/directory.py b/src/backend/base/langflow/components/data/directory.py index fb71b41f8..f6a68d8ca 100644 --- a/src/backend/base/langflow/components/data/directory.py +++ b/src/backend/base/langflow/components/data/directory.py @@ -9,6 +9,7 @@ from langflow.template.field.base import Output class DirectoryComponent(Component): display_name = "Directory" description = "Recursively load files from a directory." + documentation: str = "https://docs.langflow.org/components-data#directory" icon = "folder" name = "Directory" diff --git a/src/backend/base/langflow/components/data/file.py b/src/backend/base/langflow/components/data/file.py index cc0df7dd7..3674bc70f 100644 --- a/src/backend/base/langflow/components/data/file.py +++ b/src/backend/base/langflow/components/data/file.py @@ -16,6 +16,7 @@ class FileComponent(BaseFileComponent): display_name = "File" description = "Loads content from one or more files as a DataFrame." + documentation: str = "https://docs.langflow.org/components-data#file" icon = "file-text" name = "File" diff --git a/src/backend/base/langflow/components/data/news_search.py b/src/backend/base/langflow/components/data/news_search.py index c5ac4fa84..1f4f8db79 100644 --- a/src/backend/base/langflow/components/data/news_search.py +++ b/src/backend/base/langflow/components/data/news_search.py @@ -12,6 +12,7 @@ from langflow.schema import DataFrame class NewsSearchComponent(Component): display_name = "News Search" description = "Searches Google News via RSS. Returns clean article data." + documentation: str = "https://docs.langflow.org/components-data#news-search" icon = "newspaper" name = "NewsSearch" diff --git a/src/backend/base/langflow/components/data/rss.py b/src/backend/base/langflow/components/data/rss.py index 84a943277..b35998216 100644 --- a/src/backend/base/langflow/components/data/rss.py +++ b/src/backend/base/langflow/components/data/rss.py @@ -11,6 +11,7 @@ from langflow.schema import DataFrame class RSSReaderComponent(Component): display_name = "RSS Reader" description = "Fetches and parses an RSS feed." + documentation: str = "https://docs.langflow.org/components-data#rss-reader" icon = "rss" name = "RSSReaderSimple" diff --git a/src/backend/base/langflow/components/data/sql_executor.py b/src/backend/base/langflow/components/data/sql_executor.py index 2444ef23a..e4a842ef7 100644 --- a/src/backend/base/langflow/components/data/sql_executor.py +++ b/src/backend/base/langflow/components/data/sql_executor.py @@ -18,6 +18,7 @@ class SQLComponent(ComponentWithCache): display_name = "SQL Database" description = "Executes SQL queries on SQLAlchemy-compatible databases." + documentation: str = "https://docs.langflow.org/components-data#sql-database" icon = "database" name = "SQLComponent" metadata = {"keywords": ["sql", "database", "query", "db", "fetch"]} diff --git a/src/backend/base/langflow/components/data/url.py b/src/backend/base/langflow/components/data/url.py index 4cc7dc025..17fe2b8e1 100644 --- a/src/backend/base/langflow/components/data/url.py +++ b/src/backend/base/langflow/components/data/url.py @@ -41,6 +41,7 @@ class URLComponent(Component): display_name = "URL" description = "Fetch content from one or more web pages, following links recursively." + documentation: str = "https://docs.langflow.org/components-data#url" icon = "layout-template" name = "URLComponent" diff --git a/src/backend/base/langflow/components/data/web_search.py b/src/backend/base/langflow/components/data/web_search.py index 10cf3b355..4f25ca8f2 100644 --- a/src/backend/base/langflow/components/data/web_search.py +++ b/src/backend/base/langflow/components/data/web_search.py @@ -14,6 +14,7 @@ from langflow.services.deps import get_settings_service class WebSearchComponent(Component): display_name = "Web Search" description = "Performs a basic DuckDuckGo search (HTML scraping). May be subject to rate limits." + documentation: str = "https://docs.langflow.org/components-data#web-search" icon = "search" name = "WebSearchNoAPI" diff --git a/src/backend/base/langflow/components/data/webhook.py b/src/backend/base/langflow/components/data/webhook.py index 46c693a77..24b826f8a 100644 --- a/src/backend/base/langflow/components/data/webhook.py +++ b/src/backend/base/langflow/components/data/webhook.py @@ -7,6 +7,7 @@ from langflow.schema.data import Data class WebhookComponent(Component): display_name = "Webhook" + documentation: str = "https://docs.langflow.org/components-data#webhook" name = "Webhook" icon = "webhook" diff --git a/src/backend/base/langflow/components/helpers/calculator_core.py b/src/backend/base/langflow/components/helpers/calculator_core.py index 66190f89c..975b4645b 100644 --- a/src/backend/base/langflow/components/helpers/calculator_core.py +++ b/src/backend/base/langflow/components/helpers/calculator_core.py @@ -11,6 +11,7 @@ from langflow.schema.data import Data class CalculatorComponent(Component): display_name = "Calculator" description = "Perform basic arithmetic operations on a given expression." + documentation: str = "https://docs.langflow.org/components-helpers#calculator" icon = "calculator" # Cache operators dictionary as a class variable diff --git a/src/backend/base/langflow/components/helpers/current_date.py b/src/backend/base/langflow/components/helpers/current_date.py index 811103fda..d40791a99 100644 --- a/src/backend/base/langflow/components/helpers/current_date.py +++ b/src/backend/base/langflow/components/helpers/current_date.py @@ -11,6 +11,7 @@ from langflow.schema.message import Message class CurrentDateComponent(Component): display_name = "Current Date" description = "Returns the current date and time in the selected timezone." + documentation: str = "https://docs.langflow.org/components-helpers#current-date" icon = "clock" name = "CurrentDate" diff --git a/src/backend/base/langflow/components/helpers/memory.py b/src/backend/base/langflow/components/helpers/memory.py index 9b592f9d8..9985aca21 100644 --- a/src/backend/base/langflow/components/helpers/memory.py +++ b/src/backend/base/langflow/components/helpers/memory.py @@ -16,6 +16,7 @@ from langflow.utils.constants import MESSAGE_SENDER_AI, MESSAGE_SENDER_NAME_AI, class MemoryComponent(Component): display_name = "Message History" description = "Stores or retrieves stored chat messages from Langflow tables or an external memory." + documentation: str = "https://docs.langflow.org/components-helpers#message-history" icon = "message-square-more" name = "Memory" default_keys = ["mode", "memory"] diff --git a/src/backend/base/langflow/components/input_output/chat.py b/src/backend/base/langflow/components/input_output/chat.py index 2409d998a..284ad97b2 100644 --- a/src/backend/base/langflow/components/input_output/chat.py +++ b/src/backend/base/langflow/components/input_output/chat.py @@ -19,6 +19,7 @@ from langflow.utils.constants import ( class ChatInput(ChatComponent): display_name = "Chat Input" description = "Get chat inputs from the Playground." + documentation: str = "https://docs.langflow.org/components-io#chat-input" icon = "MessagesSquare" name = "ChatInput" minimized = True diff --git a/src/backend/base/langflow/components/input_output/chat_output.py b/src/backend/base/langflow/components/input_output/chat_output.py index e1092a9cc..f2c767af4 100644 --- a/src/backend/base/langflow/components/input_output/chat_output.py +++ b/src/backend/base/langflow/components/input_output/chat_output.py @@ -22,6 +22,7 @@ from langflow.utils.constants import ( class ChatOutput(ChatComponent): display_name = "Chat Output" description = "Display a chat message in the Playground." + documentation: str = "https://docs.langflow.org/components-io#chat-output" icon = "MessagesSquare" name = "ChatOutput" minimized = True diff --git a/src/backend/base/langflow/components/input_output/text.py b/src/backend/base/langflow/components/input_output/text.py index 5d039503a..db9594bcc 100644 --- a/src/backend/base/langflow/components/input_output/text.py +++ b/src/backend/base/langflow/components/input_output/text.py @@ -6,6 +6,7 @@ from langflow.schema.message import Message class TextInputComponent(TextComponent): display_name = "Text Input" description = "Get user text inputs." + documentation: str = "https://docs.langflow.org/components-io#text-input" icon = "type" name = "TextInput" diff --git a/src/backend/base/langflow/components/input_output/text_output.py b/src/backend/base/langflow/components/input_output/text_output.py index 620e82dd5..4bc0899b5 100644 --- a/src/backend/base/langflow/components/input_output/text_output.py +++ b/src/backend/base/langflow/components/input_output/text_output.py @@ -6,6 +6,7 @@ from langflow.schema.message import Message class TextOutputComponent(TextComponent): display_name = "Text Output" description = "Sends text output via API." + documentation: str = "https://docs.langflow.org/components-io#text-output" icon = "type" name = "TextOutput" diff --git a/src/backend/base/langflow/components/logic/conditional_router.py b/src/backend/base/langflow/components/logic/conditional_router.py index 7afc7d406..366285c78 100644 --- a/src/backend/base/langflow/components/logic/conditional_router.py +++ b/src/backend/base/langflow/components/logic/conditional_router.py @@ -8,6 +8,7 @@ from langflow.schema.message import Message class ConditionalRouterComponent(Component): display_name = "If-Else" description = "Routes an input message to a corresponding output based on text comparison." + documentation: str = "https://docs.langflow.org/components-logic#conditional-router-if-else-component" icon = "split" name = "ConditionalRouter" diff --git a/src/backend/base/langflow/components/logic/loop.py b/src/backend/base/langflow/components/logic/loop.py index d650de02d..8e5b781a5 100644 --- a/src/backend/base/langflow/components/logic/loop.py +++ b/src/backend/base/langflow/components/logic/loop.py @@ -10,6 +10,7 @@ class LoopComponent(Component): description = ( "Iterates over a list of Data objects, outputting one item at a time and aggregating results from loop inputs." ) + documentation: str = "https://docs.langflow.org/components-logic#loop" icon = "infinity" inputs = [ diff --git a/src/backend/base/langflow/components/logic/run_flow.py b/src/backend/base/langflow/components/logic/run_flow.py index 27dfadd6b..03b63cbb4 100644 --- a/src/backend/base/langflow/components/logic/run_flow.py +++ b/src/backend/base/langflow/components/logic/run_flow.py @@ -13,6 +13,7 @@ class RunFlowComponent(RunFlowBaseComponent): "Creates a tool component from a Flow that takes all its inputs and runs it. " " \n **Select a Flow to use the tool mode**" ) + documentation: str = "https://docs.langflow.org/components-logic#run-flow" beta = True name = "RunFlow" icon = "Workflow" diff --git a/src/backend/base/langflow/components/models/embedding_model.py b/src/backend/base/langflow/components/models/embedding_model.py index ad9b243b8..3b844d81e 100644 --- a/src/backend/base/langflow/components/models/embedding_model.py +++ b/src/backend/base/langflow/components/models/embedding_model.py @@ -20,6 +20,7 @@ from langflow.schema.dotdict import dotdict class EmbeddingModelComponent(LCEmbeddingsModel): display_name = "Embedding Model" description = "Generate embeddings using a specified provider." + documentation: str = "https://docs.langflow.org/components-embedding-models" icon = "binary" name = "EmbeddingModel" category = "models" diff --git a/src/backend/base/langflow/components/models/language_model.py b/src/backend/base/langflow/components/models/language_model.py index e34ca80fc..2d8d7a036 100644 --- a/src/backend/base/langflow/components/models/language_model.py +++ b/src/backend/base/langflow/components/models/language_model.py @@ -17,7 +17,8 @@ from langflow.schema.dotdict import dotdict class LanguageModelComponent(LCModelComponent): display_name = "Language Model" - description = "Runs a language model given a specified provider. " + description = "Runs a language model given a specified provider." + documentation: str = "https://docs.langflow.org/components-models" icon = "brain-circuit" category = "models" priority = 0 # Set priority to 0 to make it appear first diff --git a/src/backend/base/langflow/components/processing/batch_run.py b/src/backend/base/langflow/components/processing/batch_run.py index ff60a0152..ae91d3b4a 100644 --- a/src/backend/base/langflow/components/processing/batch_run.py +++ b/src/backend/base/langflow/components/processing/batch_run.py @@ -16,6 +16,7 @@ if TYPE_CHECKING: class BatchRunComponent(Component): display_name = "Batch Run" description = "Runs an LLM on each row of a DataFrame column. If no column is specified, all columns are used." + documentation: str = "https://docs.langflow.org/components-processing#batch-run" icon = "List" inputs = [ diff --git a/src/backend/base/langflow/components/processing/converter.py b/src/backend/base/langflow/components/processing/converter.py index 8609036fb..023facfb7 100644 --- a/src/backend/base/langflow/components/processing/converter.py +++ b/src/backend/base/langflow/components/processing/converter.py @@ -50,6 +50,7 @@ def convert_to_dataframe(v: DataFrame | Data | Message | dict) -> DataFrame: class TypeConverterComponent(Component): display_name = "Type Convert" description = "Convert between different types (Message, Data, DataFrame)" + documentation: str = "https://docs.langflow.org/components-processing#type-convert" icon = "repeat" inputs = [ diff --git a/src/backend/base/langflow/components/processing/data_operations.py b/src/backend/base/langflow/components/processing/data_operations.py index dc930d690..c9c070492 100644 --- a/src/backend/base/langflow/components/processing/data_operations.py +++ b/src/backend/base/langflow/components/processing/data_operations.py @@ -33,6 +33,7 @@ OPERATORS = { class DataOperationsComponent(Component): display_name = "Data Operations" description = "Perform various operations on a Data object." + documentation: str = "https://docs.langflow.org/components-processing#data-operations" icon = "file-json" name = "DataOperations" default_keys = ["operations", "data"] diff --git a/src/backend/base/langflow/components/processing/dataframe_operations.py b/src/backend/base/langflow/components/processing/dataframe_operations.py index 3d24f751d..d4e78a8db 100644 --- a/src/backend/base/langflow/components/processing/dataframe_operations.py +++ b/src/backend/base/langflow/components/processing/dataframe_operations.py @@ -15,6 +15,7 @@ from langflow.schema.dataframe import DataFrame class DataFrameOperationsComponent(Component): display_name = "DataFrame Operations" description = "Perform various operations on a DataFrame." + documentation: str = "https://docs.langflow.org/components-processing#dataframe-operations" icon = "table" name = "DataFrameOperations" diff --git a/src/backend/base/langflow/components/processing/lambda_filter.py b/src/backend/base/langflow/components/processing/lambda_filter.py index 059a4c6f1..4684e2f12 100644 --- a/src/backend/base/langflow/components/processing/lambda_filter.py +++ b/src/backend/base/langflow/components/processing/lambda_filter.py @@ -16,6 +16,7 @@ if TYPE_CHECKING: class LambdaFilterComponent(Component): display_name = "Smart Function" description = "Uses an LLM to generate a function for filtering or transforming structured data." + documentation: str = "https://docs.langflow.org/components-processing#smart-function" icon = "square-function" name = "Smart Function" diff --git a/src/backend/base/langflow/components/processing/llm_router.py b/src/backend/base/langflow/components/processing/llm_router.py index 0d007dabc..be05165e6 100644 --- a/src/backend/base/langflow/components/processing/llm_router.py +++ b/src/backend/base/langflow/components/processing/llm_router.py @@ -17,6 +17,7 @@ from langflow.template.field.base import Output class LLMRouterComponent(Component): display_name = "LLM Router" description = "Routes the input to the most appropriate LLM based on OpenRouter model specifications" + documentation: str = "https://docs.langflow.org/components-processing#llm-router" icon = "git-branch" # Constants for magic values diff --git a/src/backend/base/langflow/components/processing/parser.py b/src/backend/base/langflow/components/processing/parser.py index 2c7392246..c61c6b984 100644 --- a/src/backend/base/langflow/components/processing/parser.py +++ b/src/backend/base/langflow/components/processing/parser.py @@ -10,6 +10,7 @@ from langflow.template.field.base import Output class ParserComponent(Component): display_name = "Parser" description = "Extracts text using a template." + documentation: str = "https://docs.langflow.org/components-processing#parser" icon = "braces" inputs = [ diff --git a/src/backend/base/langflow/components/processing/prompt.py b/src/backend/base/langflow/components/processing/prompt.py index df9661ade..37e65cb78 100644 --- a/src/backend/base/langflow/components/processing/prompt.py +++ b/src/backend/base/langflow/components/processing/prompt.py @@ -9,6 +9,7 @@ from langflow.template.utils import update_template_values class PromptComponent(Component): display_name: str = "Prompt Template" description: str = "Create a prompt template with dynamic variables." + documentation: str = "https://docs.langflow.org/components-prompts" icon = "braces" trace_type = "prompt" name = "Prompt Template" diff --git a/src/backend/base/langflow/components/processing/python_repl_core.py b/src/backend/base/langflow/components/processing/python_repl_core.py index 21627d85e..341aef04d 100644 --- a/src/backend/base/langflow/components/processing/python_repl_core.py +++ b/src/backend/base/langflow/components/processing/python_repl_core.py @@ -10,6 +10,7 @@ from langflow.schema.data import Data class PythonREPLComponent(Component): display_name = "Python Interpreter" description = "Run Python code with optional imports. Use print() to see the output." + documentation: str = "https://docs.langflow.org/components-processing#python-interpreter" icon = "square-terminal" inputs = [ diff --git a/src/backend/base/langflow/components/processing/save_file.py b/src/backend/base/langflow/components/processing/save_file.py index 845f3914f..fc0f1de81 100644 --- a/src/backend/base/langflow/components/processing/save_file.py +++ b/src/backend/base/langflow/components/processing/save_file.py @@ -20,6 +20,7 @@ from langflow.template.field.base import Output class SaveToFileComponent(Component): display_name = "Save File" description = "Save data to a local file in the selected format." + documentation: str = "https://docs.langflow.org/components-processing#save-file" icon = "save" name = "SaveToFile" diff --git a/src/backend/base/langflow/components/processing/split_text.py b/src/backend/base/langflow/components/processing/split_text.py index 5c2acacee..a70bdc0f7 100644 --- a/src/backend/base/langflow/components/processing/split_text.py +++ b/src/backend/base/langflow/components/processing/split_text.py @@ -11,6 +11,7 @@ from langflow.utils.util import unescape_string class SplitTextComponent(Component): display_name: str = "Split Text" description: str = "Split text into chunks based on specified criteria." + documentation: str = "https://docs.langflow.org/components-processing#split-text" icon = "scissors-line-dashed" name = "SplitText" diff --git a/src/backend/base/langflow/components/processing/structured_output.py b/src/backend/base/langflow/components/processing/structured_output.py index 9c3bc73fd..637c19600 100644 --- a/src/backend/base/langflow/components/processing/structured_output.py +++ b/src/backend/base/langflow/components/processing/structured_output.py @@ -18,6 +18,7 @@ from langflow.schema.table import EditMode class StructuredOutputComponent(Component): display_name = "Structured Output" description = "Uses an LLM to generate structured data. Ideal for extraction and consistency." + documentation: str = "https://docs.langflow.org/components-processing#structured-output" name = "StructuredOutput" icon = "braces"