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

Graph Builder failed import bugfix #600

Conversation

alexljenkins
Copy link

Tried to run graph_builder from the Google Colab examples but failed to import GraphBuilder.

Issues:

  1. scrapegraphai/models/init.py no longer has a model named Gemini.
  2. Ernie was referenced but never imported.

Solutions:

  1. Continuing the work by Marco Vinciguerra on this commit, changed the imports to langchain models.
  2. Minor fix of imports ordering to match rest of code (local repo imports last with space either side)

Checks:

  1. Checked that both langchain_community and langchain_google_genai were already used and available.
  2. Checked code could run without error
  3. Linting and formatting matched

Further suggestions for future edits:

  1. move imports down to within the if/else statements to minimize the amount of packages required but left unused.
  2. create a whole control mechanism to abstract the specific model and it's packages/imports away so users can select the model(s) to be used and install them - excluding those they don't need.

@f-aguzzi
Copy link
Member

Thanks for contributing. I'll get back to you soon. Everything looks alright and ready for merging, but we might need to add one last thing. We're refactoring the provider/model selection block in the AbstractGraph, and maybe we could integrate that here too. I'll let you know once we're done with that.

@VinciGit00 VinciGit00 merged commit edfe45e into ScrapeGraphAI:pre/beta Aug 28, 2024
@alexljenkins
Copy link
Author

Happy to keep watching the space to see how I can help integrate other changes into the auto-builder space :) love your work.

Copy link

🎉 This issue has been resolved in version 1.15.0-beta.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 1.15.1-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 1.15.1 🎉

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.

3 participants