Skip to content

Commit 80a5448

Browse files
authored
docs: fixed typo
1 parent 83eab59 commit 80a5448

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ print(markdown)
4444
Extract structured data from any webpage using natural language prompts.
4545

4646
```python
47-
from langchain_scrapegraph.tools import SmartscraperTool
47+
from langchain_scrapegraph.tools import SmartScraperTool
4848

4949
# Initialize the tool (uses SGAI_API_KEY from environment)
5050
tool = SmartscraperTool()
@@ -66,15 +66,15 @@ You can define the structure of the output using Pydantic models:
6666
```python
6767
from typing import List
6868
from pydantic import BaseModel, Field
69-
from langchain_scrapegraph.tools import SmartscraperTool
69+
from langchain_scrapegraph.tools import SmartScraperTool
7070

7171
class WebsiteInfo(BaseModel):
7272
title: str = Field(description="The main title of the webpage")
7373
description: str = Field(description="The main description or first paragraph")
7474
urls: List[str] = Field(description="The URLs inside the webpage")
7575

7676
# Initialize with schema
77-
tool = SmartscraperTool(llm_output_schema=WebsiteInfo)
77+
tool = SmartScraperTool(llm_output_schema=WebsiteInfo)
7878

7979
# The output will conform to the WebsiteInfo schema
8080
result = tool.invoke({
@@ -95,9 +95,9 @@ print(result)
9595
Extract information from HTML content using AI.
9696

9797
```python
98-
from langchain_scrapegraph.tools import LocalscraperTool
98+
from langchain_scrapegraph.tools import LocalScraperTool
9999

100-
tool = LocalscraperTool()
100+
tool = LocalScraperTool()
101101
result = tool.invoke({
102102
"user_prompt": "Extract all contact information",
103103
"website_html": "<html>...</html>"
@@ -114,7 +114,7 @@ You can define the structure of the output using Pydantic models:
114114
```python
115115
from typing import Optional
116116
from pydantic import BaseModel, Field
117-
from langchain_scrapegraph.tools import LocalscraperTool
117+
from langchain_scrapegraph.tools import LocalScraperTool
118118

119119
class CompanyInfo(BaseModel):
120120
name: str = Field(description="The company name")
@@ -123,7 +123,7 @@ class CompanyInfo(BaseModel):
123123
phone: Optional[str] = Field(description="Contact phone if available")
124124

125125
# Initialize with schema
126-
tool = LocalscraperTool(llm_output_schema=CompanyInfo)
126+
tool = LocalScraperTool(llm_output_schema=CompanyInfo)
127127

128128
html_content = """
129129
<html>
@@ -173,12 +173,12 @@ print(result)
173173

174174
```python
175175
from langchain.agents import initialize_agent, AgentType
176-
from langchain_scrapegraph.tools import SmartscraperTool
176+
from langchain_scrapegraph.tools import SmartScraperTool
177177
from langchain_openai import ChatOpenAI
178178

179179
# Initialize tools
180180
tools = [
181-
SmartscraperTool(),
181+
SmartScraperTool(),
182182
]
183183

184184
# Create an agent

0 commit comments

Comments
 (0)