mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-06 23:15:53 +08:00
version = "0.3.0.20240506"
This commit is contained in:
parent
f049a9f81c
commit
22e3797c05
@ -32,12 +32,13 @@ def _import_config_mod_load(import_config_mod: str) -> Dict:
|
|||||||
|
|
||||||
file_names = os.listdir(user_config_path)
|
file_names = os.listdir(user_config_path)
|
||||||
|
|
||||||
if (import_config_mod + ".py",) not in file_names:
|
if import_config_mod + ".py" not in file_names:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"Missing {file_names}.py file in {user_config_path}, Skip."
|
f"Missing {file_names}.py file in {user_config_path}, Skip."
|
||||||
)
|
)
|
||||||
user_import = False
|
user_import = False
|
||||||
if user_import:
|
if user_import:
|
||||||
|
|
||||||
# Dynamic loading {config}.py file
|
# Dynamic loading {config}.py file
|
||||||
py_path = os.path.join(user_config_path, import_config_mod + ".py")
|
py_path = os.path.join(user_config_path, import_config_mod + ".py")
|
||||||
spec = importlib.util.spec_from_file_location(
|
spec = importlib.util.spec_from_file_location(
|
||||||
@ -54,7 +55,10 @@ def _import_config_mod_load(import_config_mod: str) -> Dict:
|
|||||||
"module": module,
|
"module": module,
|
||||||
}
|
}
|
||||||
|
|
||||||
except ImportError:
|
except ImportError as e:
|
||||||
|
logger.error(
|
||||||
|
f"Failed to load user config from {user_config_path}, Skip.", e
|
||||||
|
)
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
user_import = False
|
user_import = False
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "langchain-chatchat"
|
name = "langchain-chatchat"
|
||||||
version = "0.3.0"
|
version = "0.3.0.20240506"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["chatchat"]
|
authors = ["chatchat"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user