Skip to content

Commit 8423f10

Browse files
authored
Merge pull request #532 from ScrapeGraphAI/temp
allignment
2 parents 8b2c266 + 0cda020 commit 8423f10

File tree

7 files changed

+77
-87
lines changed

7 files changed

+77
-87
lines changed

CHANGELOG.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,72 @@
1+
## [1.13.3](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.13.2...v1.13.3) (2024-08-10)
2+
3+
4+
### Bug Fixes
5+
6+
* conditional node ([778efd4](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/778efd4c87c69754bfbbf7a80d652f4cfd31a361))
7+
8+
## [1.13.2](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.13.1...v1.13.2) (2024-08-10)
9+
10+
11+
### Bug Fixes
12+
13+
* fetch node ([f01b55e](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f01b55e89b1365760f0dce4fa15ac0e74d280c57))
14+
15+
16+
### chore
17+
18+
* update gemini model to "gemini-pro" ([a7264ce](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/a7264cebd28857b4a13e7db2f27e80e5b57e4407))
19+
20+
## [1.13.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.13.0...v1.13.1) (2024-08-09)
21+
22+
23+
### Bug Fixes
24+
25+
* conditional node ([ce00345](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/ce003454953e5785d4746223c252de38cd5d07ea))
26+
27+
## [1.13.0](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.12.2...v1.13.0) (2024-08-09)
128
## [1.13.0-beta.9](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.13.0-beta.8...v1.13.0-beta.9) (2024-08-10)
229

330

31+
432
### Features
533

34+
* add grok integration ([fa651d4](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/fa651d4cd9ab8ae9cf58280f1256ceb4171ef088))
35+
* add mistral support ([17f2707](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/17f2707313f65a1e96443b3c8a1f5137892f2c5a))
36+
* update base_graph ([0571b6d](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/0571b6da55920bfe691feef2e1ecb5f3760dabf7))
37+
38+
39+
### Bug Fixes
40+
41+
* **chunking:** count tokens from words instead of characters ([5ec2de9](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/5ec2de9e1a14def5596738b6cdf769f5039a246d)), closes [#513](https://github.com/ScrapeGraphAI/Scrapegraph-ai/issues/513)
42+
* **FetchNode:** handling of missing browser_base key ([07720b6](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/07720b6e0ca10ba6ce3c1359706a09baffcc4ad0))
43+
* **AbstractGraph:** LangChain warnings handling, Mistral tokens ([786af99](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/786af992f8fbdadfdc3d2d6a06c0cfd81289f8f2))
44+
* **FetchNode:** missing bracket syntax error ([50edbcc](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/50edbcc7f80e419f72f3f69249fec4a37597ef9a))
45+
* refactoring of fetch_node ([29ad140](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/29ad140fa399e9cdd98289a70506269db25fb599))
46+
* refactoring of fetch_node adding comment ([bfc6852](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/bfc6852b77b643e34543f7e436349f73d4ba1b5a))
47+
* refactoring of fetch_node qixed error ([1ea2ad8](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/1ea2ad8e79e9777c60f86565ed4930ee46e1ca53))
48+
* refactoring of merge_answer_node ([898e5a7](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/898e5a7af504fbf4c1cabb14103e66184037de49))
49+
50+
51+
### chore
52+
53+
* **models_tokens:** add mistral models ([5e82432](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/5e824327c3acb69d53f3519344d0f8c2e3defa8b))
54+
* **mistral:** create examples ([f8ad616](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f8ad616e10c271443e2dcb4123c8ddb91de2ff69))
55+
* **examples:** fix Mistral examples ([b0ffc51](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/b0ffc51e5415caec562a565710f5195afe1fbcb2))
56+
* update requirements for mistral ([9868555](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/986855512319541d1d02356df9ad61ab7fc5d807))
57+
58+
59+
### CI
60+
61+
* **release:** 1.11.0-beta.11 [skip ci] ([579d3f3](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/579d3f394b54636673baf8e9f619f1c57a2ecce4))
62+
* **release:** 1.11.0-beta.12 [skip ci] ([cf2a17e](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/cf2a17ed5d79c62271fd9ea8ec89793884b04b56))
63+
* **release:** 1.13.0-beta.1 [skip ci] ([8eb66f6](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/8eb66f6e22d6b53f0fb73d0da18302e7b00b99e3))
64+
* **release:** 1.13.0-beta.2 [skip ci] ([684d01a](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/684d01a2cb979c076a0f9d64855debd79b32ad58))
65+
* **release:** 1.13.0-beta.3 [skip ci] ([6b053cf](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/6b053cfc95655f122baef999325888c13f4af883))
66+
* **release:** 1.13.0-beta.4 [skip ci] ([7f1f750](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/7f1f7503f7c83c2e4d41a906fb3aa6012a2e0f52))
67+
* **release:** 1.13.0-beta.5 [skip ci] ([2eba73b](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/2eba73b784ee443260117e98ab7c943934b3018d)), closes [#513](https://github.com/ScrapeGraphAI/Scrapegraph-ai/issues/513)
68+
* **release:** 1.13.0-beta.6 [skip ci] ([e75b574](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/e75b574b67040e127599da9ee1b0eee13d234cb9))
69+
* **release:** 1.13.0-beta.7 [skip ci] ([6e56925](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/6e56925355c424edae290c70fd98646ab5f420ee))
670
* add refactoring of default temperature ([6c3b37a](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/6c3b37ab001b80c09ea9ffb56d4c3df338e33a7a))
771

872
## [1.13.0-beta.8](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.13.0-beta.7...v1.13.0-beta.8) (2024-08-09)
@@ -12,6 +76,7 @@
1276

1377
* broken node ([1272273](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/127227349915deeb0dede34aa575ad269ed7cbe3))
1478

79+
1580
## [1.13.0-beta.7](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.13.0-beta.6...v1.13.0-beta.7) (2024-08-09)
1681

1782

examples/gemini/pdf_scraper_graph_gemini.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from dotenv import load_dotenv
77
from scrapegraphai.utils import prettify_exec_info
88
from scrapegraphai.graphs import PDFScraperGraph
9+
910
load_dotenv()
1011

1112

@@ -18,7 +19,7 @@
1819
graph_config = {
1920
"llm": {
2021
"api_key": gemini_key,
21-
"model": "gemini-pr",
22+
"model": "gemini-pro",
2223
},
2324
}
2425

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
name = "scrapegraphai"
33

44

5+
version = "1.13.3"
56
version = "1.13.0b9"
67

78

9+
810
description = "A web scraping library based on LangChain which uses LLM and direct graph logic to create scraping pipelines."
911

1012
authors = [

requirements-dev.lock

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
# features: []
77
# all-features: false
88
# with-sources: false
9-
# generate-hashes: false
10-
# universal: false
119

1210
-e file:.
1311
aiofiles==24.1.0
@@ -112,7 +110,6 @@ filelock==3.15.4
112110
# via huggingface-hub
113111
# via torch
114112
# via transformers
115-
# via triton
116113
fireworks-ai==0.14.0
117114
# via langchain-fireworks
118115
fonttools==4.53.1
@@ -188,7 +185,6 @@ graphviz==0.20.3
188185
# via scrapegraphai
189186
greenlet==3.0.3
190187
# via playwright
191-
# via sqlalchemy
192188
groq==0.9.0
193189
# via langchain-groq
194190
grpc-google-iam-v1==0.13.1
@@ -362,34 +358,6 @@ numpy==1.26.4
362358
# via shapely
363359
# via streamlit
364360
# via transformers
365-
nvidia-cublas-cu12==12.1.3.1
366-
# via nvidia-cudnn-cu12
367-
# via nvidia-cusolver-cu12
368-
# via torch
369-
nvidia-cuda-cupti-cu12==12.1.105
370-
# via torch
371-
nvidia-cuda-nvrtc-cu12==12.1.105
372-
# via torch
373-
nvidia-cuda-runtime-cu12==12.1.105
374-
# via torch
375-
nvidia-cudnn-cu12==8.9.2.26
376-
# via torch
377-
nvidia-cufft-cu12==11.0.2.54
378-
# via torch
379-
nvidia-curand-cu12==10.3.2.106
380-
# via torch
381-
nvidia-cusolver-cu12==11.4.5.107
382-
# via torch
383-
nvidia-cusparse-cu12==12.1.0.106
384-
# via nvidia-cusolver-cu12
385-
# via torch
386-
nvidia-nccl-cu12==2.19.3
387-
# via torch
388-
nvidia-nvjitlink-cu12==12.6.20
389-
# via nvidia-cusolver-cu12
390-
# via nvidia-cusparse-cu12
391-
nvidia-nvtx-cu12==12.1.105
392-
# via torch
393361
openai==1.37.0
394362
# via burr
395363
# via langchain-fireworks
@@ -631,8 +599,6 @@ tqdm==4.66.4
631599
transformers==4.43.3
632600
# via langchain-huggingface
633601
# via sentence-transformers
634-
triton==2.2.0
635-
# via torch
636602
typer==0.12.3
637603
# via fastapi-cli
638604
typing-extensions==4.12.2
@@ -676,8 +642,6 @@ uvicorn==0.30.3
676642
# via fastapi
677643
uvloop==0.19.0
678644
# via uvicorn
679-
watchdog==4.0.1
680-
# via streamlit
681645
watchfiles==0.22.0
682646
# via uvicorn
683647
websockets==12.0

requirements.lock

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
# features: []
77
# all-features: false
88
# with-sources: false
9-
# generate-hashes: false
10-
# universal: false
119

1210
-e file:.
1311
aiohttp==3.9.5
@@ -69,7 +67,6 @@ filelock==3.15.4
6967
# via huggingface-hub
7068
# via torch
7169
# via transformers
72-
# via triton
7370
fireworks-ai==0.14.0
7471
# via langchain-fireworks
7572
free-proxy==1.1.1
@@ -136,7 +133,6 @@ graphviz==0.20.3
136133
# via scrapegraphai
137134
greenlet==3.0.3
138135
# via playwright
139-
# via sqlalchemy
140136
groq==0.9.0
141137
# via langchain-groq
142138
grpc-google-iam-v1==0.13.1
@@ -267,34 +263,6 @@ numpy==1.26.4
267263
# via sentence-transformers
268264
# via shapely
269265
# via transformers
270-
nvidia-cublas-cu12==12.1.3.1
271-
# via nvidia-cudnn-cu12
272-
# via nvidia-cusolver-cu12
273-
# via torch
274-
nvidia-cuda-cupti-cu12==12.1.105
275-
# via torch
276-
nvidia-cuda-nvrtc-cu12==12.1.105
277-
# via torch
278-
nvidia-cuda-runtime-cu12==12.1.105
279-
# via torch
280-
nvidia-cudnn-cu12==8.9.2.26
281-
# via torch
282-
nvidia-cufft-cu12==11.0.2.54
283-
# via torch
284-
nvidia-curand-cu12==10.3.2.106
285-
# via torch
286-
nvidia-cusolver-cu12==11.4.5.107
287-
# via torch
288-
nvidia-cusparse-cu12==12.1.0.106
289-
# via nvidia-cusolver-cu12
290-
# via torch
291-
nvidia-nccl-cu12==2.19.3
292-
# via torch
293-
nvidia-nvjitlink-cu12==12.6.20
294-
# via nvidia-cusolver-cu12
295-
# via nvidia-cusparse-cu12
296-
nvidia-nvtx-cu12==12.1.105
297-
# via torch
298266
openai==1.37.0
299267
# via langchain-fireworks
300268
# via langchain-openai
@@ -446,8 +414,6 @@ tqdm==4.66.4
446414
transformers==4.43.3
447415
# via langchain-huggingface
448416
# via sentence-transformers
449-
triton==2.2.0
450-
# via torch
451417
typing-extensions==4.12.2
452418
# via anthropic
453419
# via anyio

scrapegraphai/nodes/conditional_node.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""
1+
"""
22
Module for implementing the conditional node
33
"""
44
from typing import Optional, List
@@ -28,17 +28,9 @@ class ConditionalNode(BaseNode):
2828
2929
"""
3030

31-
def __init__(self,
32-
input: str,
33-
output: List[str],
34-
node_config: Optional[dict] = None,
35-
node_name: str = "GenerateAnswerCSV",
36-
):
31+
def __init__(self):
3732
"""
38-
Initializes the node with the key to check and the next node names based on the condition.
39-
40-
Args:
41-
key_name (str): The name of the key to check in the state.
33+
Initializes an empty ConditionalNode.
4234
"""
4335

4436
#super().__init__(node_name, "node", input, output, 2, node_config)

scrapegraphai/nodes/fetch_node.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def handle_web_source(self, state, source):
260260

261261
if (isinstance(self.llm_model, ChatOpenAI)
262262
and not self.script_creator) or (self.force and not self.script_creator):
263-
parsed_content = convert_to_md(source, input_data[0])
263+
parsed_content = convert_to_md(source, parsed_content)
264264

265265
compressed_document = [Document(page_content=parsed_content)]
266266
else:
@@ -288,14 +288,14 @@ def handle_web_source(self, state, source):
288288
parsed_content = document[0].page_content
289289

290290
if isinstance(self.llm_model, ChatOpenAI) and not self.script_creator or self.force and not self.script_creator and not self.openai_md_enabled:
291-
parsed_content = convert_to_md(document[0].page_content, input_data[0])
291+
parsed_content = convert_to_md(document[0].page_content, parsed_content)
292292

293293
compressed_document = [
294294
Document(page_content=parsed_content, metadata={"source": "html file"})
295295
]
296296

297297
return self.update_state(state, compressed_document)
298-
298+
299299
def update_state(self, state, compressed_document):
300300
"""
301301
Updates the state with the output data from the node.
@@ -308,6 +308,6 @@ def update_state(self, state, compressed_document):
308308
Returns:
309309
dict: The updated state with the output data.
310310
"""
311-
311+
312312
state.update({self.output[0]: compressed_document,})
313-
return state
313+
return state

0 commit comments

Comments
 (0)