mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-05 08:55:28 +08:00
This change reorganizes the codebase for better maintainability and performance while preserving API surface. - Create ds2api package with modules: core, services, utils, models - Migrate config, logging, auth, DeepSeek, PoW, and message processing into dedicated modules - Introduce PoW caching (60s TTL) and async/parallel support (scalability for multiple requests) - Replace direct curl calls with a pool-enabled HTTP client setup and WASM-based PoW engine - Add in-memory token/account management scaffolding and improved token estimation - Optimize streaming paths and prepare for better backpressure and concurrency - Remove transformers/tokenizer usage and keep a simple token length estimator Non-breaking migration: keep API endpoints intact; new structure under ds2api is transparent to clients
52 lines
429 B
Plaintext
52 lines
429 B
Plaintext
*.bak
|
|
config.json
|
|
tokenizer.json
|
|
tokenizer_config.json
|
|
|
|
# Python
|
|
__pycache__/
|
|
*.py[cod]
|
|
*$py.class
|
|
*.so
|
|
.Python
|
|
build/
|
|
develop-eggs/
|
|
dist/
|
|
downloads/
|
|
eggs/
|
|
.eggs/
|
|
lib/
|
|
lib64/
|
|
parts/
|
|
sdist/
|
|
var/
|
|
wheels/
|
|
pip-wheel-metadata/
|
|
share/python-wheels/
|
|
*.egg-info/
|
|
.installed.cfg
|
|
*.egg
|
|
MANIFEST
|
|
|
|
# Virtual environments
|
|
venv/
|
|
ENV/
|
|
env/
|
|
.venv
|
|
|
|
# IDE
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
.DS_Store
|
|
|
|
# Logs
|
|
*.log
|
|
logs/
|
|
uvicorn.log
|
|
|
|
# Vercel
|
|
.vercel
|