ragflow/api
SmartDever02 e300873288 feat: Add WebSocket API for streaming responses
- Add WebSocket endpoint at /v1/ws/chat for real-time streaming
- Support multiple authentication methods (API token, user session, query params)
- Enable bidirectional communication for platforms like WeChat Mini Programs
- Implement streaming chat completions with incremental responses
- Add comprehensive error handling and connection management
- Include extensive inline documentation and comments

New files:
- api/apps/websocket_app.py: Main WebSocket API implementation
- docs/guides/websocket_api.md: Complete API documentation
- example/websocket/python_client.py: Python example client
- example/websocket/index.html: Web-based demo client
- example/websocket/README.md: Examples documentation

Features:
- Persistent WebSocket connections for multi-turn conversations
- Session management for conversation continuity
- Real-time streaming with low latency
- Compatible with WeChat Mini Programs and mobile apps
- Health check endpoint for connectivity testing
- Backward compatible with existing SSE endpoints

Resolves: #11683
2025-12-03 06:49:36 -03:00
..
apps feat: Add WebSocket API for streaming responses 2025-12-03 06:49:36 -03:00
common Feat:admin api (#10642) 2025-10-18 16:09:48 +08:00
db Feat: RAG evaluation (#11674) 2025-12-03 17:00:58 +08:00
utils feat: Auto-disable Raptor for structured data (Issue #11653) (#11676) 2025-12-03 17:02:29 +08:00
__init__.py Fix: incorrect async chat streamly output (#11679) 2025-12-03 11:15:45 +08:00
constants.py Introduce common/constants.py (#10965) 2025-11-03 16:32:37 +08:00
ragflow_server.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
settings.py Move api.settings to common.settings (#11036) 2025-11-06 09:36:38 +08:00
validation.py