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.
Files changed (47) hide show
  1. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/PKG-INFO +5 -5
  2. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/README.md +4 -4
  3. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/pyproject.toml +1 -1
  4. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/helpers/models_tokens.py +2 -0
  5. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/generate_scraper_node.py +1 -1
  6. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/search_internet_node.py +0 -1
  7. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/convert_to_csv.py +1 -3
  8. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/convert_to_json.py +1 -1
  9. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/LICENSE +0 -0
  10. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/__init__.py +0 -0
  11. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/builders/__init__.py +0 -0
  12. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/builders/graph_builder.py +0 -0
  13. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/__init__.py +0 -0
  14. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/abstract_graph.py +0 -0
  15. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/base_graph.py +0 -0
  16. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/script_creator_graph.py +0 -0
  17. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/search_graph.py +0 -0
  18. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/smart_scraper_graph.py +0 -0
  19. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/graphs/speech_graph.py +0 -0
  20. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/helpers/__init__.py +0 -0
  21. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/helpers/nodes_metadata.py +0 -0
  22. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/helpers/schemas.py +0 -0
  23. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/__init__.py +0 -0
  24. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/azure_openai.py +0 -0
  25. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/gemini.py +0 -0
  26. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/hugging_face.py +0 -0
  27. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/ollama.py +0 -0
  28. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/openai.py +0 -0
  29. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/openai_itt.py +0 -0
  30. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/models/openai_tts.py +0 -0
  31. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/__init__.py +0 -0
  32. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/base_node.py +0 -0
  33. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/conditional_node.py +0 -0
  34. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/fetch_node.py +0 -0
  35. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/generate_answer_node.py +0 -0
  36. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/get_probable_tags_node.py +0 -0
  37. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/image_to_text_node.py +0 -0
  38. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/parse_node.py +0 -0
  39. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/rag_node.py +0 -0
  40. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/nodes/text_to_speech_node.py +0 -0
  41. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/__init__.py +0 -0
  42. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/parse_state_keys.py +0 -0
  43. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/prettify_exec_info.py +0 -0
  44. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/remover.py +0 -0
  45. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/research_web.py +0 -0
  46. {scrapegraphai-0.2.6 → scrapegraphai-0.2.7}/scrapegraphai/utils/save_audio_from_bytes.py +0 -0
  47. {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.6
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
  [![Downloads](https://static.pepy.tech/badge/scrapegraphai)](https://pepy.tech/project/scrapegraphai)
39
39
  [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
40
40
  [![Pylint](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml/badge.svg)](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml)
41
+ [![CodeQL](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/codeql.yml/badge.svg)](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/codeql.yml)
41
42
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
42
43
  [![](https://dcbadge.vercel.app/api/server/gkxQDAjfeX)](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 arbitrarily
92
+ "base_url": "http://localhost:11434", # set Ollama URL
92
93
  },
93
94
  "embeddings": {
94
95
  "model": "ollama/nomic-embed-text",
95
- "temperature": 0,
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 run stablelm-zephyr
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
  [![Downloads](https://static.pepy.tech/badge/scrapegraphai)](https://pepy.tech/project/scrapegraphai)
4
4
  [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
5
5
  [![Pylint](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml/badge.svg)](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/pylint.yml)
6
+ [![CodeQL](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/codeql.yml/badge.svg)](https://github.com/VinciGit00/Scrapegraph-ai/actions/workflows/codeql.yml)
6
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
8
  [![](https://dcbadge.vercel.app/api/server/gkxQDAjfeX)](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 arbitrarily
57
+ "base_url": "http://localhost:11434", # set Ollama URL
57
58
  },
58
59
  "embeddings": {
59
60
  "model": "ollama/nomic-embed-text",
60
- "temperature": 0,
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 run stablelm-zephyr
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "scrapegraphai"
3
- version = "0.2.6"
3
+ version = "0.2.7"
4
4
  description = "A web scraping library based on LangChain which uses LLM and direct graph logic to create scraping pipelines."
5
5
  authors = [
6
6
  "Marco Vinciguerra <mvincig11@gmail.com>",
@@ -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 (ChatOpenAI): An instance of a language model client, configured for generating answers.
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
- raise ValueError("The filename should not contain '.csv'")
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
- raise ValueError("The filename should not contain '.json'")
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