Kaynağa Gözat

[chore] fix lint issues (#607)

Deshraj Yadav 1 yıl önce
ebeveyn
işleme
701d0b21ef
2 değiştirilmiş dosya ile 2 ekleme ve 5 silme
  1. 1 1
      embedchain/llm/base.py
  2. 1 4
      embedchain/loaders/mdx.py

+ 1 - 1
embedchain/llm/base.py

@@ -204,7 +204,7 @@ class BaseLlm(JSONSerializable):
         finally:
             if config:
                 # Restore previous config
-                self.config: BaseLlmConfig = BaseLlmConfig.deserialize(prev_config)      
+                self.config: BaseLlmConfig = BaseLlmConfig.deserialize(prev_config)
 
     def chat(self, input_query: str, contexts: List[str], config: BaseLlmConfig = None, dry_run=False):
         """

+ 1 - 4
embedchain/loaders/mdx.py

@@ -1,17 +1,14 @@
 import hashlib
 
-from langchain.document_loaders import PyPDFLoader
-
 from embedchain.helper.json_serializable import register_deserializable
 from embedchain.loaders.base_loader import BaseLoader
-from embedchain.utils import clean_string
 
 
 @register_deserializable
 class MdxLoader(BaseLoader):
     def load_data(self, url):
         """Load data from a mdx file."""
-        with open(url, 'r', encoding="utf-8") as infile:
+        with open(url, "r", encoding="utf-8") as infile:
             content = infile.read()
         meta_data = {
             "url": url,