ragflow/api/apps
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
..
auth Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
sdk Refa: make RAGFlow more asynchronous 2 (#11689) 2025-12-03 14:19:53 +08:00
__init__.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
api_app.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
canvas_app.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
chunk_app.py Refa: make RAGFlow more asynchronous 2 (#11689) 2025-12-03 14:19:53 +08:00
connector_app.py Refa: make RAGFlow more asynchronous 2 (#11689) 2025-12-03 14:19:53 +08:00
conversation_app.py Refa: make RAGFlow more asynchronous 2 (#11689) 2025-12-03 14:19:53 +08:00
dialog_app.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
document_app.py Refa: make RAGFlow more asynchronous 2 (#11689) 2025-12-03 14:19:53 +08:00
evaluation_app.py Feat: RAG evaluation (#11674) 2025-12-03 17:00:58 +08:00
file2document_app.py Fix: file manager KB link issue. (#11648) 2025-12-02 12:14:27 +08:00
file_app.py Refa: make RAGFlow more asynchronous 2 (#11689) 2025-12-03 14:19:53 +08:00
kb_app.py Refa: make RAGFlow more asynchronous 2 (#11689) 2025-12-03 14:19:53 +08:00
langfuse_app.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
llm_app.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
mcp_server_app.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
plugin_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
search_app.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
system_app.py Feat: Alter flask to Quart for async API serving. (#11275) 2025-11-18 17:05:16 +08:00
tenant_app.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
user_app.py Refa: make RAGFlow more asynchronous (#11601) 2025-12-01 14:24:06 +08:00
websocket_app.py feat: Add WebSocket API for streaming responses 2025-12-03 06:49:36 -03:00