scrapegraphai 0.2.6__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/PKG-INFO +5 -5
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/README.md +4 -4
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/pyproject.toml +1 -1
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/helpers/models_tokens.py +2 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/generate_scraper_node.py +1 -1
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/search_internet_node.py +0 -1
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/convert_to_csv.py +1 -3
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/convert_to_json.py +1 -1
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/LICENSE +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/__init__.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/builders/__init__.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/builders/graph_builder.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/__init__.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/abstract_graph.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/base_graph.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/script_creator_graph.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/search_graph.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/smart_scraper_graph.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/speech_graph.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/helpers/__init__.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/helpers/nodes_metadata.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/helpers/schemas.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/__init__.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/azure_openai.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/gemini.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/hugging_face.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/ollama.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/openai.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/openai_itt.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/openai_tts.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/__init__.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/base_node.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/conditional_node.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/fetch_node.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/generate_answer_node.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/get_probable_tags_node.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/image_to_text_node.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/parse_node.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/rag_node.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/text_to_speech_node.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/__init__.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/parse_state_keys.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/prettify_exec_info.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/remover.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/research_web.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/save_audio_from_bytes.py +0 -0
- {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/token_calculator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: scrapegraphai
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: A web scraping library based on LangChain which uses LLM and direct graph logic to create scraping pipelines.
|
|
5
5
|
Home-page: https://scrapegraph-ai.readthedocs.io/
|
|
6
6
|
License: MIT
|
|
@@ -38,6 +38,7 @@ Description-Content-Type: text/markdown
|
|
|
38
38
|
[](https://pepy.tech/project/scrapegraphai)
|
|
39
39
|
[](https://github.com/pylint-dev/pylint)
|
|
40
40
|
[](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml)
|
|
41
|
+
[](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/codeql.yml)
|
|
41
42
|
[](https://opensource.org/licenses/MIT)
|
|
42
43
|
[](https://discord.gg/gkxQDAjfeX)
|
|
43
44
|
|
|
@@ -88,12 +89,11 @@ graph_config = {
|
|
|
88
89
|
"model": "ollama/mistral",
|
|
89
90
|
"temperature": 0,
|
|
90
91
|
"format": "json", # Ollama needs the format to be specified explicitly
|
|
91
|
-
"base_url": "http://localhost:11434", # set Ollama URL
|
|
92
|
+
"base_url": "http://localhost:11434", # set Ollama URL
|
|
92
93
|
},
|
|
93
94
|
"embeddings": {
|
|
94
95
|
"model": "ollama/nomic-embed-text",
|
|
95
|
-
"
|
|
96
|
-
"base_url": "http://localhost:11434", # set Ollama URL arbitrarily
|
|
96
|
+
"base_url": "http://localhost:11434", # set Ollama URL
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -114,7 +114,7 @@ print(result)
|
|
|
114
114
|
Note: before using the local model remember to create the docker container!
|
|
115
115
|
```text
|
|
116
116
|
docker-compose up -d
|
|
117
|
-
docker exec -it ollama ollama
|
|
117
|
+
docker exec -it ollama ollama pull stablelm-zephyr
|
|
118
118
|
```
|
|
119
119
|
You can use which models avaiable on Ollama or your own model instead of stablelm-zephyr
|
|
120
120
|
```python
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://pepy.tech/project/scrapegraphai)
|
|
4
4
|
[](https://github.com/pylint-dev/pylint)
|
|
5
5
|
[](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml)
|
|
6
|
+
[](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/codeql.yml)
|
|
6
7
|
[](https://opensource.org/licenses/MIT)
|
|
7
8
|
[](https://discord.gg/gkxQDAjfeX)
|
|
8
9
|
|
|
@@ -53,12 +54,11 @@ graph_config = {
|
|
|
53
54
|
"model": "ollama/mistral",
|
|
54
55
|
"temperature": 0,
|
|
55
56
|
"format": "json", # Ollama needs the format to be specified explicitly
|
|
56
|
-
"base_url": "http://localhost:11434", # set Ollama URL
|
|
57
|
+
"base_url": "http://localhost:11434", # set Ollama URL
|
|
57
58
|
},
|
|
58
59
|
"embeddings": {
|
|
59
60
|
"model": "ollama/nomic-embed-text",
|
|
60
|
-
"
|
|
61
|
-
"base_url": "http://localhost:11434", # set Ollama URL arbitrarily
|
|
61
|
+
"base_url": "http://localhost:11434", # set Ollama URL
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -79,7 +79,7 @@ print(result)
|
|
|
79
79
|
Note: before using the local model remember to create the docker container!
|
|
80
80
|
```text
|
|
81
81
|
docker-compose up -d
|
|
82
|
-
docker exec -it ollama ollama
|
|
82
|
+
docker exec -it ollama ollama pull stablelm-zephyr
|
|
83
83
|
```
|
|
84
84
|
You can use which models avaiable on Ollama or your own model instead of stablelm-zephyr
|
|
85
85
|
```python
|
|
@@ -9,6 +9,8 @@ models_tokens = {
|
|
|
9
9
|
"gpt-3.5-turbo-instruct": 4096,
|
|
10
10
|
"gpt-4-0125-preview": 128000,
|
|
11
11
|
"gpt-4-turbo-preview": 128000,
|
|
12
|
+
"gpt-4-turbo": 128000,
|
|
13
|
+
"gpt-4-turbo-2024-04-09": 128000,
|
|
12
14
|
"gpt-4-1106-preview": 128000,
|
|
13
15
|
"gpt-4-vision-preview": 128000,
|
|
14
16
|
"gpt-4": 8192,
|
|
@@ -22,7 +22,7 @@ class GenerateScraperNode(BaseNode):
|
|
|
22
22
|
an answer.
|
|
23
23
|
|
|
24
24
|
Attributes:
|
|
25
|
-
llm
|
|
25
|
+
llm: An instance of a language model client, configured for generating answers.
|
|
26
26
|
node_name (str): The unique identifier name for the node, defaulting
|
|
27
27
|
to "GenerateScraperNode".
|
|
28
28
|
node_type (str): The type of the node, set to "node" indicating a
|
|
@@ -29,7 +29,6 @@ class SearchInternetNode(BaseNode):
|
|
|
29
29
|
generated answer will be stored.
|
|
30
30
|
model_config (dict): Configuration parameters for the language model client.
|
|
31
31
|
node_name (str, optional): The unique identifier name for the node.
|
|
32
|
-
Defaults to "GenerateAnswer".
|
|
33
32
|
|
|
34
33
|
Methods:
|
|
35
34
|
execute(state): Processes the input and document from the state to generate an answer,
|
|
@@ -12,12 +12,10 @@ def convert_to_csv(data: dict, filename: str, position: str = None):
|
|
|
12
12
|
|
|
13
13
|
Args:
|
|
14
14
|
data (dict): Data to be converted to CSV.
|
|
15
|
-
filename (str): Name of the CSV file (without the .csv extension).
|
|
16
15
|
position (str): Optional path where the file should be saved. If not provided,
|
|
17
16
|
the directory of the caller script will be used.
|
|
18
17
|
|
|
19
18
|
Raises:
|
|
20
|
-
ValueError: If the filename contains '.csv'.
|
|
21
19
|
FileNotFoundError: If the specified directory does not exist.
|
|
22
20
|
PermissionError: If the program lacks write permission for the directory.
|
|
23
21
|
TypeError: If the input data is not a dictionary.
|
|
@@ -25,7 +23,7 @@ def convert_to_csv(data: dict, filename: str, position: str = None):
|
|
|
25
23
|
"""
|
|
26
24
|
|
|
27
25
|
if ".csv" in filename:
|
|
28
|
-
|
|
26
|
+
filename = filename.replace(".csv", "") # Remove .csv extension
|
|
29
27
|
|
|
30
28
|
# Get the directory of the caller script if position is not provided
|
|
31
29
|
if position is None:
|
|
@@ -22,7 +22,7 @@ def convert_to_json(data: dict, filename: str, position: str = None):
|
|
|
22
22
|
PermissionError: If the program does not have permission to write to the directory.
|
|
23
23
|
"""
|
|
24
24
|
if ".json" in filename:
|
|
25
|
-
|
|
25
|
+
filename = filename.replace(".json", "") # Remove .csv extension
|
|
26
26
|
|
|
27
27
|
# Get the directory of the caller script
|
|
28
28
|
if position is None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|