-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat: add map and extract endpoints with v1 updates for scrape and crawl #6787
base: main
Are you sure you want to change the base?
feat: add map and extract endpoints with v1 updates for scrape and crawl #6787
Conversation
7fdd7c8
to
e31440e
Compare
@ericciarla Could you take a look at this PR and share your thoughts? |
e31440e
to
c8c4131
Compare
Looks good - pinging the Langflow team |
@@ -67,9 +65,23 @@ def crawl(self) -> Data: | |||
if scrape_options_dict: | |||
params["scrapeOptions"] = scrape_options_dict | |||
|
|||
# Set default values for new parameters in v1 | |||
params.setdefault("maxDepth", 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set these as inputs with advanced=True.
Also, set the value for these inputs as the default value required.
display_name="Enable Web Search", | ||
info="When true, the extraction will use web search to find additional data.", | ||
), | ||
# # Optional: Not essential for basic extraction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional parameters you can set as advanced =True such that they would not be visible in component unless the user look into the controls of the component.
MultilineInput, | ||
Output, | ||
SecretStrInput, | ||
StrInput, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of StrInput, I suggest using MessageTextInput
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can actually remove unused imports
In components, if the output is a list, I would prefer it to be in DataFrame format. If the output is in JSON format, I suggest using Data. Furthermore, both Data and DataFrame outputs can coexist within the same component. |
Also to fix the format and lint error. These would be helpful to find and fix potential errors. Feel free to ping me if any clarifications are required; I would be happy to help. |
Testing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Awesome! Great work @edwinjosechittilappilly @aparupganguly and @ogabrielluiz !! |
Added map and extract endpoints with v1 updates for scrape and crawl