666ghj

Update operation guide in UI and config file.

@@ -21,55 +21,43 @@ DB_CHARSET=utf8mb4 @@ -21,55 +21,43 @@ DB_CHARSET=utf8mb4
21 DB_DIALECT=postgresql 21 DB_DIALECT=postgresql
22 22
23 # ======================= LLM 相关 ======================= 23 # ======================= LLM 相关 =======================
  24 +# 您可以更改每个部分LLM使用的API,🚩只要兼容OpenAI请求格式都可以,定义好KEY、BASE_URL与MODEL_NAME即可正常使用。
  25 +# 重要提醒:我们强烈推荐您先使用推荐的配置申请API,先跑通再进行您的更改!
24 # 我们的LLM模型API赞助商有:https://share.302.ai/P66Qe3、https://aihubmix.com/?aff=8Ds9,提供了非常全面的模型api 26 # 我们的LLM模型API赞助商有:https://share.302.ai/P66Qe3、https://aihubmix.com/?aff=8Ds9,提供了非常全面的模型api
25 27
26 -# Insight Agent(推荐Kimi,https://platform.moonshot.cn/)API密钥,用于主LLM 28 +# Insight Agent(推荐kimi-k2,官方申请地址:https://platform.moonshot.cn/)
27 INSIGHT_ENGINE_API_KEY= 29 INSIGHT_ENGINE_API_KEY=
28 -# Insight Agent LLM接口BaseUrl,可自定义厂商API  
29 INSIGHT_ENGINE_BASE_URL= 30 INSIGHT_ENGINE_BASE_URL=
30 -# Insight Agent LLM模型名称,如kimi-k2-0711-preview  
31 INSIGHT_ENGINE_MODEL_NAME= 31 INSIGHT_ENGINE_MODEL_NAME=
32 32
33 -# Media Agent(推荐Gemini,推荐中转厂商 https://aihubmix.com/?aff=8Ds9)API密钥 33 +# Media Agent(推荐Gemini-2.5-pro,中转厂商申请地址:https://aihubmix.com/?aff=8Ds9)
34 MEDIA_ENGINE_API_KEY= 34 MEDIA_ENGINE_API_KEY=
35 -# Media Agent LLM接口BaseUrl  
36 MEDIA_ENGINE_BASE_URL= 35 MEDIA_ENGINE_BASE_URL=
37 -# Media Agent LLM模型名称,如gemini-2.5-pro  
38 MEDIA_ENGINE_MODEL_NAME= 36 MEDIA_ENGINE_MODEL_NAME=
39 37
40 -# MindSpider Agent API密钥(推荐Deepseek)  
41 -MINDSPIDER_API_KEY=  
42 -# MindSpider LLM接口BaseUrl  
43 -MINDSPIDER_BASE_URL=  
44 -# MindSpider LLM模型名称,如deepseek-chat  
45 -MINDSPIDER_MODEL_NAME=  
46 -  
47 -# Query Agent(推荐DeepSeek,https://www.deepseek.com/)API密钥 38 +# Query Agent(推荐deepseek-chat,官方申请地址:https://platform.deepseek.com/)
48 QUERY_ENGINE_API_KEY= 39 QUERY_ENGINE_API_KEY=
49 -# Query Agent LLM接口BaseUrl  
50 QUERY_ENGINE_BASE_URL= 40 QUERY_ENGINE_BASE_URL=
51 -# Query Agent LLM模型,如deepseek-reasoner  
52 QUERY_ENGINE_MODEL_NAME= 41 QUERY_ENGINE_MODEL_NAME=
53 42
54 -# Report Agent(推荐Gemini,推荐中转厂商 https://aihubmix.com/?aff=8Ds9)API密钥 43 +# Report Agent(推荐Gemini-2.5-pro,中转厂商申请地址:https://aihubmix.com/?aff=8Ds9)
55 REPORT_ENGINE_API_KEY= 44 REPORT_ENGINE_API_KEY=
56 -# Report Agent LLM接口BaseUrl  
57 REPORT_ENGINE_BASE_URL= 45 REPORT_ENGINE_BASE_URL=
58 -# Report Agent LLM模型,如gemini-2.5-pro  
59 REPORT_ENGINE_MODEL_NAME= 46 REPORT_ENGINE_MODEL_NAME=
60 47
61 -# Forum Host LLM API密钥,Qwen3最新模型,推荐 https://cloud.siliconflow.cn/ 48 +# MindSpider Agent(推荐deepseek-chat,官方申请地址:https://platform.deepseek.com/)
  49 +MINDSPIDER_API_KEY=
  50 +MINDSPIDER_BASE_URL=
  51 +MINDSPIDER_MODEL_NAME=
  52 +
  53 +# 论坛主持人(推荐qwen-plus,官方申请地址:https://www.aliyun.com/product/bailian)
62 FORUM_HOST_API_KEY= 54 FORUM_HOST_API_KEY=
63 -# Forum Host LLM BaseUrl  
64 FORUM_HOST_BASE_URL= 55 FORUM_HOST_BASE_URL=
65 -# Forum Host LLM模型名,如Qwen/Qwen3-235B-A22B-Instruct-2507  
66 FORUM_HOST_MODEL_NAME= 56 FORUM_HOST_MODEL_NAME=
67 57
68 -# SQL Keyword Optimizer LLM密钥,小参数Qwen3模型 https://cloud.siliconflow.cn/ 58 +# SQL Keyword Optimizer(推荐qwen-plus,官方申请地址:https://www.aliyun.com/product/bailian)
69 KEYWORD_OPTIMIZER_API_KEY= 59 KEYWORD_OPTIMIZER_API_KEY=
70 -# Keyword Optimizer BaseUrl  
71 KEYWORD_OPTIMIZER_BASE_URL= 60 KEYWORD_OPTIMIZER_BASE_URL=
72 -# Keyword Optimizer LLM模型名称,如deepseek-chat  
73 KEYWORD_OPTIMIZER_MODEL_NAME= 61 KEYWORD_OPTIMIZER_MODEL_NAME=
74 62
75 # ================== 网络工具配置 ==================== 63 # ================== 网络工具配置 ====================
@@ -26,12 +26,12 @@ class Settings(BaseSettings): @@ -26,12 +26,12 @@ class Settings(BaseSettings):
26 变量名与原 config.py 大写一致,便于平滑过渡。 26 变量名与原 config.py 大写一致,便于平滑过渡。
27 """ 27 """
28 # ================== Flask 服务器配置 ==================== 28 # ================== Flask 服务器配置 ====================
29 - HOST: str = Field("0.0.0.0", description="Flask服务器主机地址,默认0.0.0.0(允许外部访问)") 29 + HOST: str = Field("0.0.0.0", description="BETTAFISH 主机地址,例如 0.0.0.0 或 127.0.0.1")
30 PORT: int = Field(5000, description="Flask服务器端口号,默认5000") 30 PORT: int = Field(5000, description="Flask服务器端口号,默认5000")
31 31
32 # ====================== 数据库配置 ====================== 32 # ====================== 数据库配置 ======================
33 - DB_DIALECT: str = Field("mysql", description="数据库类型,例如 'mysql' 或 'postgresql'。用于支持多种数据库后端(如 SQLAlchemy,请与连接信息共同配置)")  
34 - DB_HOST: str = Field("your_db_host", description="数据库主机,例如localhost 或 127.0.0.1。我们也提供云数据库资源便捷配置,日均10w+数据,可免费申请,联系我们:670939375@qq.com NOTE:为进行数据合规性审查与服务升级,云数据库自2025年10月1日起暂停接收新的使用申请") 33 + DB_DIALECT: str = Field("postgresql", description="数据库类型,可选 mysql 或 postgresql;请与其他连接信息同时配置")
  34 + DB_HOST: str = Field("your_db_host", description="数据库主机,例如localhost 或 127.0.0.1")
35 DB_PORT: int = Field(3306, description="数据库端口号,默认为3306") 35 DB_PORT: int = Field(3306, description="数据库端口号,默认为3306")
36 DB_USER: str = Field("your_db_user", description="数据库用户名") 36 DB_USER: str = Field("your_db_user", description="数据库用户名")
37 DB_PASSWORD: str = Field("your_db_password", description="数据库密码") 37 DB_PASSWORD: str = Field("your_db_password", description="数据库密码")
@@ -42,34 +42,39 @@ class Settings(BaseSettings): @@ -42,34 +42,39 @@ class Settings(BaseSettings):
42 # 我们的LLM模型API赞助商有:https://share.302.ai/P66Qe3、https://aihubmix.com/?aff=8Ds9,提供了非常全面的模型api 42 # 我们的LLM模型API赞助商有:https://share.302.ai/P66Qe3、https://aihubmix.com/?aff=8Ds9,提供了非常全面的模型api
43 43
44 # Insight Agent(推荐Kimi,申请地址:https://platform.moonshot.cn/) 44 # Insight Agent(推荐Kimi,申请地址:https://platform.moonshot.cn/)
45 - INSIGHT_ENGINE_API_KEY: Optional[str] = Field(None, description="Insight Agent(推荐Kimi,https://platform.moonshot.cn/)API密钥,用于主LLM。您可以更改每个部分LLM使用的API,🚩只要兼容OpenAI请求格式都可以,定义好KEY、BASE_URL与MODEL_NAME即可正常使用。重要提醒:我们强烈推荐您先使用推荐的配置申请API,先跑通再进行您的更改!")  
46 - INSIGHT_ENGINE_BASE_URL: Optional[str] = Field("https://api.moonshot.cn/v1", description="Insight Agent LLM接口BaseUrl,可自定义厂商API")  
47 - INSIGHT_ENGINE_MODEL_NAME: str = Field("kimi-k2-0711-preview", description="Insight Agent LLM模型名称,如kimi-k2-0711-preview") 45 + INSIGHT_ENGINE_API_KEY: Optional[str] = Field(None, description="Insight Agent(推荐 kimi-k2,官方申请地址:https://platform.moonshot.cn/)API 密钥,用于主 LLM。🚩请先按推荐配置申请并跑通,再根据需要调整 KEY、BASE_URL 与 MODEL_NAME。")
  46 + INSIGHT_ENGINE_BASE_URL: Optional[str] = Field("https://api.moonshot.cn/v1", description="Insight Agent LLM BaseUrl,可根据厂商自定义")
  47 + INSIGHT_ENGINE_MODEL_NAME: str = Field("kimi-k2-0711-preview", description="Insight Agent LLM 模型名称,例如 kimi-k2-0711-preview")
48 48
49 # Media Agent(推荐Gemini,推荐中转厂商:https://aihubmix.com/?aff=8Ds9) 49 # Media Agent(推荐Gemini,推荐中转厂商:https://aihubmix.com/?aff=8Ds9)
50 - MEDIA_ENGINE_API_KEY: Optional[str] = Field(None, description="Media Agent(推荐Gemini,推荐中转api厂商:https://aihubmix.com/?aff=8Ds9")  
51 - MEDIA_ENGINE_BASE_URL: Optional[str] = Field("https://aihubmix.com/v1", description="Media Agent LLM接口BaseUrl")  
52 - MEDIA_ENGINE_MODEL_NAME: str = Field("gemini-2.5-pro", description="Media Agent LLM模型名称,如gemini-2.5-pro") 50 + MEDIA_ENGINE_API_KEY: Optional[str] = Field(None, description="Media Agent(推荐 Gemini-2.5-pro,中转厂商申请地址:https://aihubmix.com/?aff=8Ds9)API 密钥")
  51 + MEDIA_ENGINE_BASE_URL: Optional[str] = Field("https://aihubmix.com/v1", description="Media Agent LLM BaseUrl,可根据中转服务调整")
  52 + MEDIA_ENGINE_MODEL_NAME: str = Field("gemini-2.5-pro", description="Media Agent LLM 模型名称,如 gemini-2.5-pro")
53 53
54 # Query Agent(推荐DeepSeek,申请地址:https://www.deepseek.com/) 54 # Query Agent(推荐DeepSeek,申请地址:https://www.deepseek.com/)
55 - QUERY_ENGINE_API_KEY: Optional[str] = Field(None, description="Query Agent(推荐DeepSeek,https://www.deepseek.com/)API密钥")  
56 - QUERY_ENGINE_BASE_URL: Optional[str] = Field("https://api.deepseek.com", description="Query Agent LLM接口BaseUrl")  
57 - QUERY_ENGINE_MODEL_NAME: str = Field("deepseek-reasoner", description="Query Agent LLM模型,如deepseek-reasoner") 55 + QUERY_ENGINE_API_KEY: Optional[str] = Field(None, description="Query Agent(推荐 DeepSeek,官方申请地址:https://platform.deepseek.com/)API 密钥")
  56 + QUERY_ENGINE_BASE_URL: Optional[str] = Field("https://api.deepseek.com", description="Query Agent LLM BaseUrl")
  57 + QUERY_ENGINE_MODEL_NAME: str = Field("deepseek-chat", description="Query Agent LLM 模型名称,如 deepseek-reasoner")
58 58
59 # Report Agent(推荐Gemini,推荐中转厂商:https://aihubmix.com/?aff=8Ds9) 59 # Report Agent(推荐Gemini,推荐中转厂商:https://aihubmix.com/?aff=8Ds9)
60 - REPORT_ENGINE_API_KEY: Optional[str] = Field(None, description="Report Agent(推荐Gemini,推荐中转api厂商:https://aihubmix.com/?aff=8Ds9")  
61 - REPORT_ENGINE_BASE_URL: Optional[str] = Field("https://aihubmix.com/v1", description="Report Agent LLM接口BaseUrl")  
62 - REPORT_ENGINE_MODEL_NAME: str = Field("gemini-2.5-pro", description="Report Agent LLM模型,如gemini-2.5-pro") 60 + REPORT_ENGINE_API_KEY: Optional[str] = Field(None, description="Report Agent(推荐 Gemini-2.5-pro,中转厂商申请地址:https://aihubmix.com/?aff=8Ds9)API 密钥")
  61 + REPORT_ENGINE_BASE_URL: Optional[str] = Field("https://aihubmix.com/v1", description="Report Agent LLM BaseUrl,可根据中转服务调整")
  62 + REPORT_ENGINE_MODEL_NAME: str = Field("gemini-2.5-pro", description="Report Agent LLM 模型名称,如 gemini-2.5-pro")
  63 +
  64 + # MindSpider Agent(推荐Deepseek,官方申请地址:https://platform.deepseek.com/)
  65 + MINDSPIDER_API_KEY: Optional[str] = Field(None, description="MindSpider Agent(推荐 DeepSeek,官方申请地址:https://platform.deepseek.com/)API 密钥")
  66 + MINDSPIDER_BASE_URL: Optional[str] = Field(None, description="MindSpider Agent BaseUrl,可按所选服务配置")
  67 + MINDSPIDER_MODEL_NAME: Optional[str] = Field(None, description="MindSpider Agent 模型名称,例如 deepseek-reasoner")
63 68
64 # Forum Host(Qwen3最新模型,这里我使用了硅基流动这个平台,申请地址:https://cloud.siliconflow.cn/) 69 # Forum Host(Qwen3最新模型,这里我使用了硅基流动这个平台,申请地址:https://cloud.siliconflow.cn/)
65 - FORUM_HOST_API_KEY: Optional[str] = Field(None, description="Forum Host(Qwen3最新模型,这里我使用了硅基流动这个平台,申请地址:https://cloud.siliconflow.cn/)API密钥")  
66 - FORUM_HOST_BASE_URL: Optional[str] = Field("https://api.siliconflow.cn/v1", description="Forum Host LLM BaseUrl")  
67 - FORUM_HOST_MODEL_NAME: str = Field("Qwen/Qwen3-235B-A22B-Instruct-2507", description="Forum Host LLM模型名,如Qwen/Qwen3-235B-A22B-Instruct-2507") 70 + FORUM_HOST_API_KEY: Optional[str] = Field(None, description="Forum Host(推荐 qwen-plus,官方申请地址:https://www.aliyun.com/product/bailian)API 密钥")
  71 + FORUM_HOST_BASE_URL: Optional[str] = Field(None, description="Forum Host LLM BaseUrl,可按所选服务配置")
  72 + FORUM_HOST_MODEL_NAME: Optional[str] = Field(None, description="Forum Host LLM 模型名称,例如 qwen-plus")
68 73
69 # SQL keyword Optimizer(小参数Qwen3模型,这里我使用了硅基流动这个平台,申请地址:https://cloud.siliconflow.cn/) 74 # SQL keyword Optimizer(小参数Qwen3模型,这里我使用了硅基流动这个平台,申请地址:https://cloud.siliconflow.cn/)
70 - KEYWORD_OPTIMIZER_API_KEY: Optional[str] = Field(None, description="SQL keyword Optimizer(小参数Qwen3模型,这里我使用了硅基流动这个平台,申请地址:https://cloud.siliconflow.cn/)API密钥")  
71 - KEYWORD_OPTIMIZER_BASE_URL: Optional[str] = Field("https://api.siliconflow.cn/v1", description="Keyword Optimizer BaseUrl")  
72 - KEYWORD_OPTIMIZER_MODEL_NAME: str = Field("Qwen/Qwen3-30B-A3B-Instruct-2507", description="Keyword Optimizer LLM模型名称,如Qwen/Qwen3-30B-A3B-Instruct-2507") 75 + KEYWORD_OPTIMIZER_API_KEY: Optional[str] = Field(None, description="SQL Keyword Optimizer(推荐 qwen-plus,官方申请地址:https://www.aliyun.com/product/bailian)API 密钥")
  76 + KEYWORD_OPTIMIZER_BASE_URL: Optional[str] = Field(None, description="Keyword Optimizer BaseUrl,可按所选服务配置")
  77 + KEYWORD_OPTIMIZER_MODEL_NAME: Optional[str] = Field(None, description="Keyword Optimizer LLM 模型名称,例如 qwen-plus")
73 78
74 # ================== 网络工具配置 ==================== 79 # ================== 网络工具配置 ====================
75 # Tavily API(申请地址:https://www.tavily.com/) 80 # Tavily API(申请地址:https://www.tavily.com/)
@@ -1174,7 +1174,7 @@ @@ -1174,7 +1174,7 @@
1174 const configFieldGroups = [ 1174 const configFieldGroups = [
1175 { 1175 {
1176 title: '数据库连接', 1176 title: '数据库连接',
1177 - subtitle: '用于连接业务数据库的基本配置', 1177 + subtitle: '用于连接社媒数据库的基本配置,注意数据库默认为空,需要单独部署MindSpider爬取数据',
1178 fields: [ 1178 fields: [
1179 { key: 'DB_DIALECT', label: '数据库类型', type: 'select', options: ['mysql', 'postgresql'] }, 1179 { key: 'DB_DIALECT', label: '数据库类型', type: 'select', options: ['mysql', 'postgresql'] },
1180 { key: 'DB_HOST', label: '主机地址' }, 1180 { key: 'DB_HOST', label: '主机地址' },
@@ -1187,7 +1187,7 @@ @@ -1187,7 +1187,7 @@
1187 }, 1187 },
1188 { 1188 {
1189 title: 'Insight Agent', 1189 title: 'Insight Agent',
1190 - subtitle: '负责洞察分析的模型配置', 1190 + subtitle: 'OpenAi接入格式,推荐LLM:kimi-k2',
1191 fields: [ 1191 fields: [
1192 { key: 'INSIGHT_ENGINE_API_KEY', label: 'API Key', type: 'password' }, 1192 { key: 'INSIGHT_ENGINE_API_KEY', label: 'API Key', type: 'password' },
1193 { key: 'INSIGHT_ENGINE_BASE_URL', label: 'Base URL' }, 1193 { key: 'INSIGHT_ENGINE_BASE_URL', label: 'Base URL' },
@@ -1196,7 +1196,7 @@ @@ -1196,7 +1196,7 @@
1196 }, 1196 },
1197 { 1197 {
1198 title: 'Media Agent', 1198 title: 'Media Agent',
1199 - subtitle: '媒体内容理解与生成模型', 1199 + subtitle: 'OpenAi接入格式,推荐LLM:gemini-2.5-pro',
1200 fields: [ 1200 fields: [
1201 { key: 'MEDIA_ENGINE_API_KEY', label: 'API Key', type: 'password' }, 1201 { key: 'MEDIA_ENGINE_API_KEY', label: 'API Key', type: 'password' },
1202 { key: 'MEDIA_ENGINE_BASE_URL', label: 'Base URL' }, 1202 { key: 'MEDIA_ENGINE_BASE_URL', label: 'Base URL' },
@@ -1205,7 +1205,7 @@ @@ -1205,7 +1205,7 @@
1205 }, 1205 },
1206 { 1206 {
1207 title: 'Query Agent', 1207 title: 'Query Agent',
1208 - subtitle: '负责搜索与信息汇总的模型配置', 1208 + subtitle: 'OpenAi接入格式,推荐LLM:deepseek-chat',
1209 fields: [ 1209 fields: [
1210 { key: 'QUERY_ENGINE_API_KEY', label: 'API Key', type: 'password' }, 1210 { key: 'QUERY_ENGINE_API_KEY', label: 'API Key', type: 'password' },
1211 { key: 'QUERY_ENGINE_BASE_URL', label: 'Base URL' }, 1211 { key: 'QUERY_ENGINE_BASE_URL', label: 'Base URL' },
@@ -1214,7 +1214,7 @@ @@ -1214,7 +1214,7 @@
1214 }, 1214 },
1215 { 1215 {
1216 title: 'Report Agent', 1216 title: 'Report Agent',
1217 - subtitle: '报告生成使用的模型配置', 1217 + subtitle: 'OpenAi接入格式,推荐LLM:gemini-2.5-pro',
1218 fields: [ 1218 fields: [
1219 { key: 'REPORT_ENGINE_API_KEY', label: 'API Key', type: 'password' }, 1219 { key: 'REPORT_ENGINE_API_KEY', label: 'API Key', type: 'password' },
1220 { key: 'REPORT_ENGINE_BASE_URL', label: 'Base URL' }, 1220 { key: 'REPORT_ENGINE_BASE_URL', label: 'Base URL' },
@@ -1223,7 +1223,7 @@ @@ -1223,7 +1223,7 @@
1223 }, 1223 },
1224 { 1224 {
1225 title: 'Forum Host', 1225 title: 'Forum Host',
1226 - subtitle: '多智能体协同使用的模型配置', 1226 + subtitle: 'OpenAi接入格式,推荐LLM:qwen-plus',
1227 fields: [ 1227 fields: [
1228 { key: 'FORUM_HOST_API_KEY', label: 'API Key', type: 'password' }, 1228 { key: 'FORUM_HOST_API_KEY', label: 'API Key', type: 'password' },
1229 { key: 'FORUM_HOST_BASE_URL', label: 'Base URL' }, 1229 { key: 'FORUM_HOST_BASE_URL', label: 'Base URL' },
@@ -1232,7 +1232,7 @@ @@ -1232,7 +1232,7 @@
1232 }, 1232 },
1233 { 1233 {
1234 title: 'Keyword Optimizer', 1234 title: 'Keyword Optimizer',
1235 - subtitle: 'SQL / 关键词优化模型配置', 1235 + subtitle: 'OpenAi接入格式,推荐LLM:qwen-plus',
1236 fields: [ 1236 fields: [
1237 { key: 'KEYWORD_OPTIMIZER_API_KEY', label: 'API Key', type: 'password' }, 1237 { key: 'KEYWORD_OPTIMIZER_API_KEY', label: 'API Key', type: 'password' },
1238 { key: 'KEYWORD_OPTIMIZER_BASE_URL', label: 'Base URL' }, 1238 { key: 'KEYWORD_OPTIMIZER_BASE_URL', label: 'Base URL' },
@@ -1241,7 +1241,7 @@ @@ -1241,7 +1241,7 @@
1241 }, 1241 },
1242 { 1242 {
1243 title: '外部检索工具', 1243 title: '外部检索工具',
1244 - subtitle: '联动搜索引擎、网站抓取等在线服务', 1244 + subtitle: '联动搜索引擎、网站抓取等在线服务,两个都需配置',
1245 fields: [ 1245 fields: [
1246 { key: 'TAVILY_API_KEY', label: 'Tavily API Key', type: 'password' }, 1246 { key: 'TAVILY_API_KEY', label: 'Tavily API Key', type: 'password' },
1247 { key: 'BOCHA_WEB_SEARCH_API_KEY', label: 'Bocha API Key', type: 'password' } 1247 { key: 'BOCHA_WEB_SEARCH_API_KEY', label: 'Bocha API Key', type: 'password' }