From 64e24532b550a78249a2607e34f8fc3aa4b8bb21 Mon Sep 17 00:00:00 2001 From: Zhang Yuxiang Date: Fri, 7 Nov 2025 22:50:42 +0800 Subject: [PATCH 1/5] fix(streamlit): disable file watcher to avoid torch.classes conflict --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index f4465b4c..7210aff6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,7 @@ services: restart: unless-stopped environment: - PYTHONUNBUFFERED=1 + - STREAMLIT_SERVER_ENABLE_FILE_WATCHER=false ports: - "5000:5000" - "8501:8501" From 3b977bb20203fb0a212ec51466b33e66d4d0428e Mon Sep 17 00:00:00 2001 From: 666ghj <670939375@qq.com> Date: Fri, 7 Nov 2025 23:59:42 +0800 Subject: [PATCH 2/5] Update README. --- README-EN.md | 86 ++++++++++++++++++---------------------------------- README.md | 83 ++++++++++++++++++-------------------------------- 2 files changed, 58 insertions(+), 111 deletions(-) diff --git a/README-EN.md b/README-EN.md index b23db578..4ef9fffa 100644 --- a/README-EN.md +++ b/README-EN.md @@ -1,6 +1,6 @@
-Weibo Public Opinion Analysis System Logo +BettaFish Logo 666ghj%2FBettaFish | Trendshift @@ -8,14 +8,14 @@ 666ghj%2FBettaFish | Trendshift666ghj%2FBettaFish | Trendshift -[![GitHub Stars](https://img.shields.io/github/stars/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/stargazers) -[![GitHub Watchers](https://img.shields.io/github/watchers/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/watchers) -[![GitHub Forks](https://img.shields.io/github/forks/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/network) -[![GitHub Issues](https://img.shields.io/github/issues/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/issues) -[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/pulls) +[![GitHub Stars](https://img.shields.io/github/stars/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/stargazers) +[![GitHub Watchers](https://img.shields.io/github/watchers/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/watchers) +[![GitHub Forks](https://img.shields.io/github/forks/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/network) +[![GitHub Issues](https://img.shields.io/github/issues/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/issues) +[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/pulls) -[![GitHub License](https://img.shields.io/github/license/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/blob/main/LICENSE) -[![Version](https://img.shields.io/badge/version-v1.0.0-green.svg?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem) +[![GitHub License](https://img.shields.io/github/license/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/blob/main/LICENSE) +[![Version](https://img.shields.io/badge/version-v1.1.2-green.svg?style=flat-square)](https://github.com/666ghj/BettaFish) [![Docker](https://img.shields.io/badge/Docker-Build-2496ED?style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/) @@ -113,7 +113,7 @@ Solomon LionCC BettaFish WeiYu Benefits: Open codecodex.ai Lion Programming Chan ### Project Code Structure Tree ``` -Weibo_PublicOpinion_AnalysisSystem/ +BettaFish/ ├── QueryEngine/ # Domestic and international news breadth search Agent │ ├── agent.py # Agent main logic │ ├── llms/ # LLM interface wrapper @@ -205,7 +205,7 @@ Weibo_PublicOpinion_AnalysisSystem/ └── requirements.txt # Python dependency list ``` -## 🚀 Quick Start +## 🚀 Quick Start (Docker) ### 1. Starting the Project @@ -215,15 +215,13 @@ Weibo_PublicOpinion_AnalysisSystem/ docker compose up -d ``` -> **⚠️ Note: Slow Image Pull** - -> In the original `docker-compose.yml` file, we have provided alternative (mirror) image addresses as **comments** for you to replace with. +> **Note: Slow image pull speed.** In the original `docker-compose.yml` file, we have provided alternative mirror image addresses as **comments** for you to replace with. ### 2. Configuration Instructions -#### Database Configuration +#### Database Configuration (PostgreSQL) -Please configure the database connection information with the following parameters: +Configure the database connection information with the following parameters. The system also supports MySQL, so you can adjust the settings as needed: | Configuration Item | Value to Use | Description | | :--- | :--- | :--- | @@ -236,10 +234,11 @@ Please configure the database connection information with the following paramete ### Large Language Model (LLM) Configuration -After completing the database configuration, please proceed to configure **all Large Language Model related parameters** to ensure the system can connect to your chosen LLM service. +All LLM calls use the OpenAI API interface standard. After you finish the database configuration, continue to configure **all LLM-related parameters** so the system can connect to your selected LLM service. -Upon completing and saving all the configurations above, the system should be ready to run normally. +Once you complete and save the configurations above, the system will be ready to run normally. +------ ## 💻 ⚙️ Source Code Startup Guide @@ -250,7 +249,7 @@ Upon completing and saving all the configurations above, the system should be re - **Operating System**: Windows, Linux, MacOS - **Python Version**: 3.9+ - **Conda**: Anaconda or Miniconda -- **Database**: MySQL (optional, you can choose our cloud database service) +- **Database**: PostgreSQL (recommended) or MySQL - **Memory**: 2GB+ recommended ### 1. Create Environment @@ -288,13 +287,11 @@ uv pip install -r requirements.txt playwright install chromium ``` -### 4. System Configuration - -#### 4.1 Configure API Keys +### 4. Configure LLM and Database -Copy the `.env.example` file in the project root directory to `.env` +Copy the `.env.example` file in the project root directory and rename it to `.env`. -Edit the `.env` file and fill in your API keys (you can also choose your own models and search proxies; see the `.env.example` file in the project root directory or the `config.py` file for details): +Edit the `.env` file and fill in your API keys (you can also choose your own models and search proxies; see `.env.example` in the project root directory or `config.py` for details): ```yml # ====================== Database Configuration ====================== @@ -310,8 +307,9 @@ DB_PASSWORD=your_db_password DB_NAME=your_db_name # Database character set, utf8mb4 is recommended for emoji compatibility DB_CHARSET=utf8mb4 -# Database type: mysql or postgresql +# Database type: postgresql or mysql DB_DIALECT=postgresql +# Database initialization is not required, as it will be checked automatically upon executing app.py # LLM configuration # You can switch each Engine's LLM provider as long as it follows the OpenAI-compatible request format @@ -325,35 +323,7 @@ INSIGHT_ENGINE_MODEL_NAME= # Media Agent ... ``` -Recommended LLM API Provider: [Reasoning Era](https://aihubmix.com/?aff=8Ds9) - -#### 4.2 Database Initialization - -**Option 1: Use Local Database** - -> ~~The MindSpider crawler system and the public opinion system are independent of each other, so you need to configure `MindSpider\config.py`. Copy the `config.py.example` file in the `MindSpider` folder and rename it to `config.py`.~~ -> Configuration has been changed to be based on environment variables. Please copy the `.env.example` file in the project root directory to `.env` and fill in all configurations in it. - -```bash -# Local MySQL database initialization -cd MindSpider -# Project initialization -python main.py --setup - -``` - -**Option 2: Use Cloud Database Service (Recommended)** - -We provide convenient cloud database service with 100,000+ daily real public opinion data, currently **free application**! - -- Real public opinion data, updated in real-time -- Multi-dimensional tag classification -- High-availability cloud service -- Professional technical support - -**Contact us to apply for free cloud database access: 📧 670939375@qq.com** - -> To conduct a data compliance review and service upgrade, we are suspending new applications for the cloud database, effective October 1, 2025. +Recommended LLM API Provider: [aihubmix](https://aihubmix.com/?aff=8Ds9) ### 5. Launch System @@ -666,9 +636,11 @@ This project is licensed under the [GPL-2.0 License](LICENSE). Please see the LI ### Get Help -- **Project Homepage**: [GitHub Repository](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem) -- **Issue Reporting**: [Issues Page](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/issues) -- **Feature Requests**: [Discussions Page](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/discussions) + FAQ: https://github.com/666ghj/BettaFish/issues/185 + +- **Project Homepage**: [GitHub Repository](https://github.com/666ghj/BettaFish) +- **Issue Reporting**: [Issues Page](https://github.com/666ghj/BettaFish/issues) +- **Feature Requests**: [Discussions Page](https://github.com/666ghj/BettaFish/discussions) ### Contact Information @@ -685,7 +657,7 @@ This project is licensed under the [GPL-2.0 License](LICENSE). Please see the LI Thanks to these excellent contributors: -[![Contributors](https://contrib.rocks/image?repo=666ghj/Weibo_PublicOpinion_AnalysisSystem)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/graphs/contributors) +[![Contributors](https://contrib.rocks/image?repo=666ghj/BettaFish)](https://github.com/666ghj/BettaFish/graphs/contributors) ## 📈 Project Statistics diff --git a/README.md b/README.md index cca162af..27aeeb40 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-Weibo Public Opinion Analysis System Logo +BettaFish Logo 666ghj%2FBettaFish | Trendshift @@ -8,14 +8,14 @@ 666ghj%2FBettaFish | Trendshift666ghj%2FBettaFish | Trendshift -[![GitHub Stars](https://img.shields.io/github/stars/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/stargazers) -[![GitHub Watchers](https://img.shields.io/github/watchers/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/watchers) -[![GitHub Forks](https://img.shields.io/github/forks/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/network) -[![GitHub Issues](https://img.shields.io/github/issues/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/issues) -[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/pulls) +[![GitHub Stars](https://img.shields.io/github/stars/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/stargazers) +[![GitHub Watchers](https://img.shields.io/github/watchers/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/watchers) +[![GitHub Forks](https://img.shields.io/github/forks/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/network) +[![GitHub Issues](https://img.shields.io/github/issues/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/issues) +[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/pulls) -[![GitHub License](https://img.shields.io/github/license/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/blob/main/LICENSE) -[![Version](https://img.shields.io/badge/version-v1.0.0-green.svg?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem) +[![GitHub License](https://img.shields.io/github/license/666ghj/BettaFish?style=flat-square)](https://github.com/666ghj/BettaFish/blob/main/LICENSE) +[![Version](https://img.shields.io/badge/version-v1.1.2-green.svg?style=flat-square)](https://github.com/666ghj/BettaFish) [![Docker](https://img.shields.io/badge/Docker-Build-2496ED?style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/) @@ -113,7 +113,7 @@ LLM模型API赞助: **⚠️ 注意:镜像拉取速度慢** - -> 在原 `docker-compose.yml` 文件中,我们已经通过**注释**的方式提供了备用镜像地址供您替换。 +> **注:镜像拉取速度慢**,在原 `docker-compose.yml` 文件中,我们已经通过**注释**的方式提供了备用镜像地址供您替换 ### 2. 配置说明 -#### 数据库配置 (Database Configuration) +#### 数据库配置(PostgreSQL) -请按照以下参数配置数据库连接信息: +请按照以下参数配置数据库连接信息,也支持Mysql可自行修改: | 配置项 | 填写值 | 说明 | | :--- | :--- | :--- | @@ -236,13 +234,15 @@ docker compose up -d #### 大模型配置 +> 我们所有 LLM 调用使用 OpenAI 的 API 接口标准 + 在完成数据库配置后,请正常配置**所有大模型相关的参数**,确保系统能够连接到您选择的大模型服务。 完成上述所有配置并保存后,系统即可正常运行。 ------ -## 💻 🔧 源码启动指南 +## 🔧 源码启动指南 > 如果你是初次学习一个Agent系统的搭建,可以从一个非常简单的demo开始:[Deep Search Agent Demo](https://github.com/666ghj/DeepSearchAgent-Demo) @@ -251,7 +251,7 @@ docker compose up -d - **操作系统**: Windows、Linux、MacOS - **Python版本**: 3.9+ - **Conda**: Anaconda或Miniconda -- **数据库**: MySQL(可选择我们的云数据库服务) +- **数据库**: PostgreSQL(推荐)或MySQL - **内存**: 建议2GB以上 ### 1. 创建环境 @@ -289,11 +289,9 @@ uv pip install -r requirements.txt playwright install chromium ``` -### 4. 配置系统 - -#### 4.1 配置API密钥 +### 4. 配置LLM与数据库 -复制一份 项目根目录 `.env.example` 文件,命名为 `.env` +复制一份项目根目录 `.env.example` 文件,命名为 `.env` 编辑 `.env` 文件,填入您的API密钥(您也可以选择自己的模型、搜索代理,详情见根目录.env.example文件内或根目录config.py中的说明): @@ -311,10 +309,11 @@ DB_PASSWORD=your_db_password DB_NAME=your_db_name # 数据库字符集,推荐utf8mb4,兼容emoji DB_CHARSET=utf8mb4 -# 数据库类型mysql或postgresql +# 数据库类型postgresql或mysql DB_DIALECT=postgresql +# 数据库不需要初始化,执行app.py时会自动检测 -# LLM配置 +# ====================== LLM配置 ====================== # 您可以更改每个部分LLM使用的API,只要兼容OpenAI请求格式都可以 # Insight Agent @@ -323,38 +322,12 @@ INSIGHT_ENGINE_API_KEY= INSIGHT_ENGINE_BASE_URL= # Insight Agent LLM模型名称,如kimi-k2-0711-preview INSIGHT_ENGINE_MODEL_NAME= + # Media Agent ... ``` 推荐LLM API供应商:[推理时代](https://aihubmix.com/?aff=8Ds9) -#### 4.2 数据库初始化 - -**选择1:使用本地数据库** - -> ~~MindSpider爬虫系统跟舆情系统是各自独立的,所以需要再去`MindSpider\config.py`配置一下,复制`MindSpider`文件夹下的 `config.py.example` 文件,命名为 `config.py`~~ -现版本已更改为基于环境变量配置,请复制项目根目录.env.example文件为.env文件,并在其中填写各项配置 -```bash -# 本地MySQL数据库初始化 -cd MindSpider -# 项目初始化 -python main.py --setup - -``` - -**选择2:使用云数据库服务(推荐)** - -我们提供便捷的云数据库服务,包含日均10万+真实舆情数据,目前**免费申请**! - -- 真实舆情数据,实时更新 -- 多维度标签分类 -- 高可用云端服务 -- 专业技术支持 - -**联系我们申请免费云数据库访问:📧 670939375@qq.com** - -> 为进行数据合规性审查与服务升级,云数据库自2025年10月1日起暂停接收新的使用申请 - ### 5. 启动系统 #### 5.1 完整系统启动(推荐) @@ -664,9 +637,11 @@ class DeepSearchAgent: ### 获取帮助 -- **项目主页**:[GitHub仓库](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem) -- **问题反馈**:[Issues页面](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/issues) -- **功能建议**:[Discussions页面](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/discussions) +常见问题解答:https://github.com/666ghj/BettaFish/issues/185 + +- **项目主页**:[GitHub仓库](https://github.com/666ghj/BettaFish) +- **问题反馈**:[Issues页面](https://github.com/666ghj/BettaFish/issues) +- **功能建议**:[Discussions页面](https://github.com/666ghj/BettaFish/discussions) ### 联系方式 @@ -683,7 +658,7 @@ class DeepSearchAgent: 感谢以下优秀的贡献者们: -[![Contributors](https://contrib.rocks/image?repo=666ghj/Weibo_PublicOpinion_AnalysisSystem)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/graphs/contributors) +[![Contributors](https://contrib.rocks/image?repo=666ghj/BettaFish)](https://github.com/666ghj/BettaFish/graphs/contributors) ## 📈 项目统计 From 62bf8f6085d49131fc21fcf40680c5bb41fc99c6 Mon Sep 17 00:00:00 2001 From: 666ghj <670939375@qq.com> Date: Sat, 8 Nov 2025 00:07:29 +0800 Subject: [PATCH 3/5] Update README. --- README-EN.md | 4 +--- README.md | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/README-EN.md b/README-EN.md index 4ef9fffa..25e8bf8b 100644 --- a/README-EN.md +++ b/README-EN.md @@ -238,9 +238,7 @@ All LLM calls use the OpenAI API interface standard. After you finish the databa Once you complete and save the configurations above, the system will be ready to run normally. ------- - -## 💻 ⚙️ Source Code Startup Guide +## 🔧 Source Code Startup Guide > If you are new to building Agent systems, you can start with a very simple demo: [Deep Search Agent Demo](https://github.com/666ghj/DeepSearchAgent-Demo) diff --git a/README.md b/README.md index 27aeeb40..292c8525 100644 --- a/README.md +++ b/README.md @@ -240,8 +240,6 @@ docker compose up -d 完成上述所有配置并保存后,系统即可正常运行。 ------- - ## 🔧 源码启动指南 > 如果你是初次学习一个Agent系统的搭建,可以从一个非常简单的demo开始:[Deep Search Agent Demo](https://github.com/666ghj/DeepSearchAgent-Demo) From b340db3415e0dcd6f05fae2ec8f9d1fe4eb13450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?COYG=E2=9A=A1=EF=B8=8F?= <67215517+1411430556@users.noreply.github.com> Date: Sat, 8 Nov 2025 00:41:56 +0800 Subject: [PATCH 4/5] Fix link formatting in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 292c8525..9335a1ca 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ -[English](./README-EN.md) | [中文文档](./README.md) +[English](./README-EN.md) | 中文文档
From 6ac843b87e0f5fe33db6791b7f874fdecbf9c63a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?COYG=E2=9A=A1=EF=B8=8F?= <67215517+1411430556@users.noreply.github.com> Date: Sat, 8 Nov 2025 00:42:19 +0800 Subject: [PATCH 5/5] Update English link format in README Removed the file path from the English link in the README. --- README-EN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-EN.md b/README-EN.md index 25e8bf8b..00c64cd0 100644 --- a/README-EN.md +++ b/README-EN.md @@ -19,7 +19,7 @@ [![Docker](https://img.shields.io/badge/Docker-Build-2496ED?style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/) -[English](./README-EN.md) | [中文文档](./README.md) +English | [中文文档](./README.md)