Skip to content

Commit 4039793

Browse files
committed
Update abstract_graph.py
1 parent 8272d73 commit 4039793

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scrapegraphai/graphs/abstract_graph.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ def __init__(self, prompt: str, config: dict, source: Optional[str] = None):
4444
self.source = source
4545
self.config = config
4646
self.llm_model = self._create_llm(config["llm"], chat=True)
47-
embeddings_config = config.get("embeddings", {"dimension": 8192})
48-
self.embedder_model = self._create_default_embedder(
49-
llm_config=config["llm"]) if "embeddings" not in config else self._create_embedder(embeddings_config)
47+
print(config["embeddings"])
48+
self.embedder_model = self._create_default_embedder(llm_config=config["llm"]
49+
) if "embeddings" not in config else self._create_embedder(
50+
config["embeddings"])
5051

5152
# Create the graph
5253
self.graph = self._create_graph()
@@ -162,7 +163,7 @@ def _create_llm(self, llm_config: dict, chat=False) -> object:
162163
try:
163164
self.model_token = models_tokens["ollama"][llm_params["model"]]
164165
except KeyError as exc:
165-
raise KeyError("Model not supported") from exc
166+
self.model_token = 8192
166167
else:
167168
self.model_token = 8192
168169
except AttributeError:

0 commit comments

Comments
 (0)