开源服务
工作流工具
Dify
安装
# clone项目
git clone https://github.com/langgenius/dify.git
# 启动
cd dify
cd docker
cp .env.example .env
docker compose up -d插件开发
常见问题
插件安装缓慢
# 将pip.conf映射到langgenius/dify-plugin-daemon:0.0.3-local容器中 /root/.pip/pip.conf中
# pip.conf内容
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/ComfyUI
生图工具,可以直接对接comfyui,结合大模型生成图像
安装插件: 阿里妈妈技术开源FLUX图像修复&蒸馏加速模型 - 知乎
n8n
和dify类似的工具,
API工具
one-api
安装和配置
使用Gemini等需要翻墙的api服务器的时候,直接在dify上配置代理通常不work,并且及其复杂,所以需要一个api代理,这里使用的是one-api:
使用docker-compose起服务器:
services:
one-api:
container_name: one-api
image: justsong/one-api:v0.6.10
restart: always
env_file: .env
network_mode: bridge
ports:
- 3000:3000
volumes:
- ./data:/data环境变量:
TZ=Asia/Shanghai
# mysql数据库,需要提前建oneapi的表
SQL_DSN="root:xxx@tcp(<your_host>:3306)/oneapi"
SESSION_SECRET="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# 并且容器启动时给one-api增加`http_proxy`和`https_proxy`的环境变量,注意代理尽量有类似于`privoxy`的`actions`策略,用来自动分流。
http_proxy=http://<your_http_proxy>
https_proxy=http://<your_http_proxy>