Skip to content

doc: Amazon Bedrock examples ⛰️ #272

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 3 commits into from
May 20, 2024

Conversation

JGalego
Copy link
Contributor

@JGalego JGalego commented May 20, 2024

This PR adds examples on how to use ScrapeGraphAI with Amazon Bedrock ⛰️ to extract information from websites and files using a natural language prompt.

Example (JSONScraperGraph)

examples/bedrock/json_scraper_bedrock.py
# Prompt: List me all questions and options in the math section, no answers.

Input

{
    "quiz": {
        "sport": {
            "q1": {
                "question": "Which one is correct team name in NBA?",
                "options": [
                    "New York Bulls",
                    "Los Angeles Kings",
                    "Golden State Warriros",
                    "Huston Rocket"
                ],
                "answer": "Huston Rocket"
            }
        },
        "maths": {
            "q1": {
                "question": "5 + 7 = ?",
                "options": [
                    "10",
                    "11",
                    "12",
                    "13"
                ],
                "answer": "12"
            },
            "q2": {
                "question": "12 - 8 = ?",
                "options": [
                    "1",
                    "2",
                    "3",
                    "4"
                ],
                "answer": "4"
            }
        }
    }
}

Output

{
    "maths": {
        "q1": {
            "question": "5 + 7 = ?",
            "options": [
                "10",
                "11",
                "12",
                "13"
            ]
        },
        "q2": {
            "question": "12 - 8 = ?",
            "options": [
                "1",
                "2",
                "3",
                "4"
            ]
        }
    }
}

@JGalego JGalego marked this pull request as ready for review May 20, 2024 16:42
@VinciGit00 VinciGit00 merged commit 0ad78ca into ScrapeGraphAI:pre/beta May 20, 2024
Copy link

🎉 This PR is included in version 1.5.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 1.5.0 🎉

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