You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ~/.pyenv/versions/3.11.3/envs/document_classifier/lib/python3.11/site-packages/spacy_llm/models/langchain/model.py:106, in LangChain.register_models()
98 if not has_langchain or any(
99 [
100 (handle.startswith("langchain"))
101 for handle in registry.llm_models.get_all()
102 ]
103 ):
104 return
--> 106 for class_id, cls in LangChain.get_type_to_cls_dict().items():
107 registry.llm_models.register(
108 f"langchain.{cls.__name__}.v1",
109 func=LangChain._langchain_model_maker(class_id=class_id),
110 )
File ~/.pyenv/versions/3.11.3/envs/document_classifier/lib/python3.11/site-packages/spacy_llm/models/langchain/model.py:38, in LangChain.get_type_to_cls_dict()
33 @staticmethod
34 def get_type_to_cls_dict() -> Dict[str, Type["langchain.llms.base.BaseLLM"]]:
35 """Returns langchain.llms.type_to_cls_dict.
36 RETURNS (Dict[str, Type[langchain.llms.base.BaseLLM]]): langchain.llms.type_to_cls_dict.
37 """
---> 38 return langchain.llms.type_to_cls_dict
File ~/.pyenv/versions/3.11.3/envs/document_classifier/lib/python3.11/site-packages/langchain/__init__.py:308, in __getattr__(name)
306 return SerpAPIWrapper
307 else:
--> 308 raise AttributeError(f"Could not find: {name}")
AttributeError: Could not find: llms
spacy_llm/models/langchain/model.py:38, imports langchain.llms.type_to_cls_dict but as of yesterday's Langchain release - https://github.com/langchain-ai/langchain/pull/11017/files they make this import raise an Attribute error that isn't present in theirinit.py`
They warn:
warnings.warn(
f"Importing {name} from langchain root module is no longer supported."
)
The text was updated successfully, but these errors were encountered:
Hi @timothyjlaurent, thanks for reporting this! Unfortunately the langchain API is rather unstable, which is why we pinned it to a specific version in spacy-llm. We'll look into supporting and pinning to 0.0.302 soon.
See the stacktrace below
spacy_llm/models/langchain/model.py:38,
importslangchain.llms.type_to_cls_dict
but as of yesterday's Langchain release - https://github.com/langchain-ai/langchain/pull/11017/files they make this import raise an Attribute error that isn't present in theirThey warn:
The text was updated successfully, but these errors were encountered: