diff --git a/setup.cfg b/setup.cfg index 2464317a..24e95770 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,7 +45,7 @@ spacy_misc = [options.extras_require] langchain = - langchain==0.0.331 + langchain==0.0.335 transformers = torch>=1.13.1,<2.0 transformers>=4.28.1,<5.0 diff --git a/spacy_llm/models/langchain/model.py b/spacy_llm/models/langchain/model.py index 6c491fd3..03657cdf 100644 --- a/spacy_llm/models/langchain/model.py +++ b/spacy_llm/models/langchain/model.py @@ -43,7 +43,7 @@ def get_type_to_cls_dict() -> Dict[ """Returns langchain.llms.type_to_cls_dict. RETURNS (Dict[str, Type[langchain.base_language.BaseLanguageModel]]): langchain.llms.type_to_cls_dict. """ - return langchain.llms.type_to_cls_dict + return getattr(langchain.llms, "type_to_cls_dict") def __call__(self, prompts: Iterable[Any]) -> Iterable[Any]: """Executes prompts on specified API.