Skip to content

fixed tool and dependencies #615

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 6 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
## [1.16.0-beta.2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.16.0-beta.1...v1.16.0-beta.2) (2024-08-31)
## [1.15.2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.1...v1.15.2) (2024-09-01)


### Bug Fixes

* update generate answernode ([c348f67](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/c348f674ad0caae4f4dc04e194fae9634e01b621))

## [1.16.0-beta.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.1...v1.16.0-beta.1) (2024-08-28)


### Features

* add togheterai ([8f615ad](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/8f615adef320dacdd214a184981384dd05df8171))

### Bug Fixes

### chore
* pyproject.toml ([360ce1c](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/360ce1c0e468c959e63555120ac7cecf55563846))

* **examples:** create Together AI examples ([34942de](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/34942deca514df53e8aa1c7f96f812ee78b994bf))

## [1.15.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.15.0...v1.15.1) (2024-08-28)

Expand Down
2 changes: 1 addition & 1 deletion examples/anthropic/search_graph_schema_haiku.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SearchGraph

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion examples/anthropic/smart_scraper_schema_haiku.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
from typing import List
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from dotenv import load_dotenv
from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai.utils import prettify_exec_info
Expand Down
2 changes: 1 addition & 1 deletion examples/azure/search_graph_schema_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/azure/smart_scraper_schema_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
import json
from typing import List
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from dotenv import load_dotenv
from scrapegraphai.graphs import SmartScraperGraph

Expand Down
2 changes: 1 addition & 1 deletion examples/bedrock/search_graph_schema_bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/bedrock/smart_scraper_schema_bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Basic example of scraping pipeline using SmartScraper
"""
from typing import List
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai.utils import prettify_exec_info

Expand Down
2 changes: 1 addition & 1 deletion examples/deepseek/search_graph_schema_deepseek.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/deepseek/smart_scraper_schema_deepseek.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
from typing import List
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from dotenv import load_dotenv
from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai.utils import prettify_exec_info
Expand Down
2 changes: 1 addition & 1 deletion examples/extras/serch_graph_scehma.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
from dotenv import load_dotenv
from scrapegraphai.graphs import SearchGraph
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List
load_dotenv()

Expand Down
2 changes: 1 addition & 1 deletion examples/fireworks/pdf_scraper_multi_fireworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import PdfScraperMultiGraph

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion examples/fireworks/script_generator_schema_fireworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import ScriptCreatorGraph
from scrapegraphai.utils import prettify_exec_info

Expand Down
2 changes: 1 addition & 1 deletion examples/fireworks/search_graph_schema_fireworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/fireworks/smart_scraper_schema_fireworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os, json
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion examples/google_genai/search_graph_schema_gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/google_genai/smart_scraper_schema_gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
from typing import List
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from dotenv import load_dotenv
from scrapegraphai.utils import prettify_exec_info
from scrapegraphai.graphs import SmartScraperGraph
Expand Down
2 changes: 1 addition & 1 deletion examples/google_vertexai/search_graph_schema_gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/google_vertexai/smart_scraper_schema_gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
from typing import List
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from dotenv import load_dotenv
from scrapegraphai.utils import prettify_exec_info
from scrapegraphai.graphs import SmartScraperGraph
Expand Down
2 changes: 1 addition & 1 deletion examples/groq/search_graph_schema_groq.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/groq/smart_scraper_schema_groq.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os, json
from typing import List
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from dotenv import load_dotenv
from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai.utils import prettify_exec_info
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations/indexify_node_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dotenv import load_dotenv
load_dotenv()

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai.integrations import IndexifyNode

Expand Down
2 changes: 1 addition & 1 deletion examples/local_models/search_graph_schema_ollama.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/local_models/smart_scraper_schema_ollama.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
import json
from typing import List
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai.utils import prettify_exec_info

Expand Down
2 changes: 1 addition & 1 deletion examples/mistral/pdf_scraper_multi_mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import PdfScraperMultiGraph

load_dotenv()
Expand Down
3 changes: 1 addition & 2 deletions examples/mistral/script_generator_schema_mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from dotenv import load_dotenv
from scrapegraphai.graphs import ScriptCreatorGraph
from scrapegraphai.utils import prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion examples/mistral/search_graph_schema_mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

Expand Down
2 changes: 1 addition & 1 deletion examples/mistral/smart_scraper_schema_mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os, json
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion examples/nemotron/script_generator_schema_nemotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from scrapegraphai.graphs import ScriptCreatorGraph
from scrapegraphai.utils import prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion examples/nemotron/search_graph_schema_nemotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/nemotron/smart_scraper_schema_nemotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os, json
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion examples/oneapi/search_graph_schema_oneapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

# ************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/oneapi/smart_scraper_schema_oneapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Basic example of scraping pipeline using SmartScraper and OneAPI
"""
from typing import List
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai.utils import prettify_exec_info

Expand Down
2 changes: 1 addition & 1 deletion examples/openai/pdf_scraper_multi_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import PdfScraperMultiGraph

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion examples/openai/script_generator_schema_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from scrapegraphai.graphs import ScriptCreatorGraph
from scrapegraphai.utils import prettify_exec_info

from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from typing import List

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion examples/openai/search_graph_schema_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SearchGraph
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info

Expand Down
2 changes: 1 addition & 1 deletion examples/openai/smart_scraper_schema_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os, json
from typing import List
from dotenv import load_dotenv
from pydantic import BaseModel, Field
from langchain_core.pydantic_v1 import BaseModel, Field
from scrapegraphai.graphs import SmartScraperGraph

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "scrapegraphai"
version = "1.16.0b2"
version = "1.15.2"

description = "A web scraping library based on LangChain which uses LLM and direct graph logic to create scraping pipelines."
authors = [
Expand Down
2 changes: 1 addition & 1 deletion scrapegraphai/graphs/base_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import warnings
from typing import Tuple
from langchain_community.callbacks import get_openai_callback
from ..integrations import BurrBridge
from ..telemetry import log_graph_execution

class BaseGraph:
Expand Down Expand Up @@ -255,6 +254,7 @@ def execute(self, initial_state: dict) -> Tuple[dict, list]:

self.initial_state = initial_state
if self.use_burr:
from ..integrations import BurrBridge

bridge = BurrBridge(self, self.burr_config)
result = bridge.execute(initial_state)
Expand Down
4 changes: 2 additions & 2 deletions scrapegraphai/nodes/base_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_input_keys(self, state: dict) -> List[str]:
self._validate_input_keys(input_keys)
return input_keys
except ValueError as e:
raise ValueError(f"Error parsing input keys for {self.node_name}: {str(e)}")
raise ValueError(f"Error parsing input keys for {self.node_name}") from e

def _validate_input_keys(self, input_keys):
"""
Expand Down Expand Up @@ -233,7 +233,7 @@ def evaluate_expression(expression: str) -> List[str]:
result = evaluate_expression(expression)

if not result:
raise ValueError("No state keys matched the expression.")
raise ValueError(f"No state keys matched the expression. Expression was {expression}. State contains keys: {', '.join(state.keys())}")

# Remove redundant state keys from the result, without changing their order
final_result = []
Expand Down
Loading