Skip to content

Commit ce6be37

Browse files
committed
fix: abstract_graph moel token bug
1 parent 208ab26 commit ce6be37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scrapegraphai/graphs/abstract_graph.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ def _create_llm(self, llm_config: dict, chat=False) -> object:
148148

149149
# If model instance is passed directly instead of the model details
150150
if "model_instance" in llm_params:
151+
try:
152+
self.model_token = llm_params["model_tokens"]
153+
except KeyError as exc:
154+
raise KeyError("model_tokens not specified") from exc
151155
return llm_params["model_instance"]
152156

153157
# Instantiate the language model based on the model name

0 commit comments

Comments
 (0)