Преглед на файлове

[chore] fix wrong import of LLMs from langchain (#1002)

Sidharth Mohanty преди 1 година
родител
ревизия
7910cee259
променени са 3 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      embedchain/llm/cohere.py
  2. 1 1
      embedchain/llm/huggingface.py
  3. 1 1
      embedchain/llm/llama2.py

+ 1 - 1
embedchain/llm/cohere.py

@@ -2,7 +2,7 @@ import importlib
 import os
 from typing import Optional
 
-from langchain.llms import Cohere
+from langchain.llms.cohere import Cohere
 
 from embedchain.config import BaseLlmConfig
 from embedchain.helpers.json_serializable import register_deserializable

+ 1 - 1
embedchain/llm/huggingface.py

@@ -3,7 +3,7 @@ import logging
 import os
 from typing import Optional
 
-from langchain.llms import HuggingFaceHub
+from langchain.llms.huggingface_hub import HuggingFaceHub
 
 from embedchain.config import BaseLlmConfig
 from embedchain.helpers.json_serializable import register_deserializable

+ 1 - 1
embedchain/llm/llama2.py

@@ -2,7 +2,7 @@ import importlib
 import os
 from typing import Optional
 
-from langchain.llms import Replicate
+from langchain.llms.replicate import Replicate
 
 from embedchain.config import BaseLlmConfig
 from embedchain.helpers.json_serializable import register_deserializable