Skip to content

Commit cf73883

Browse files
committed
fix: bug for abstract graph
1 parent 050fa3f commit cf73883

File tree

5 files changed

+2
-54
lines changed

5 files changed

+2
-54
lines changed

examples/local_models/smart_scraper_ollama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
graph_config = {
1111
"llm": {
12-
"model": "ollama/mistral",
12+
"model": "ollama/llama3.1",
1313
"temperature": 0,
1414
"format": "json", # Ollama needs the format to be specified explicitly
1515
# "base_url": "http://localhost:11434", # set ollama URL arbitrarily

requirements-dev.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ graphviz==0.20.3
130130
# via burr
131131
greenlet==3.0.3
132132
# via playwright
133-
# via sqlalchemy
134133
grpcio==1.65.4
135134
# via google-api-core
136135
# via grpcio-status

requirements.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ googleapis-common-protos==1.63.2
8383
# via grpcio-status
8484
greenlet==3.0.3
8585
# via playwright
86-
# via sqlalchemy
8786
grpcio==1.65.1
8887
# via google-api-core
8988
# via grpcio-status

scrapegraphai/graphs/abstract_graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def _create_llm(self, llm_config: dict) -> object:
139139
raise ValueError(f"Provider {llm_params['model_provider']} is not supported. If possible, try to use a model instance instead.")
140140

141141
try:
142-
self.model_token = models_tokens[llm_params["model"]][llm_params["model"]]
142+
self.model_token = models_tokens[llm_params["model_provider"]].get(llm_params["model"][0])
143143
except KeyError:
144144
print("Model not found, using default token size (8192)")
145145
self.model_token = 8192

tests/graphs/scrape_json_ollama_test.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)