mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-06-25 21:11:11 +08:00
fix: bug for claude
This commit is contained in:
parent
7c91f9f94c
commit
d0167dee71
@ -148,7 +148,7 @@ class AbstractGraph(ABC):
|
|||||||
except KeyError as exc:
|
except KeyError as exc:
|
||||||
raise KeyError("Model not supported") from exc
|
raise KeyError("Model not supported") from exc
|
||||||
return Gemini(llm_params)
|
return Gemini(llm_params)
|
||||||
elif "claude" in llm_params["model"]:
|
elif llm_params["model"].startswith("claude"):
|
||||||
try:
|
try:
|
||||||
self.model_token = models_tokens["claude"][llm_params["model"]]
|
self.model_token = models_tokens["claude"][llm_params["model"]]
|
||||||
except KeyError as exc:
|
except KeyError as exc:
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
"""
|
|
||||||
Anthropic Module
|
|
||||||
"""
|
|
||||||
from langchain_anthropic import ChatAnthropic
|
|
||||||
|
|
||||||
|
|
||||||
class Anthropic(ChatAnthropic):
|
|
||||||
"""
|
|
||||||
A wrapper for the ChatAnthropic class that provides default configuration
|
|
||||||
and could be extended with additional methods if needed.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
llm_config (dict): Configuration parameters for the language model.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, llm_config: dict):
|
|
||||||
super().__init__(**llm_config)
|
|
||||||
Loading…
Reference in New Issue
Block a user