Skip to content

Multi scraper implementation #361

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

Merged
merged 4 commits into from
Jun 11, 2024
Merged

Multi scraper implementation #361

merged 4 commits into from
Jun 11, 2024

Conversation

VinciGit00
Copy link
Collaborator

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would merge the scripts coming out from GraphIteratorNode in one single script. E.g. giving the generated scripts to the llm and tell it to generate a single script, probably it will create a loop that scrapes all the websites requested.

graph LR
    A[scripts - list] --> B[MergeGeneratedScriptsNode]
    B --> C[script - str]
Loading

Also you need to ask to stick with the input schema so the llm will understand how the output should be

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new node will be similar to the current MergeAnswersNode

input: str,
output: List[str],
node_config: Optional[dict] = None,
node_name: str = "MergeAnswers",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"MergeGeneratedScripts"

inputs = {"user_prompt": self.prompt, "urls": self.source}
print("self.prompt", self.prompt)
self.final_state, self.execution_info = self.graph.execute(inputs)
print("self.prompt", self.final_state)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove the prints

@PeriniM PeriniM changed the base branch from pre/beta to dev June 11, 2024 22:49
@PeriniM PeriniM merged commit a10b060 into dev Jun 11, 2024
2 checks passed
@PeriniM PeriniM deleted the multi_scraper_implementation branch June 11, 2024 22:49
Copy link

🎉 This PR is included in version 1.7.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants