fix: bug for claude

This commit is contained in:
VinciGit00 2024-05-13 13:43:42 +02:00
parent 7c91f9f94c
commit d0167dee71
2 changed files with 1 additions and 18 deletions

View File

@ -148,7 +148,7 @@ class AbstractGraph(ABC):
except KeyError as exc:
raise KeyError("Model not supported") from exc
return Gemini(llm_params)
elif "claude" in llm_params["model"]:
elif llm_params["model"].startswith("claude"):
try:
self.model_token = models_tokens["claude"][llm_params["model"]]
except KeyError as exc:

View File

@ -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)