Skip to content

Commit 3f95801

Browse files
committed
1 parent b454fec commit 3f95801

File tree

15 files changed

+124
-106
lines changed

15 files changed

+124
-106
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ examples/graph_examples/ScrapeGraphAI_generated_graph
3131
examples/**/*.csv
3232
examples/**/*.json
3333
main.py
34+
poetry.lock
35+
36+
# lock files
37+
*.lock

examples/gemini/script_generator_gemini.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"api_key": gemini_key,
2222
"model": "gpt-3.5-turbo",
2323
},
24+
"library": "beautifoulsoup"
2425
}
2526

2627
# ************************************************

examples/local_models/Docker/script_generator_docker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"embeddings": {
1919
"model": "ollama/nomic-embed-text",
2020
"temperature": 0,
21-
}
21+
},
22+
"library": "beautifoulsoup"
2223
}
2324

2425
# ************************************************

examples/local_models/Ollama/script_generator_ollama.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""
1+
"""
22
Basic example of scraping pipeline using ScriptCreatorGraph
33
"""
44
from scrapegraphai.graphs import ScriptCreatorGraph
@@ -11,15 +11,15 @@
1111
"llm": {
1212
"model": "ollama/mistral",
1313
"temperature": 0,
14-
"format": "json", # Ollama needs the format to be specified explicitly
1514
# "model_tokens": 2000, # set context length arbitrarily,
1615
"base_url": "http://localhost:11434", # set ollama URL arbitrarily
1716
},
1817
"embeddings": {
1918
"model": "ollama/nomic-embed-text",
2019
"temperature": 0,
2120
"base_url": "http://localhost:11434", # set ollama URL arbitrarily
22-
}
21+
},
22+
"library": "beautifoulsoup"
2323
}
2424

2525
# ************************************************

examples/local_models/Ollama/smart_scraper_ollama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
graph_config = {
1111
"llm": {
1212
"model": "ollama/mistral",
13-
"temperature": 0,
13+
"temperature": 1,
1414
"format": "json", # Ollama needs the format to be specified explicitly
1515
# "model_tokens": 2000, # set context length arbitrarily,
1616
"base_url": "http://localhost:11434", # set ollama URL arbitrarily

examples/openai/script_generator_openai.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"api_key": openai_key,
2121
"model": "gpt-3.5-turbo",
2222
},
23+
"library": "beautifoulsoup"
2324
}
2425

2526
# ************************************************

manual deployment/commit_and_push.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cd ..
2121
commit_message="$1"
2222

2323
# Run Pylint on the specified Python files
24-
pylint pylint scrapegraphai/**/*.py scrapegraphai/*.py
24+
pylint pylint scrapegraphai/**/*.py scrapegraphai/*.py tests/*.py
2525
#Make the pull
2626
git pull
2727

poetry.lock

Lines changed: 70 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "scrapegraphai"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
description = "A web scraping library based on LangChain which uses LLM and direct graph logic to create scraping pipelines."
55
authors = [
66
"Marco Vinciguerra <[email protected]>",

scrapegraphai/graphs/abstract_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from ..models import OpenAI, Gemini, Ollama, AzureOpenAI, HuggingFace
77
from ..helpers import models_tokens
88

9+
910
class AbstractGraph(ABC):
1011
"""
1112
Abstract class representing a generic graph-based tool.
@@ -22,7 +23,6 @@ def __init__(self, prompt: str, config: dict, source: Optional[str] = None):
2223
self.embedder_model = None if "embeddings" not in config else self._create_llm(
2324
config["embeddings"])
2425
self.graph = self._create_graph()
25-
2626
self.final_state = None
2727
self.execution_info = None
2828

@@ -88,7 +88,7 @@ def get_execution_info(self):
8888
Returns the execution information of the graph.
8989
"""
9090
return self.execution_info
91-
91+
9292
@abstractmethod
9393
def _create_graph(self):
9494
"""

0 commit comments

Comments
 (0)