[chore] fix lint issues (#607)
This commit is contained in:
@@ -204,7 +204,7 @@ class BaseLlm(JSONSerializable):
|
|||||||
finally:
|
finally:
|
||||||
if config:
|
if config:
|
||||||
# Restore previous 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):
|
def chat(self, input_query: str, contexts: List[str], config: BaseLlmConfig = None, dry_run=False):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from langchain.document_loaders import PyPDFLoader
|
|
||||||
|
|
||||||
from embedchain.helper.json_serializable import register_deserializable
|
from embedchain.helper.json_serializable import register_deserializable
|
||||||
from embedchain.loaders.base_loader import BaseLoader
|
from embedchain.loaders.base_loader import BaseLoader
|
||||||
from embedchain.utils import clean_string
|
|
||||||
|
|
||||||
|
|
||||||
@register_deserializable
|
@register_deserializable
|
||||||
class MdxLoader(BaseLoader):
|
class MdxLoader(BaseLoader):
|
||||||
def load_data(self, url):
|
def load_data(self, url):
|
||||||
"""Load data from a mdx file."""
|
"""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()
|
content = infile.read()
|
||||||
meta_data = {
|
meta_data = {
|
||||||
"url": url,
|
"url": url,
|
||||||
|
|||||||
Reference in New Issue
Block a user