1. 环境准备
操作系统:CentOS Linux release 7.4.1708 (Core)
Docker版本:Docker version 26.1.4, build 5650f9b
2. 部署
2.1 拉取镜像并启动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| [root@dify ~]# cd /opt/module/dify/ [root@dify dify]# [root@dify dify]# [root@dify dify]# [root@dify dify]# [root@dify dify]# cd docker/ [root@dify docker]# [root@dify docker]# [root@dify docker]# cp .env.example .env [root@dify docker]# [root@dify docker]# [root@dify docker]# docker compose up -d [+] Running 0/11 [+] Running 11/38 1.7s ⠹ web [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀] Pulling 481.2s ⠹ redis [⠀⠀⠀⠀⠀⠀⠀] Pulling 481.2s ⠹ sandbox [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀] Pulling 481.2s ⠹ nginx [⠀⠀⠀⠀⠀⠀] Pulling 481.2s ⠹ api Pulling 481.2s ✔ ssrf_proxy Pulled 256.4s ⠙ plugin_daemon [⠀⠀⠀⠀⠀] Pulling 481.2s ⠙ worker Pulling 481.2s ⠙ worker_beat [⣿⣿⣿⣿⣿⣿⣿⣿⠀⡀⠀⠀⠀] Pulling 481.2s ⠙ db [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀] Pulling 481.2s ⠙ weaviate [⠀⠀⠀⠀] Pulling
|
2.2 初始化
2.2.1 验证服务是否正常
点我跳转到初始化页面
2.2.2 访问初始化页面
2.2.3 配置大语言模型
右上角-设置-模型供应商
和云端配置几乎一样
3. 简单配置一个应用

使用API请求应用(注意这里的apikey在如下位置配置):

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| curl -X POST 'http://192.168.100.133/v1/chat-messages' \ --header 'Authorization: Bearer app-whvyIQW9f7AKfCISURNd5PA2' \ --header 'Content-Type: application/json' \ --data-raw '{ "inputs": {}, "query": "What are the specs of the iPhone 13 Pro Max?", "response_mode": "streaming", "conversation_id": "", "user": "abc-123", "files": [ { "type": "image", "transfer_method": "remote_url", "url": "https://cloud.dify.ai/logo/logo-site.png" } ] }'
|