互联网元搜索引擎SearXNG
最近有个很火的项目叫 FreeAskInternet,其工作原理是:
- 第一步、用户提出问题
- 第二步、用
SearXNG(本地运行)在多个搜索引擎上进行搜索 - 第三步、将搜索结果传入
LLM生成答案
所有进程都在本地运行,适用于需要快速获取信息但又重视隐私保护的用户,FreeAskInternet 提供了一个便捷且安全的解决方案。
不过 FreeAskInternet 在国内使用,可能还是存在网络问题, LLM 我们可以使用 kimi-free-api 等国内产品,但是 SearXNG 的效果如何,还需要进一步测试
什么是 SearXNG ?
SearXNG是一个免费的互联网元搜索引擎,它来自各种搜索服务和数据库的结果。用户既不被跟踪,也不会被分析。
多年前,老苏曾经写过 searX,按照常见的命名规则,NG 代表 Next Generation,即下一代,所以可以我们简单的理解为 SearXNG 是 SearX 的分支的下一代版本,可能包含了对代码的重写、新功能的添加以及对用户体验的改进。
文章传送门:searX用处不大的个人聚合搜索引擎
安装
在群晖上以 Docker 方式安装。
推荐使用命令行方式安装
在注册表中搜索 searxng ,选择第一个 searxng/searxng,版本选择 latest。
开始折腾时,
latest版本对应为2024.3.29-f5bb64cca,本文写作时,latest版本对应为2024.4.8-4acb52f68;

权限
勾选 使用高权限执行容器

卷
在 docker 文件夹中,创建一个新文件夹 searxng,并在其中建一个子文件夹 data
| 文件夹 | 装载路径 | 说明 |
|---|---|---|
docker/searxng/data |
/etc/searxng |
存放设置文件等 |

端口
本地端口不冲突就行,不确定的话可以用命令查一下
1 | # 查看端口占用 |
| 本地端口 | 容器端口 |
|---|---|
8061 |
8080 |

命令行安装
如果你熟悉命令行,可能用 docker cli 更快捷
1 | # 新建文件夹 searxng 和 子目录 |
也可以用 docker-compose 安装,将下面的内容保存为 docker-compose.yml 文件
1 | version: '3.7' |
然后执行下面的命令
1 | # 新建文件夹 searxng 和 子目录 |
运行
在浏览器中输入 http://群晖IP:8061 就能看到搜索界面

先进 首选项 进行设置,任何更改都需要 保存 才能生效

调整了一下搜索引擎,挑选了几个主流的搜索引擎
【注意】:群晖必须要能访问到才行,否则是不会出搜索结果的

第一次搜 小猫照片,返回的结果第一页是 bing 的

刷新后,第一页都是 google 的

有时候,会需要多次刷新才会有搜索结果,看来老苏的网络也不太稳定
想让 Chatgpt 3.5 具备联网搜索的方法很多,譬如给 Chrome 装个 WebChatGPT 插件

所以 FreeAskInternet 就不再尝试了
参考文档
searxng/searxng: SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
地址:https://github.com/searxng/searxngsearxng/searxng-docker: The docker-compose files for setting up a SearXNG instance with docker.
地址:https://github.com/searxng/searxng-dockerWelcome to SearXNG — SearXNG Documentation (2022.05.29-38403ee5)
地址:https://docs.searxng.org/[问题]searx和searxng有什么区别? · searchxng/searxng · 讨论 #972
地址:https://github.com/searxng/searxng/discussions/972nashsu/FreeAskInternet: FreeAskInternet is a completely free, PRIVATE and LOCALLY running search aggregator & answer generate using MULTI LLMs, without GPU needed. The user can ask a question and the system will make a multi engine search and combine the search result to LLM and generate the answer based on search results. It’s all FREE to use.
地址:https://github.com/nashsu/FreeAskInternet