mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-01 21:00:48 +08:00
feat: update exception
Co-Authored-By: Federico Aguzzi <62149513+f-aguzzi@users.noreply.github.com>
This commit is contained in:
parent
3b5ee767cb
commit
3876cb7be8
@ -159,7 +159,8 @@ class AbstractGraph(ABC):
|
|||||||
self.model_token = 8192
|
self.model_token = 8192
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if llm_params["model_provider"] not in {"oneapi","nvidia","ernie","deepseek","togetherai"}:
|
if llm_params["model_provider"] not in \
|
||||||
|
{"oneapi","nvidia","ernie","deepseek","togetherai"}:
|
||||||
if llm_params["model_provider"] == "bedrock":
|
if llm_params["model_provider"] == "bedrock":
|
||||||
llm_params["model_kwargs"] = { "temperature" : llm_params.pop("temperature") }
|
llm_params["model_kwargs"] = { "temperature" : llm_params.pop("temperature") }
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
@ -195,7 +196,7 @@ class AbstractGraph(ABC):
|
|||||||
return ChatNVIDIA(**llm_params)
|
return ChatNVIDIA(**llm_params)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error instancing model: {e}")
|
raise Exception(f"Error instancing model: {e}")
|
||||||
|
|
||||||
|
|
||||||
def get_state(self, key=None) -> dict:
|
def get_state(self, key=None) -> dict:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user