refactor: centralize DIFY settings in config.py and cleanup env files

- Update config.py to read both .env and .env.local (with .env.local priority)
- Move DIFY API settings from hardcoded values to environment configuration
- Remove unused PADDLEOCR_MODEL_DIR setting (models stored in ~/.paddleocr/)
- Remove deprecated argostranslate translation settings
- Add DIFY settings: base_url, api_key, timeout, max_retries, batch limits
- Update dify_client.py to use settings from config.py
- Update translation_service.py to use settings instead of constants
- Fix frontend env files to use correct variable name VITE_API_BASE_URL
- Update setup_dev_env.sh with correct PaddlePaddle version (3.2.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
egg
2025-12-02 17:50:47 +08:00
parent d7f7166a2d
commit c006905b6f
6 changed files with 131 additions and 67 deletions

View File

@@ -4,4 +4,4 @@
# Backend API URL
# For local development: http://localhost:8000
# For WSL2: Use the WSL2 IP address (get with: hostname -I | awk '{print $1}')
VITE_API_URL=http://localhost:8000
VITE_API_BASE_URL=http://localhost:8000