dify icon indicating copy to clipboard operation
dify copied to clipboard

Regarding the issue of Firecrawl unrestricted crawling when creating a knowledge base.

Open shihao-shen opened this issue 2 years ago • 3 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.11.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When creating a knowledge base, while using Firecrawl (locally deployed), it was found that the number of websites crawled exceeds the restricted limit.

Crawl URL:https://python.langchain.com/docs image

✔️ Expected Behavior

When Firecrawl is crawling a website, the "limit" feature does actually work to restrict the crawling.

❌ Actual Behavior

Even after switching back to the official version of Firecrawl, the issue persists. image image image

shihao-shen avatar Nov 24 '24 06:11 shihao-shen

Hello, @shihao-shen! I'm here to assist you with bugs, questions, and contributions. Let's work together to resolve your issue while waiting for a human maintainer.

I found a similar unsolved discussion regarding the Firecrawl configuration for the datasource being disabled [1]. This might be related to the issue you're experiencing with the 'limit' feature not working as expected.

For the issue of Firecrawl exceeding the specified limit, here are some points to consider:

  1. Implementation of the 'limit' Feature: The 'limit' feature in Firecrawl is implemented in the CrawlTool class, where it is set in the payload dictionary with a default value of 5 if not provided. This limit is used to restrict the number of pages processed during the crawling task [2][3][4].

  2. Error Handling: Errors or exceptions during the crawling process can affect the 'limit' feature. If an error occurs, the crawl might not complete as expected, potentially affecting the number of items crawled up to the specified limit [2].

  3. Logging and Debugging: There is logging information available in the Firecrawl integration that could help diagnose why the 'limit' feature is not working as expected. The FirecrawlApp class uses a logger to output debug information, which can provide insights into the requests being made [5][2].

You might want to check the logs for any errors or unexpected behavior during the crawling process and ensure that the 'limit' parameter is being correctly set and passed to the Firecrawl tool.

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Nov 24 '24 06:11 dosubot[bot]

I have met this problem too, with dify 0.14.1 and self-hosted Firecrawl 1.0.0.

image

lofyer avatar Dec 23 '24 16:12 lofyer

Hi, @shihao-shen. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • The issue involves Firecrawl exceeding the set crawling limit when creating a knowledge base.
  • This occurs in a self-hosted environment using Dify version 0.11.2.
  • You reverted to the official version, but the issue persisted.
  • Another user, @lofyer, confirmed the issue in Dify version 0.14.1 and Firecrawl 1.0.0.

Next Steps:

  • Please let us know if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Jan 26 '25 16:01 dosubot[bot]