diff --git a/llama-index-integrations/tools/llama-index-tools-scrapegraph/README.md b/llama-index-integrations/tools/llama-index-tools-scrapegraph/README.md index b5d71708616e2..625929711ae12 100644 --- a/llama-index-integrations/tools/llama-index-tools-scrapegraph/README.md +++ b/llama-index-integrations/tools/llama-index-tools-scrapegraph/README.md @@ -13,7 +13,7 @@ pip install llama-index-tools-scrapegraph First, import and initialize the ScrapegraphToolSpec: ```python -from llama_index.tools.scrapegraph import ScrapegraphToolSpec +from llama_index.tools.scrapegraph.base import ScrapegraphToolSpec scrapegraph_tool = ScrapegraphToolSpec() ``` diff --git a/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-markdowinify-llama-index.py b/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-markdowinify-llama-index.py new file mode 100644 index 0000000000000..037007240796a --- /dev/null +++ b/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-markdowinify-llama-index.py @@ -0,0 +1,14 @@ +from llama_index.tools.scrapegraph.base import ScrapegraphToolSpec + +# Initialize the ScrapegraphToolSpec +scrapegraph_tool = ScrapegraphToolSpec() + +# Convert webpage content to markdown +response = scrapegraph_tool.scrapegraph_markdownify( + url="https://scrapegraphai.com/", + api_key="sgai-***" # Replace with your actual API key +) + +# Print the markdown content +print("Markdown Content:") +print(response) diff --git a/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-llama-index.py b/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-smartscraper-lama-index.py similarity index 92% rename from llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-llama-index.py rename to llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-smartscraper-lama-index.py index 31500697141f4..6915017bf1caa 100644 --- a/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-llama-index.py +++ b/llama-index-integrations/tools/llama-index-tools-scrapegraph/examples/scrapegraph-smartscraper-lama-index.py @@ -1,5 +1,5 @@ from pydantic import BaseModel, Field -from llama_index.tools.scrapegraph import ScrapegraphToolSpec +from llama_index.tools.scrapegraph.base import ScrapegraphToolSpec scrapegraph_tool = ScrapegraphToolSpec()