修复网页对话并接入 SearXNG 搜索

This commit is contained in:
ylhan
2026-09-16 11:17:41 +08:00
parent c3d2c7f3a8
commit 719fc13e48
13 changed files with 840 additions and 52 deletions
+17
View File
@@ -0,0 +1,17 @@
services:
searxng:
# 固定为 2026-09-16 已完成真实搜索验收的镜像,升级时重新跑 test_search_live.py。
image: docker.io/searxng/searxng@sha256:f1aca3f61c7ff4552b8d54c0ab7fb458e907b78f51c503210cf450c900adca2c
container_name: ai-companion-searxng
restart: unless-stopped
ports:
# 只给同机助手调用,不向局域网或公网暴露。
- "127.0.0.1:18080:8080"
volumes:
- ./settings.yml:/etc/searxng/settings.yml:ro
- searxng-cache:/var/cache/searxng
environment:
- SEARXNG_BASE_URL=http://127.0.0.1:18080/
volumes:
searxng-cache:
+39
View File
@@ -0,0 +1,39 @@
use_default_settings:
# 服务器实测 DuckDuckGo/Brave/Wikipedia 超时;只保留当前网络可达的
# Bing 和国内搜索源,避免每次查询等待一批必然失败的引擎。
engines:
keep_only:
- bing
- bing news
- 360search
- sogou
general:
instance_name: AI Companion Search
debug: false
search:
safe_search: 1
formats:
- html
- json
server:
# 部署时用随机值替换,settings.yml 已被仓库的 *.yml 规则之外的 .gitignore
# 单独忽略;实例只监听宿主机回环地址。
secret_key: "__SEARXNG_SECRET__"
bind_address: "0.0.0.0"
limiter: false
public_instance: false
image_proxy: false
# keep_only 仍保留默认的 disabled 状态,需要显式启用这些引擎,聚合查询才会使用。
engines:
- name: bing
disabled: false
- name: bing news
disabled: false
- name: 360search
disabled: false
- name: sogou
disabled: false