Install
openclaw skills install difyDify AI应用开发平台指南。用于构建LLM应用、工作流、Agent和知识库。当用户需要(1)使用Dify创建AI应用 (2)设计LLM工作流 (3)配置知识库RAG (4)开发AI Agent (5)调用Dify API (6)自托管部署Dify时激活此技能。
openclaw skills install difyDify是开源的LLM应用开发平台,支持快速构建AI应用、工作流和Agent。
# 克隆最新版本
git clone --branch "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r .tag_name)" https://github.com/langgenius/dify.git
# 启动
cd dify/docker
cp .env.example .env
docker compose up -d
访问 http://localhost/install 初始化管理员账户。
所有API请求需要在Header中携带API Key:
Authorization: Bearer {api_key}
POST /v1/workflows/run
Content-Type: application/json
{
"inputs": {
"query": "翻译这段文字..."
},
"response_mode": "blocking", # 或 "streaming"
"user": "user-123"
}
POST /v1/chat-messages
Content-Type: application/json
{
"query": "你好",
"response_mode": "streaming",
"user": "user-123",
"conversation_id": "" # 首次为空,后续传入返回的conversation_id
}
工作流中添加 Knowledge Retrieval 节点,选择知识库。