mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-06 21:11:37 +08:00
fix: abstract_graph moel token bug
This commit is contained in:
parent
208ab267ce
commit
ce6be37fbc
@ -148,6 +148,10 @@ class AbstractGraph(ABC):
|
|||||||
|
|
||||||
# If model instance is passed directly instead of the model details
|
# If model instance is passed directly instead of the model details
|
||||||
if "model_instance" in llm_params:
|
if "model_instance" in llm_params:
|
||||||
|
try:
|
||||||
|
self.model_token = llm_params["model_tokens"]
|
||||||
|
except KeyError as exc:
|
||||||
|
raise KeyError("model_tokens not specified") from exc
|
||||||
return llm_params["model_instance"]
|
return llm_params["model_instance"]
|
||||||
|
|
||||||
# Instantiate the language model based on the model name
|
# Instantiate the language model based on the model name
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user