去掉MCP框架,重构

This commit is contained in:
lixinyue
2026-01-20 10:16:22 +08:00
parent 4976fccf7d
commit 8881daf592
4 changed files with 1 additions and 53 deletions

View File

@@ -147,8 +147,7 @@ class Settings:
# Celery configuration (internal)
CELERY_BROKER: int = int(os.getenv("CELERY_BROKER", "1"))
CELERY_BACKEND: int = int(os.getenv("CELERY_BACKEND", "2"))
BROKER_URL: str = os.getenv("BROKER_URL", f"redis://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/{CELERY_BROKER}")
RESULT_BACKEND: str = os.getenv("RESULT_BACKEND", f"redis://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/{CELERY_BACKEND}")
REFLECTION_INTERVAL_SECONDS: float = float(os.getenv("REFLECTION_INTERVAL_SECONDS", "300"))
HEALTH_CHECK_SECONDS: float = float(os.getenv("HEALTH_CHECK_SECONDS", "600"))
MEMORY_INCREMENT_INTERVAL_HOURS: float = float(os.getenv("MEMORY_INCREMENT_INTERVAL_HOURS", "24"))

View File

@@ -1,46 +0,0 @@
"""
Problem_Extension优化配置
在应用启动时应用这些优化配置
"""
# 优化配置
PROBLEM_EXTENSION_CONFIG = {
# 缓存配置
"cache_enabled": True,
"cache_ttl": 3600, # 1小时
# 超时配置
"llm_timeout": 8.0, # 8秒超时
"max_retries": 1, # 最多重试1次
# 批处理配置
"max_questions_per_batch": 10,
"batch_timeout": 15.0,
# 性能监控
"monitoring_enabled": True,
"slow_query_threshold": 10.0, # 10秒为慢查询
# 连接池配置
"client_pool_size": 3,
# 简化模式
"use_simplified_prompt": True,
"skip_history_for_simple_queries": True,
}
def apply_optimizations():
"""应用优化配置"""
import os
# 设置环境变量
for key, value in PROBLEM_EXTENSION_CONFIG.items():
env_key = f"PROBLEM_EXTENSION_{key.upper()}"
os.environ[env_key] = str(value)
print("✅ Problem_Extension优化配置已应用")
if __name__ == "__main__":
apply_optimizations()

View File

@@ -30,9 +30,6 @@ async def write_node(state: WriteState) -> WriteState:
group_id=group_id,
memory_config=memory_config,
)
print('-----------')
print(result)
print('-----------')
logger.info(f"Write completed successfully! Config: {memory_config.config_name}")
write_result= {

View File

@@ -26,8 +26,6 @@ services:
container_name: worker
env_file:
- .env
environment:
# - MCP_SERVER_URL=
volumes:
- ./files:/files
- /etc/localtime:/etc/localtime:ro