refactor(backend): incremental architecture evolution (Task 19)

- Add common/ layer for shared capabilities (LLM, RAG, document, middleware)
- Add legacy/ layer for existing business code
- Move files to new structure (controllers, routes, services)
- Update index.ts for new route registration
- System remains fully functional
This commit is contained in:
2025-11-16 15:42:44 +08:00
parent 8a17dc80ae
commit 0c5310fb77
39 changed files with 3904 additions and 353 deletions

View File

@@ -27,8 +27,15 @@ export const config = {
// LLM API配置
deepseekApiKey: process.env.DEEPSEEK_API_KEY || '',
deepseekBaseUrl: process.env.DEEPSEEK_BASE_URL || 'https://api.deepseek.com',
dashscopeApiKey: process.env.DASHSCOPE_API_KEY || '', // 用于Qwen模型
geminiApiKey: process.env.GEMINI_API_KEY || '',
// CloseAI配置代理OpenAI和Claude
closeaiApiKey: process.env.CLOSEAI_API_KEY || '',
closeaiOpenaiBaseUrl: process.env.CLOSEAI_OPENAI_BASE_URL || 'https://api.openai-proxy.org/v1',
closeaiClaudeBaseUrl: process.env.CLOSEAI_CLAUDE_BASE_URL || 'https://api.openai-proxy.org/anthropic',
// Dify配置
difyApiKey: process.env.DIFY_API_KEY || '',