chore: linting (#414)
This commit is contained in:
@@ -52,8 +52,7 @@ class CustomAppConfig(BaseAppConfig):
|
||||
super().__init__(
|
||||
log_level=log_level,
|
||||
embedding_fn=CustomAppConfig.embedding_function(
|
||||
embedding_function=embedding_fn, model=embedding_fn_model,
|
||||
deployment_name=deployment_name
|
||||
embedding_function=embedding_fn, model=embedding_fn_model, deployment_name=deployment_name
|
||||
),
|
||||
db=db,
|
||||
host=host,
|
||||
|
||||
@@ -46,12 +46,13 @@ class DataFormatter:
|
||||
"sitemap": SitemapLoader(),
|
||||
"docs_site": DocsSiteLoader(),
|
||||
}
|
||||
lazy_loaders = ("notion", )
|
||||
lazy_loaders = ("notion",)
|
||||
if data_type in loaders:
|
||||
return loaders[data_type]
|
||||
elif data_type in lazy_loaders:
|
||||
if data_type == "notion":
|
||||
from embedchain.loaders.notion import NotionLoader
|
||||
|
||||
return NotionLoader()
|
||||
else:
|
||||
raise ValueError(f"Unsupported data type: {data_type}")
|
||||
|
||||
@@ -65,7 +65,7 @@ def use_pysqlite3():
|
||||
import datetime
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
subprocess.check_call(
|
||||
[sys.executable, "-m", "pip", "install", "pysqlite3-binary", "--quiet", "--disable-pip-version-check"]
|
||||
)
|
||||
@@ -86,6 +86,6 @@ def use_pysqlite3():
|
||||
print(
|
||||
f"{current_time} [embedchain] [ERROR]",
|
||||
"Failed to swap std-lib sqlite3 with pysqlite3 for ChromaDb compatibility.",
|
||||
f"Error:",
|
||||
e
|
||||
"Error:",
|
||||
e,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user