Skip to content

Commit

Permalink
Update langchain pin. Modify langchain import. (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmitsch authored Nov 13, 2023
1 parent 52a6555 commit e0bee0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spacy_llm/models/langchain/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e0bee0d

Please sign in to comment.