ragflow/api/utils
SmartDever02 9ce780fefd refactor: Move WebSocket API to SDK pattern following session.py
- Moved websocket_app.py to api/apps/sdk/websocket.py
- Follows same structure as session.py for SDK endpoints
- Added ws_token_required decorator in api_utils.py (mirrors token_required)
- WebSocket endpoints now use SDK pattern:
  * @manager.websocket('/chats/<chat_id>/completions')
  * @manager.websocket('/agents/<agent_id>/completions')
- Removed old api/apps/websocket_app.py
- Added websockets>=14.0 and pytest-asyncio>=0.24.0 to test dependencies

Addresses reviewer feedback: websocket_app.py should mimic session.py in /api/sdk
for third-party calls, with /agents/<agent_id>/completions and
/chats/<chat_id>/completions endpoints similar to those in session.py
2025-12-05 01:32:00 -03:00
..
__init__.py Remove 'get_lan_ip' and add common misc_utils.py (#10880) 2025-10-31 16:42:01 +08:00
api_utils.py refactor: Move WebSocket API to SDK pattern following session.py 2025-12-05 01:32:00 -03:00
base64_image.py Move base64_image related functions to common directory (#10957) 2025-11-03 15:20:46 +08:00
commands.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
common.py Move some functions out of 'api/utils/common.py' (#10948) 2025-11-03 12:34:47 +08:00
configs.py Introduce common/config_utils.py (#10968) 2025-11-03 17:25:06 +08:00
crypt.py Move 'get_project_base_directory' to common directory (#10940) 2025-11-02 21:05:28 +08:00
email_templates.py Minor tweats (#11271) 2025-11-16 19:29:20 +08:00
file_utils.py Feature/doc upload api add parent path 20251112 (#11231) 2025-11-13 09:59:39 +08:00
health_utils.py Fix: check task executor alive and display status (#11270) 2025-11-14 15:52:28 +08:00
json_encode.py Minor tweats (#11271) 2025-11-16 19:29:20 +08:00
log_utils.py Refactor log utils (#10973) 2025-11-03 20:25:02 +08:00
validation_utils.py feat: Auto-disable Raptor for structured data (Issue #11653) (#11676) 2025-12-03 17:02:29 +08:00
web_utils.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00