diff --git a/sijapi/helpers/db.py b/sijapi/helpers/db.py index 7454d90..4cf142b 100644 --- a/sijapi/helpers/db.py +++ b/sijapi/helpers/db.py @@ -4,7 +4,7 @@ import yaml from pathlib import Path async def load_config(): - config_path = Path(__file__).parent.parent / 'config' / 'db.yaml' + config_path = Path(__file__).parent.parent / 'config' / 'sys.yaml' with open(config_path, 'r') as file: return yaml.safe_load(file) diff --git a/sijapi/helpers/replicator.py b/sijapi/helpers/replicator.py index 434a353..526bd47 100644 --- a/sijapi/helpers/replicator.py +++ b/sijapi/helpers/replicator.py @@ -1,3 +1,5 @@ +# helpers/replicator.py + import asyncio import asyncpg import yaml diff --git a/sijapi/helpers/start.py b/sijapi/helpers/start.py index e18fe7b..9fa7ce1 100644 --- a/sijapi/helpers/start.py +++ b/sijapi/helpers/start.py @@ -149,7 +149,7 @@ def kill_remote_server(server): def main(): load_env() - db_config = load_config('db') + db_config = load_config('sys') pool = db_config['POOL'] local_ts_id = os.environ.get('TS_ID') diff --git a/sijapi/routers/llm.py b/sijapi/routers/llm.py index e28afbd..cbe33c7 100644 --- a/sijapi/routers/llm.py +++ b/sijapi/routers/llm.py @@ -644,7 +644,7 @@ async def extract_text(file: Union[UploadFile, bytes, bytearray, str, Path], bg_ try: if isinstance(file, UploadFile): - info("File is an UploadFile object") + l.info("File is an UploadFile object") file_extension = os.path.splitext(file.filename)[1] temp_file_path = tempfile.mktemp(suffix=file_extension) with open(temp_file_path, 'wb') as buffer: