feat: 新增360/搜狗/微信搜索提供商 + PG15→16升级 & 项目文档更新
- search_utils.py: 新增 _call_360/_call_sogou/_call_wechat HTML爬取函数 - initial_data.py: 种子数据新增三个搜索提供商(priority 3/4/5) - models.py: provider_type 注释补充新类型 - admin.html: 搜索提供商类型下拉框新增三个选项 - AGENTS.md/PROGRESS.md/README.md: PostgreSQL 15→16 - README.md: 移除硬编码数据库密码
This commit is contained in:
@@ -76,6 +76,9 @@ def import_initial_data():
|
||||
providers = [
|
||||
SearchProvider(name="百度千帆", provider_type="baidu", api_key="", api_url="https://qianfan.baidubce.com/v2/ai_search/web_search", console_url="https://console.bce.baidu.com/qianfan/ais/console/onlineService", priority=1, enabled=True, daily_limit=50),
|
||||
SearchProvider(name="opencode云搜索", provider_type="mcp", api_key="", api_url="", console_url="https://opencode.ai", priority=2, enabled=True, daily_limit=99999),
|
||||
SearchProvider(name="360搜索", provider_type="360", api_key="", api_url="", console_url="https://www.so.com", priority=3, enabled=True, daily_limit=200),
|
||||
SearchProvider(name="搜狗搜索", provider_type="sogou", api_key="", api_url="", console_url="https://sogou.com", priority=4, enabled=True, daily_limit=200),
|
||||
SearchProvider(name="微信搜一搜", provider_type="wechat", api_key="", api_url="", console_url="https://wx.sogou.com/weixin", priority=5, enabled=True, daily_limit=200),
|
||||
]
|
||||
for p in providers:
|
||||
db.add(p)
|
||||
|
||||
@@ -10,7 +10,7 @@ class SearchProvider(Base):
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True, autoincrement=True)
|
||||
name = Column(String, nullable=False, comment="显示名称")
|
||||
provider_type = Column(String, nullable=False, comment="baidu / qiniu / tinyfish")
|
||||
provider_type = Column(String, nullable=False, comment="baidu / qiniu / tinyfish / bing / mcp / 360 / sogou / wechat")
|
||||
api_key = Column(String, nullable=True, comment="API密钥")
|
||||
api_url = Column(String, nullable=True, comment="API地址")
|
||||
priority = Column(Integer, default=1, comment="优先级,越小越优先")
|
||||
|
||||
@@ -557,6 +557,9 @@
|
||||
<el-select v-model="searchProviderForm.provider_type" style="width:100%">
|
||||
<el-option label="百度千帆" value="baidu"></el-option>
|
||||
<el-option label="opencode云搜索" value="mcp"></el-option>
|
||||
<el-option label="360搜索" value="360"></el-option>
|
||||
<el-option label="搜狗搜索" value="sogou"></el-option>
|
||||
<el-option label="微信搜一搜" value="wechat"></el-option>
|
||||
</el-select>
|
||||
</el-form-item></el-col>
|
||||
</el-row>
|
||||
|
||||
Reference in New Issue
Block a user