Merge pull request #354 from 666ghj/main

Sync
This commit is contained in:
马一丁
2025-11-15 22:49:13 +08:00
committed by GitHub
6 changed files with 58 additions and 62 deletions

View File

@@ -21,61 +21,49 @@ DB_CHARSET=utf8mb4
DB_DIALECT=postgresql
# ======================= LLM 相关 =======================
# 您可以更改每个部分LLM使用的API🚩只要兼容OpenAI请求格式都可以定义好KEY、BASE_URL与MODEL_NAME即可正常使用。
# 重要提醒我们强烈推荐您先使用推荐的配置申请API先跑通再进行您的更改
# 我们的LLM模型API赞助商有https://share.302.ai/P66Qe3、https://aihubmix.com/?aff=8Ds9提供了非常全面的模型api
# Insight Agent推荐Kimihttps://platform.moonshot.cn/API密钥用于主LLM
# Insight Agent推荐kimi-k2官方申请地址https://platform.moonshot.cn/
INSIGHT_ENGINE_API_KEY=
# Insight Agent LLM接口BaseUrl可自定义厂商API
INSIGHT_ENGINE_BASE_URL=
# Insight Agent LLM模型名称如kimi-k2-0711-preview
INSIGHT_ENGINE_MODEL_NAME=
# Media Agent推荐Gemini,推荐中转厂商 https://aihubmix.com/?aff=8Ds9API密钥
# Media Agent推荐Gemini-2.5-pro中转厂商申请地址https://aihubmix.com/?aff=8Ds9
MEDIA_ENGINE_API_KEY=
# Media Agent LLM接口BaseUrl
MEDIA_ENGINE_BASE_URL=
# Media Agent LLM模型名称如gemini-2.5-pro
MEDIA_ENGINE_MODEL_NAME=
# MindSpider Agent API密钥(推荐Deepseek
MINDSPIDER_API_KEY=
# MindSpider LLM接口BaseUrl
MINDSPIDER_BASE_URL=
# MindSpider LLM模型名称如deepseek-chat
MINDSPIDER_MODEL_NAME=
# Query Agent推荐DeepSeekhttps://www.deepseek.com/API密钥
# Query Agent推荐deepseek-chat官方申请地址https://platform.deepseek.com/
QUERY_ENGINE_API_KEY=
# Query Agent LLM接口BaseUrl
QUERY_ENGINE_BASE_URL=
# Query Agent LLM模型如deepseek-reasoner
QUERY_ENGINE_MODEL_NAME=
# Report Agent推荐Gemini,推荐中转厂商 https://aihubmix.com/?aff=8Ds9API密钥
# Report Agent推荐Gemini-2.5-pro中转厂商申请地址https://aihubmix.com/?aff=8Ds9
REPORT_ENGINE_API_KEY=
# Report Agent LLM接口BaseUrl
REPORT_ENGINE_BASE_URL=
# Report Agent LLM模型如gemini-2.5-pro
REPORT_ENGINE_MODEL_NAME=
# Forum Host LLM API密钥Qwen3最新模型推荐 https://cloud.siliconflow.cn/
# MindSpider Agent推荐deepseek-chat官方申请地址https://platform.deepseek.com/
MINDSPIDER_API_KEY=
MINDSPIDER_BASE_URL=
MINDSPIDER_MODEL_NAME=
# 论坛主持人推荐qwen-plus官方申请地址https://www.aliyun.com/product/bailian
FORUM_HOST_API_KEY=
# Forum Host LLM BaseUrl
FORUM_HOST_BASE_URL=
# Forum Host LLM模型名如Qwen/Qwen3-235B-A22B-Instruct-2507
FORUM_HOST_MODEL_NAME=
# SQL Keyword Optimizer LLM密钥小参数Qwen3模型 https://cloud.siliconflow.cn/
# SQL Keyword Optimizer推荐qwen-plus官方申请地址https://www.aliyun.com/product/bailian
KEYWORD_OPTIMIZER_API_KEY=
# Keyword Optimizer BaseUrl
KEYWORD_OPTIMIZER_BASE_URL=
# Keyword Optimizer LLM模型名称如deepseek-chat
KEYWORD_OPTIMIZER_MODEL_NAME=
# ================== 网络工具配置 ====================
# Tavily API密钥用于Tavily网络搜索。注册地址https://www.tavily.com/
# Tavily API密钥用于Tavily网络搜索,申请地址https://www.tavily.com/
TAVILY_API_KEY=
# Bocha Web/AI Search BASEURL用于Bocha搜索。注册地址https://open.bochaai.com/
BOCHA_BASE_URL=
# Bocha Web Search API密钥用于Bocha搜索。注册地址https://open.bochaai.com/
# Bocha AI Search BASEURL用于Bocha多模态搜索这里密钥名称虽然是Web Search但其实是要AI Search的申请地址https://open.bochaai.com/
BOCHA_BASE_URL=https://api.bochaai.com/v1/ai-search
BOCHA_WEB_SEARCH_API_KEY=

View File

@@ -668,7 +668,7 @@ This project is licensed under the [GPL-2.0 License](LICENSE). Please see the LI
### Contact Information
- 📧 **Email**: 670939375@qq.com
- 📧 **Email**: hangjiang@bupt.edu.cn
### Business Cooperation

View File

@@ -247,7 +247,9 @@ BettaFish/
### 1. 启动项目
**运行命令:** 执行以下命令在**后台**启动所有服务:
复制一份 `.env.example` 文件,命名为 `.env` ,并按需配置 `.env` 文件中的环境变量
执行以下命令在后台启动所有服务:
```bash
docker compose up -d
@@ -669,7 +671,7 @@ class DeepSearchAgent:
### 联系方式
- 📧 **邮箱**670939375@qq.com
- 📧 **邮箱**hangjiang@bupt.edu.cn
### 商务合作

View File

@@ -26,12 +26,12 @@ class Settings(BaseSettings):
变量名与原 config.py 大写一致,便于平滑过渡。
"""
# ================== Flask 服务器配置 ====================
HOST: str = Field("0.0.0.0", description="Flask服务器主机地址默认0.0.0.0(允许外部访问)")
HOST: str = Field("0.0.0.0", description="BETTAFISH 主机地址,例如 0.0.0.0 或 127.0.0.1")
PORT: int = Field(5000, description="Flask服务器端口号默认5000")
# ====================== 数据库配置 ======================
DB_DIALECT: str = Field("mysql", description="数据库类型,例如 'mysql''postgresql'。用于支持多种数据库后端(如 SQLAlchemy请与连接信息同配置")
DB_HOST: str = Field("your_db_host", description="数据库主机例如localhost 或 127.0.0.1。我们也提供云数据库资源便捷配置日均10w+数据可免费申请联系我们670939375@qq.com NOTE为进行数据合规性审查与服务升级云数据库自2025年10月1日起暂停接收新的使用申请")
DB_DIALECT: str = Field("postgresql", description="数据库类型,可选 mysql 或 postgresql请与其他连接信息同配置")
DB_HOST: str = Field("your_db_host", description="数据库主机例如localhost 或 127.0.0.1")
DB_PORT: int = Field(3306, description="数据库端口号默认为3306")
DB_USER: str = Field("your_db_user", description="数据库用户名")
DB_PASSWORD: str = Field("your_db_password", description="数据库密码")
@@ -42,41 +42,46 @@ class Settings(BaseSettings):
# 我们的LLM模型API赞助商有https://share.302.ai/P66Qe3、https://aihubmix.com/?aff=8Ds9提供了非常全面的模型api
# Insight Agent推荐Kimi申请地址https://platform.moonshot.cn/
INSIGHT_ENGINE_API_KEY: Optional[str] = Field(None, description="Insight Agent推荐Kimihttps://platform.moonshot.cn/API密钥用于主LLM。您可以更改每个部分LLM使用的API🚩只要兼容OpenAI请求格式都可以定义好KEY、BASE_URLMODEL_NAME即可正常使用。重要提醒我们强烈推荐您先使用推荐的配置申请API先跑通再进行您的更改")
INSIGHT_ENGINE_BASE_URL: Optional[str] = Field("https://api.moonshot.cn/v1", description="Insight Agent LLM接口BaseUrl可自定义厂商API")
INSIGHT_ENGINE_MODEL_NAME: str = Field("kimi-k2-0711-preview", description="Insight Agent LLM模型名称kimi-k2-0711-preview")
INSIGHT_ENGINE_API_KEY: Optional[str] = Field(None, description="Insight Agent推荐 kimi-k2官方申请地址https://platform.moonshot.cn/API 密钥,用于主 LLM。🚩请先按推荐配置申请并跑通,再根据需要调整 KEY、BASE_URLMODEL_NAME")
INSIGHT_ENGINE_BASE_URL: Optional[str] = Field("https://api.moonshot.cn/v1", description="Insight Agent LLM BaseUrl根据厂商自定义")
INSIGHT_ENGINE_MODEL_NAME: str = Field("kimi-k2-0711-preview", description="Insight Agent LLM 模型名称,例如 kimi-k2-0711-preview")
# Media Agent推荐Gemini推荐中转厂商https://aihubmix.com/?aff=8Ds9
MEDIA_ENGINE_API_KEY: Optional[str] = Field(None, description="Media Agent推荐Gemini推荐中转api厂商https://aihubmix.com/?aff=8Ds9")
MEDIA_ENGINE_BASE_URL: Optional[str] = Field("https://aihubmix.com/v1", description="Media Agent LLM接口BaseUrl")
MEDIA_ENGINE_MODEL_NAME: str = Field("gemini-2.5-pro", description="Media Agent LLM模型名称如gemini-2.5-pro")
MEDIA_ENGINE_API_KEY: Optional[str] = Field(None, description="Media Agent推荐 Gemini-2.5-pro中转厂商申请地址https://aihubmix.com/?aff=8Ds9API 密钥")
MEDIA_ENGINE_BASE_URL: Optional[str] = Field("https://aihubmix.com/v1", description="Media Agent LLM BaseUrl,可根据中转服务调整")
MEDIA_ENGINE_MODEL_NAME: str = Field("gemini-2.5-pro", description="Media Agent LLM 模型名称,如 gemini-2.5-pro")
# Query Agent推荐DeepSeek申请地址https://www.deepseek.com/
QUERY_ENGINE_API_KEY: Optional[str] = Field(None, description="Query Agent推荐DeepSeekhttps://www.deepseek.com/API密钥")
QUERY_ENGINE_BASE_URL: Optional[str] = Field("https://api.deepseek.com", description="Query Agent LLM接口BaseUrl")
QUERY_ENGINE_MODEL_NAME: str = Field("deepseek-reasoner", description="Query Agent LLM模型如deepseek-reasoner")
QUERY_ENGINE_API_KEY: Optional[str] = Field(None, description="Query Agent推荐 DeepSeek官方申请地址:https://platform.deepseek.com/API 密钥")
QUERY_ENGINE_BASE_URL: Optional[str] = Field("https://api.deepseek.com", description="Query Agent LLM BaseUrl")
QUERY_ENGINE_MODEL_NAME: str = Field("deepseek-chat", description="Query Agent LLM 模型名称,如 deepseek-reasoner")
# Report Agent推荐Gemini推荐中转厂商https://aihubmix.com/?aff=8Ds9
REPORT_ENGINE_API_KEY: Optional[str] = Field(None, description="Report Agent推荐Gemini推荐中转api厂商https://aihubmix.com/?aff=8Ds9")
REPORT_ENGINE_BASE_URL: Optional[str] = Field("https://aihubmix.com/v1", description="Report Agent LLM接口BaseUrl")
REPORT_ENGINE_MODEL_NAME: str = Field("gemini-2.5-pro", description="Report Agent LLM模型如gemini-2.5-pro")
REPORT_ENGINE_API_KEY: Optional[str] = Field(None, description="Report Agent推荐 Gemini-2.5-pro中转厂商申请地址https://aihubmix.com/?aff=8Ds9API 密钥")
REPORT_ENGINE_BASE_URL: Optional[str] = Field("https://aihubmix.com/v1", description="Report Agent LLM BaseUrl,可根据中转服务调整")
REPORT_ENGINE_MODEL_NAME: str = Field("gemini-2.5-pro", description="Report Agent LLM 模型名称,如 gemini-2.5-pro")
# MindSpider Agent推荐Deepseek官方申请地址https://platform.deepseek.com/
MINDSPIDER_API_KEY: Optional[str] = Field(None, description="MindSpider Agent推荐 DeepSeek官方申请地址https://platform.deepseek.com/API 密钥")
MINDSPIDER_BASE_URL: Optional[str] = Field(None, description="MindSpider Agent BaseUrl可按所选服务配置")
MINDSPIDER_MODEL_NAME: Optional[str] = Field(None, description="MindSpider Agent 模型名称,例如 deepseek-reasoner")
# Forum HostQwen3最新模型这里我使用了硅基流动这个平台申请地址https://cloud.siliconflow.cn/
FORUM_HOST_API_KEY: Optional[str] = Field(None, description="Forum HostQwen3最新模型这里我使用了硅基流动这个平台申请地址https://cloud.siliconflow.cn/API密钥")
FORUM_HOST_BASE_URL: Optional[str] = Field("https://api.siliconflow.cn/v1", description="Forum Host LLM BaseUrl")
FORUM_HOST_MODEL_NAME: str = Field("Qwen/Qwen3-235B-A22B-Instruct-2507", description="Forum Host LLM模型名如Qwen/Qwen3-235B-A22B-Instruct-2507")
FORUM_HOST_API_KEY: Optional[str] = Field(None, description="Forum Host推荐 qwen-plus官方申请地址https://www.aliyun.com/product/bailianAPI 密钥")
FORUM_HOST_BASE_URL: Optional[str] = Field(None, description="Forum Host LLM BaseUrl,可按所选服务配置")
FORUM_HOST_MODEL_NAME: Optional[str] = Field(None, description="Forum Host LLM 模型名称,例如 qwen-plus")
# SQL keyword Optimizer小参数Qwen3模型这里我使用了硅基流动这个平台申请地址https://cloud.siliconflow.cn/
KEYWORD_OPTIMIZER_API_KEY: Optional[str] = Field(None, description="SQL keyword Optimizer小参数Qwen3模型这里我使用了硅基流动这个平台申请地址https://cloud.siliconflow.cn/API密钥")
KEYWORD_OPTIMIZER_BASE_URL: Optional[str] = Field("https://api.siliconflow.cn/v1", description="Keyword Optimizer BaseUrl")
KEYWORD_OPTIMIZER_MODEL_NAME: str = Field("Qwen/Qwen3-30B-A3B-Instruct-2507", description="Keyword Optimizer LLM模型名称如Qwen/Qwen3-30B-A3B-Instruct-2507")
KEYWORD_OPTIMIZER_API_KEY: Optional[str] = Field(None, description="SQL Keyword Optimizer推荐 qwen-plus官方申请地址https://www.aliyun.com/product/bailianAPI 密钥")
KEYWORD_OPTIMIZER_BASE_URL: Optional[str] = Field(None, description="Keyword Optimizer BaseUrl,可按所选服务配置")
KEYWORD_OPTIMIZER_MODEL_NAME: Optional[str] = Field(None, description="Keyword Optimizer LLM 模型名称,例如 qwen-plus")
# ================== 网络工具配置 ====================
# Tavily API申请地址https://www.tavily.com/
TAVILY_API_KEY: Optional[str] = Field(None, description="Tavily API申请地址https://www.tavily.com/API密钥用于Tavily网络搜索")
BOCHA_BASE_URL: Optional[str] = Field("https://api.bochaai.com/v1/ai-search", description="Bocha AI 搜索BaseUrl或博查网页搜索BaseUrl")
# Bocha API申请地址https://open.bochaai.com/
BOCHA_BASE_URL: Optional[str] = Field("https://api.bochaai.com/v1/ai-search", description="Bocha AI 搜索BaseUrl或博查网页搜索BaseUrl")
BOCHA_WEB_SEARCH_API_KEY: Optional[str] = Field(None, description="Bocha API申请地址https://open.bochaai.com/API密钥用于Bocha搜索")
# ================== Insight Engine 搜索配置 ====================

View File

@@ -18,6 +18,7 @@ services:
volumes:
- ./logs:/app/logs
- ./final_reports:/app/final_reports
- ./.env:/app/.env
- ./insight_engine_streamlit_reports:/app/insight_engine_streamlit_reports
- ./media_engine_streamlit_reports:/app/media_engine_streamlit_reports
- ./query_engine_streamlit_reports:/app/query_engine_streamlit_reports

View File

@@ -1235,7 +1235,7 @@
const configFieldGroups = [
{
title: '数据库连接',
subtitle: '用于连接业务数据库的基本配置',
subtitle: '用于连接社媒数据库的基本配置注意数据库默认为空需要单独部署MindSpider爬取数据',
fields: [
{ key: 'DB_DIALECT', label: '数据库类型', type: 'select', options: ['mysql', 'postgresql'] },
{ key: 'DB_HOST', label: '主机地址' },
@@ -1248,7 +1248,7 @@
},
{
title: 'Insight Agent',
subtitle: '负责洞察分析的模型配置',
subtitle: 'OpenAi接入格式推荐LLMkimi-k2',
fields: [
{ key: 'INSIGHT_ENGINE_API_KEY', label: 'API Key', type: 'password' },
{ key: 'INSIGHT_ENGINE_BASE_URL', label: 'Base URL' },
@@ -1257,7 +1257,7 @@
},
{
title: 'Media Agent',
subtitle: '媒体内容理解与生成模型',
subtitle: 'OpenAi接入格式推荐LLMgemini-2.5-pro',
fields: [
{ key: 'MEDIA_ENGINE_API_KEY', label: 'API Key', type: 'password' },
{ key: 'MEDIA_ENGINE_BASE_URL', label: 'Base URL' },
@@ -1266,7 +1266,7 @@
},
{
title: 'Query Agent',
subtitle: '负责搜索与信息汇总的模型配置',
subtitle: 'OpenAi接入格式推荐LLMdeepseek-chat',
fields: [
{ key: 'QUERY_ENGINE_API_KEY', label: 'API Key', type: 'password' },
{ key: 'QUERY_ENGINE_BASE_URL', label: 'Base URL' },
@@ -1275,7 +1275,7 @@
},
{
title: 'Report Agent',
subtitle: '报告生成使用的模型配置',
subtitle: 'OpenAi接入格式推荐LLMgemini-2.5-pro',
fields: [
{ key: 'REPORT_ENGINE_API_KEY', label: 'API Key', type: 'password' },
{ key: 'REPORT_ENGINE_BASE_URL', label: 'Base URL' },
@@ -1284,7 +1284,7 @@
},
{
title: 'Forum Host',
subtitle: '多智能体协同使用的模型配置',
subtitle: 'OpenAi接入格式推荐LLMqwen-plus',
fields: [
{ key: 'FORUM_HOST_API_KEY', label: 'API Key', type: 'password' },
{ key: 'FORUM_HOST_BASE_URL', label: 'Base URL' },
@@ -1293,7 +1293,7 @@
},
{
title: 'Keyword Optimizer',
subtitle: 'SQL / 关键词优化模型配置',
subtitle: 'OpenAi接入格式推荐LLMqwen-plus',
fields: [
{ key: 'KEYWORD_OPTIMIZER_API_KEY', label: 'API Key', type: 'password' },
{ key: 'KEYWORD_OPTIMIZER_BASE_URL', label: 'Base URL' },
@@ -1302,7 +1302,7 @@
},
{
title: '外部检索工具',
subtitle: '联动搜索引擎、网站抓取等在线服务',
subtitle: '联动搜索引擎、网站抓取等在线服务,两个都需配置',
fields: [
{ key: 'TAVILY_API_KEY', label: 'Tavily API Key', type: 'password' },
{ key: 'BOCHA_WEB_SEARCH_API_KEY', label: 'Bocha API Key', type: 'password' }