














传统搜索引擎(如百度、Google)往往会追踪用户的搜索历史,收集个人数据,甚至分析用户行为。
SearXNG,作为开源(GitHub,29.3K Star,2.8K Fork)的元搜索引擎,通过聚合来自多个搜索引擎的结果,保持对用户的匿名保护,确保不会进行任何追踪或数据收集。官方文档。
而在Agent中,调用Google、Baidu、Bing等都需要API身份验证、比较麻烦。使用SearXNG就省去了这个麻烦。
功能特点
支持多种安装部署 方式:
searxng/searxng:latest1、新建一个目录:
# Create and navigate to instance directory mkdir my-searxng-instance && cd my-searxng-instance
2、拉取searxng镜像
# Pull and run SearXNG container docker pull searxng/searxng:latest
3、启动容器:
docker run -d -p 8081:8080 -v "./searxng:/etc/searxng" -e "BASE_URL=http://localhost:8081/" -e "INSTANCE_NAME=dify-searxng" --name searxng-dify --restart=always searxng/searxng:latest
4、配置searxng\settings.yml文件中的搜索引擎
国内开这几个就行:
search:
formats:
- html
- json # This is crucial for API access
server:
limiter: false # Disable rate limiting for API usage
# Optional: Configure specific engines
engines:
- name: baidu
baidu_category: general
categories: [general]
engine: baidu
shortcut: bd
disabled: false
- name: bing
engine: bing
shortcut: bi
disabled: false
- name: sogou
engine: sogou
shortcut: sogou
disabled: false
- name: 360search
engine: 360search
shortcut: 360so
timeout: 10.0
disabled: false
5.修改完配置后重启容器:
# Restart the container to apply changes docker restart searxng-dify
6.验证
在浏览器打开你的searxng地址:http://localhost:8081/


聚合搜索结果正常显示。
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。