- 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 |
||
|---|---|---|
| .. | ||
| agent | ||
| chat | ||
| dataset | ||
| migration | ||
| models | ||
| team | ||
| _category_.json | ||
| accessing_admin_ui.md | ||
| ai_search.md | ||
| manage_files.md | ||
| manage_users_and_services.md | ||
| run_health_check.md | ||
| tracing.mdx | ||
| upgrade_ragflow.mdx | ||
| websocket_api.md | ||