Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter update for use of Firecrawl V1 API #13097

Closed
5 tasks done
ftonato opened this issue Jan 28, 2025 · 1 comment · Fixed by #13082
Closed
5 tasks done

Parameter update for use of Firecrawl V1 API #13097

ftonato opened this issue Jan 28, 2025 · 1 comment · Fixed by #13082
Labels
🐞 bug Something isn't working

Comments

@ftonato
Copy link
Contributor

ftonato commented Jan 28, 2025

Self Checks

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

Dify version

NA

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

When trying to use Include & Exclude parameters the API makes no correct use of them

✔️ Expected Behavior

Include and Exclude parameters are passed correctly to the requests to /crawl

❌ Actual Behavior

There are some incorrect parameters to use the V1 version of the Firecrawl

Copy link

dosubot bot commented Jan 28, 2025

Hey there, @ftonato! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's get this sorted out together.

To ensure the Include and Exclude parameters are correctly used with the Firecrawl V1 API, make sure they are passed as lists of strings. Here's how you can handle these parameters:

  1. Extract Parameters: Use the split(",") method to convert comma-separated strings into lists.
  2. Default to Empty Lists: If the parameters are not provided, default them to empty lists.

Here's a code snippet demonstrating this:

includes = options.get("includes").split(",") if options.get("includes") else []
excludes = options.get("excludes").split(",") if options.get("excludes") else []
params = {
    "includePaths": includes,
    "excludePaths": excludes,
    "generateImgAltText": True,
    "limit": options.get("limit", 1),
    "scrapeOptions": {"onlyMainContent": only_main_content},
}

Ensure you use the correct parameter names includePaths and excludePaths as specified in the API documentation [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the 🐞 bug Something isn't working label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant