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

cannot import name 'Bedrock' from 'scrapegraphai.models' #874

Open
leroylim20 opened this issue Jan 9, 2025 · 2 comments
Open

cannot import name 'Bedrock' from 'scrapegraphai.models' #874

leroylim20 opened this issue Jan 9, 2025 · 2 comments

Comments

@leroylim20
Copy link

Describe the bug
When running custom_graph_bedrock.py , the following error occurs:

Traceback (most recent call last):
  File ".../Scrapegraph-ai/examples/bedrock/custom_graph_bedrock.py", line 10, in <module>
    from scrapegraphai.models import Bedrock
ImportError: cannot import name 'Bedrock' from 'scrapegraphai.models' (.../Scrapegraph-ai/scrapegraphai/models/__init__.py)

To Reproduce
Steps to reproduce the behavior:

  1. Run custom_graph_bedrock.py
  2. See error

Expected behavior
The scripts runs

Screenshots
N/A

Desktop (please complete the following information):

  • OS: iOS

Additional context
Found a old Bedrock.py under Models in https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/16de49fa086547351704c16989fa1bd2d2efb363/scrapegraphai/models/bedrock.py but this seems to be missing in the main branch

@VinciGit00
Copy link
Collaborator

Does is it works with smartscraper? Have you modified the old bedrock file?

Copy link

dosubot bot commented Jan 9, 2025

Hey @leroylim20! I'm here to help you with any bugs, questions, or contributions. Let's work together to resolve the issue you're facing.

The Bedrock class is no longer available in the scrapegraphai.models module. The current classes in the module are DeepSeek, OneApi, OpenAIImageToText, and OpenAITextToSpeech [1].

For tasks previously handled by Bedrock, you can refer to the example provided in the documentation that demonstrates how to use the current classes and nodes to achieve similar functionality. This involves setting up a custom graph using nodes like FetchNode, ParseNode, RAGNode, GenerateAnswerNode, and RobotsNode [2].

If you need to restore the Bedrock functionality, you might consider checking out an earlier commit where Bedrock.py was present or adapting the new classes and nodes to fit your requirements.

To continue talking to Dosu, mention @dosu.


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

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

No branches or pull requests

2 participants