diff --git a/dsRagAnything/Test.py b/dsRagAnything/Test.py index da7d679c..ad9f9296 100644 --- a/dsRagAnything/Test.py +++ b/dsRagAnything/Test.py @@ -1,4 +1,5 @@ import asyncio +import logging from raganything import RAGAnything, RAGAnythingConfig from lightrag.llm.openai import openai_complete_if_cache, openai_embed @@ -6,6 +7,12 @@ from lightrag.utils import EmbeddingFunc import Config.Config +# 控制日志输出 +logger = logging.getLogger('ragAnything') +logger.setLevel(logging.INFO) +handler = logging.StreamHandler() +handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')) +logger.addHandler(handler) async def main(): # 设置 API 配置