From 8208310fa60cb46903a43fc59d18e4b5c2403ae4 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Fri, 7 Feb 2025 08:56:26 -0300 Subject: [PATCH] refactor: replace StrInput with MultilineInput for URL fields (FirecrawlAPI) (#6160) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 📝 (firecrawl_crawl_api.py): update StrInput to MultilineInput for better handling of URL input 📝 (firecrawl_scrape_api.py): update StrInput to MultilineInput for better handling of URL input * [autofix.ci] apply automated fixes * ✨ (firecrawl_crawl_api.py): introduce StrInput class to langflow.io module for handling string inputs in the API * [autofix.ci] apply automated fixes * ✨ (changes-filter.yaml): add new directories to components list for langflow schema and utils to be included in changes filtering * ✨ (changes-filter.yaml): add new directory "src/backend/base/langflow/graph/" to components list for changes filtering in the workspace. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- .github/changes-filter.yaml | 3 +++ .../components/firecrawl/firecrawl_crawl_api.py | 10 ++-------- .../components/firecrawl/firecrawl_scrape_api.py | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/changes-filter.yaml b/.github/changes-filter.yaml index 5efcb44e0..2a8529088 100644 --- a/.github/changes-filter.yaml +++ b/.github/changes-filter.yaml @@ -46,6 +46,9 @@ components: - "src/frontend/tests/extended/features/**" - "src/frontend/tests/extended/regression/**" - "src/backend/base/langflow/custom/**" + - "src/backend/base/langflow/schema/**" + - "src/backend/base/langflow/graph/**" + - "src/backend/base/langflow/utils/**" workspace: - "src/backend/base/langflow/inputs/**" diff --git a/src/backend/base/langflow/components/firecrawl/firecrawl_crawl_api.py b/src/backend/base/langflow/components/firecrawl/firecrawl_crawl_api.py index 07061a57b..ab9550d42 100644 --- a/src/backend/base/langflow/components/firecrawl/firecrawl_crawl_api.py +++ b/src/backend/base/langflow/components/firecrawl/firecrawl_crawl_api.py @@ -1,13 +1,7 @@ import uuid from langflow.custom import Component -from langflow.io import ( - DataInput, - IntInput, - Output, - SecretStrInput, - StrInput, -) +from langflow.io import DataInput, IntInput, MultilineInput, Output, SecretStrInput, StrInput from langflow.schema import Data @@ -27,7 +21,7 @@ class FirecrawlCrawlApi(Component): password=True, info="The API key to use Firecrawl API.", ), - StrInput( + MultilineInput( name="url", display_name="URL", required=True, diff --git a/src/backend/base/langflow/components/firecrawl/firecrawl_scrape_api.py b/src/backend/base/langflow/components/firecrawl/firecrawl_scrape_api.py index 717ae8e0c..18defab85 100644 --- a/src/backend/base/langflow/components/firecrawl/firecrawl_scrape_api.py +++ b/src/backend/base/langflow/components/firecrawl/firecrawl_scrape_api.py @@ -2,9 +2,9 @@ from langflow.custom import Component from langflow.io import ( DataInput, IntInput, + MultilineInput, Output, SecretStrInput, - StrInput, ) from langflow.schema import Data @@ -25,7 +25,7 @@ class FirecrawlScrapeApi(Component): password=True, info="The API key to use Firecrawl API.", ), - StrInput( + MultilineInput( name="url", display_name="URL", required=True,