
开发 AI 应用时,大家常常头疼两件事:大模型无法接入实时数据,开发流程还特别复杂。下面给大家介绍的是 Dify 和 SearXNG 的私有搜索引擎部署方案,通过 Docker 实现 SearXNG 在 Windows 系统的快速搭建,并集成至 Dify 智能开发平台。
SearXNG 搜索引擎相当强大,支持 70 多个网站的搜索。配合上 Dify 的低代码配置应用,搜索到的数据会自动输送给 DeepSeek 等大模型进行总结,收集资讯、竞品分析等应用很方便。
1. 拉源码仓库
git clone https://github.com/searxng/searxng-docker.git
进入文件夹
cd searxng-docker
2. 修改 searxng/settings.yml
2.1 searxng/settings.yml 初始内容
# see https://docs.searxng.org/admin/settings/settings.html#settings-use-default-settings
use_default_settings: true
server:
# base_url is defined in the SEARXNG_BASE_URL environment variable, see .env and docker-compose.yml
secret_key: "ultrasecretkey" # change this!
limiter: true # can be disabled for a private instance
image_proxy: true
ui:
static_use_hash: true
redis:
url: redis://redis:6379/0
2.2 适配 dify
扩展数据返回格式支持
search:
formats:
- html
- json
2.3 生成秘钥 🔑
官方给的脚本(使用.NET 加密库)
$randomBytes = New-Object byte[] 32
(New-Object Security.Cryptography.RNGCryptoServiceProvider)

最低0.47元/天 解锁文章

2581





