You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. RAGFlow Chat Plugin for ChatGPT-on-WeChat
  2. =========================================
  3. This folder contains the source code for the `ragflow_chat` plugin, which extends the core functionality of the RAGFlow API to support conversational interactions using Retrieval-Augmented Generation (RAG). This plugin integrates seamlessly with the [ChatGPT-on-WeChat](https://github.com/zhayujie/chatgpt-on-wechat) project, enabling WeChat and other platforms to leverage the knowledge retrieval capabilities provided by RAGFlow in chat interactions.
  4. ### Features
  5. * **Conversational Interactions**: Combine WeChat's conversational interface with powerful RAG (Retrieval-Augmented Generation) capabilities.
  6. * **Knowledge-Based Responses**: Enrich conversations by retrieving relevant data from external knowledge sources and incorporating them into chat responses.
  7. * **Multi-Platform Support**: Works across WeChat, WeCom, and various other platforms supported by the ChatGPT-on-WeChat framework.
  8. ### Plugin vs. ChatGPT-on-WeChat Configurations
  9. **Note**: There are two distinct configuration files used in this setup—one for the ChatGPT-on-WeChat core project and another specific to the `ragflow_chat` plugin. It is important to configure both correctly to ensure smooth integration.
  10. #### ChatGPT-on-WeChat Root Configuration (`config.json`)
  11. This file is located in the root directory of the [ChatGPT-on-WeChat](https://github.com/zhayujie/chatgpt-on-wechat) project and is responsible for defining the communication channels and overall behavior. For example, it handles the configuration for WeChat, WeCom, and other services like Feishu and DingTalk.
  12. Example `config.json` (for WeChat channel):
  13. ```json
  14. {
  15. "channel_type": "wechatmp",
  16. "wechatmp_app_id": "YOUR_APP_ID",
  17. "wechatmp_app_secret": "YOUR_APP_SECRET",
  18. "wechatmp_token": "YOUR_TOKEN",
  19. "wechatmp_port": 80,
  20. ...
  21. }
  22. ```
  23. This file can also be modified to support other communication platforms, such as:
  24. - **Personal WeChat** (`channel_type: wx`)
  25. - **WeChat Public Account** (`wechatmp` or `wechatmp_service`)
  26. - **WeChat Work (WeCom)** (`wechatcom_app`)
  27. - **Feishu** (`feishu`)
  28. - **DingTalk** (`dingtalk`)
  29. For detailed configuration options, see the official [LinkAI documentation](https://docs.link-ai.tech/cow/multi-platform/wechat-mp).
  30. #### RAGFlow Chat Plugin Configuration (`plugins/ragflow_chat/config.json`)
  31. This configuration is specific to the `ragflow_chat` plugin and is used to set up communication with the RAGFlow server. Ensure that your RAGFlow server is running, and update the plugin's `config.json` file with your server details:
  32. Example `config.json` (for `ragflow_chat`):
  33. ```json
  34. {
  35. "ragflow_api_key": "YOUR_API_KEY",
  36. "ragflow_host": "127.0.0.1:80"
  37. }
  38. ```
  39. This file must be configured to point to your RAGFlow instance, with the `ragflow_api_key` and `ragflow_host` fields set appropriately. The `ragflow_host` is typically your server's address and port number, and the `ragflow_api_key` is obtained from your RAGFlow API setup.
  40. ### Requirements
  41. Before you can use this plugin, ensure the following are in place:
  42. 1. You have installed and configured [ChatGPT-on-WeChat](https://github.com/zhayujie/chatgpt-on-wechat).
  43. 2. You have deployed and are running the [RAGFlow](https://github.com/infiniflow/ragflow) server.
  44. Make sure both `config.json` files (ChatGPT-on-WeChat and RAGFlow Chat Plugin) are correctly set up as per the examples above.