更新最新代码

This commit is contained in:
2025-07-04 13:52:08 +08:00
parent af64d962eb
commit be98bb1495
52 changed files with 139981 additions and 5788 deletions
+24
View File
@@ -1,4 +1,24 @@
# src/config.py
import yaml
import os
import logging
from datetime import datetime
current_file = os.path.splitext(os.path.basename(__file__))[0]
now_str = datetime.now().strftime("%Y%m%d%H%M%S")
log_filename = f"{current_file}_{now_str}.log"
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[
logging.FileHandler(os.path.join("logs", log_filename), encoding="utf-8"),
logging.StreamHandler()
],
)
logger = logging.getLogger(current_file)
class Config:
def __init__(self, path="config.yaml"):
@@ -35,3 +55,7 @@ class Config:
@property
def langsmith(self):
return self._config.get("langsmith", {})
@property
def max_retries(self):
return self._config.get("max_retries", 3)