Merge pull request #76 from langgenius/docs/improve-ai-sales-avatar

Docs: update user case
This commit is contained in:
AllenWriter
2025-05-14 16:39:06 +08:00
committed by GitHub
10 changed files with 176 additions and 2284 deletions

View File

@@ -423,7 +423,8 @@
"en/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website",
"en/learn-more/use-cases/how-to-connect-aws-bedrock",
"en/learn-more/use-cases/dify-schedule",
"en/learn-more/use-cases/building-an-ai-thesis-slack-bot"
"en/learn-more/use-cases/building-an-ai-thesis-slack-bot",
"en/learn-more/use-cases/build-ai-sales-avatar"
]
},
{
@@ -1043,7 +1044,8 @@
"zh-hans/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website",
"zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock",
"zh-hans/learn-more/use-cases/dify-schedule",
"zh-hans/learn-more/use-cases/dify-model-arena"
"zh-hans/learn-more/use-cases/dify-model-arena",
"zh-hans/learn-more/use-cases/build-ai-sales-avatar"
]
},
{
@@ -1629,7 +1631,8 @@
"ja-jp/learn-more/use-cases/how-to-connect-aws-bedrock",
"ja-jp/learn-more/use-cases/dify-model-arena",
"ja-jp/learn-more/use-cases/dify-schedule",
"ja-jp/learn-more/use-cases/building-an-ai-thesis-slack-bot"
"ja-jp/learn-more/use-cases/building-an-ai-thesis-slack-bot",
"ja-jp/learn-more/use-cases/build-ai-sales-avatar"
]
},
{

View File

View File

@@ -1,9 +1,8 @@
# Exploring the AI Sales Avatar
**Dify × TEN × Trulience × Azure × Agora × OpenAI Integration Guide**
---
title: Building an AI Digital Sales Assistant
description: Author [Alec Lee](mailto:alec.lee1005@gmail.com) | AX Global Strategist & Full-Stack Explorer. If you find any areas for improvement in this article, please feel free to contact me.
---
This guide is designed for global 🌍 enterprise developers and individual explorers.
Well walk you through building an AI-powered digital sales assistant capable of:
🧠 **Listening**
@@ -11,43 +10,17 @@ Well walk you through building an AI-powered digital sales assistant capable
🤖 **Thinking**
🎭 **Performing**
All through a real-world use case:
> **Luxury Car AI Sales Avatar Vendy**
All through a real-world use case: **Luxury Car AI Sales Avatar Vendy**
![TEN AgentTalk](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/053TrulienceDifyFinal.jpg)
This project is built using the following products: **Dify × TEN × Trulience × Azure × Agora × OpenAI Integration Guide**
---
### 🙏 Acknowledgements
Before we begin, heartfelt thanks to the teams from **Dify**, **TEN**, **Agora**, and **Azure**
for their guidance and encouragement. This project was made possible by the spirit of:
## Introduction
- ✨ Exploration
- 🤝 Collaboration
- 🚀 Empowerment
It is this spirit that enabled me — a zero-to-one AI co-creator — to bring this idea to life.
> 💬 _“I hope this document provides a practical and reusable pathway for more AI explorers around the world —
lowering technical barriers and enabling the real-world implementation of **AX (AI Transformation)**.”_
---
### 💡 I firmly believe:
> **AI is created by humans, developed by humans, and ultimately exists to protect human dignity and freedom.**
Only when technology resonates with human values can it truly become a power for every individual.
---
**👤 Author**: Alec Lee AX Global Strategist & Full-Stack Explorer
_“Empowering one to stand for a thousand — leaving no one behind across cultures and systems.”_
📅 **Date**: May 11, 2025
📧 **Email**: [alec.lee1005@gmail.com](mailto:alec.lee1005@gmail.com)
---
## 1. What are the six platforms that power a “ListenThinkSpeakPerform” AI Avatar?
What are the six platforms that power a “ListenThinkSpeakPerform” AI Avatar?
This project is centered on the **TEN platform**, integrating six key systems to create **Vendy**, a luxury car AI sales avatar with full conversational capability.
Vendy can:
@@ -60,50 +33,52 @@ Vendy can:
---
## 🧩 Platform Roles Overview
### 🧩 Platform Roles Overview
👇 This diagram outlines the **role of each platform**, their **integration modules**, and the **collaboration workflow**:
<!-- (Insert diagram or list here in next section) -->
![AI Sales Avatar](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/001AIsalesAvatar.jpg)
## 🧩 Roles of Each Platform in the System
### 🧩 Roles of Each Platform in the System
👇 The diagram below illustrates how each platform contributes within the system — including their integration modules and collaborative workflow:
<!-- (Insert architecture diagram or detailed list of platform roles below) -->
![Trulience ](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/002Trulience.jpg)
## 📌 Platform Functions Overview
### 📌 Platform Functions Overview
- **Dify + OpenAI**
### **Dify + OpenAI**
Builds the **intelligent agent core**. It connects to both **internal enterprise data** and the **OpenAI API**, providing a **unified conversation API interface** to TEN.
### **Trulience**
- **Trulience**
Enables **digital human rendering**. It provides a **digital human ID** and **access token** to TEN for **visual avatar presentation**.
### **Agora**
- **Agora**
Handles **voice and video communication**. It provides **App ID** and **Certificate** to TEN for **real-time interaction**.
### **Azure Speech**
- **Azure Speech**
Offers **speech-to-text (STT)** and **text-to-speech (TTS)** services. It provides the following parameters to TEN:
- `AZURE_STT_KEY`
- `AZURE_STT_REGION`
- `AZURE_TTS_KEY`
- `AZURE_STT_KEY`
- `AZURE_STT_REGION`
- `AZURE_TTS_KEY`
- `AZURE_TTS_REGION`
### **TEN (Central Platform)**
- **TEN (Central Platform)**
Serves as the **orchestration hub**, integrating and managing APIs, keys, and tokens from all platforms.
TEN enables **Vendy**, the AI Sales Avatar, to conduct **intelligent conversations** and **real-time interactions**.
> 📌 **Note:** Each of the platforms above can be substituted with alternative open-source or SaaS services depending on your use case.
> The current combination is a reference setup, designed for **learning** and **reusability**.
📌 **Note:** Each of the platforms above can be substituted with alternative open-source or SaaS services depending on your use case.
The current combination is a reference setup, designed for **learning** and **reusability**.
---
## 2. Lets Build! (Think of it like assembling LEGO 🧱)
## Building the Central Brain of the AI Sales Agent
Well start with three simple steps in **Dify** to build the **“core intelligence”** of our AI Sales Avatar — based on **internal company data**.
Our demo scenario: a **luxury car sales assistant** named **Vendy**.
@@ -112,18 +87,15 @@ Our demo scenario: a **luxury car sales assistant** named **Vendy**.
### 🧩 Step 1: Register a Dify Account & Configure Model API
👉 Go to the official Dify website: [https://dify.ai/](https://dify.ai/)
Click "**Get Started**" in the top right corner to begin the registration process.
![Dify AI](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/003DifyAIsales.jpg)
👉 Go to the official [Dify website](https://dify.ai/), Click "**Get Started**" in the top right corner to begin the registration process.
You can sign up or log in using one of the following methods:**GitHub**、**Gmail**or **Hotmail**.
![Dify Email](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/004DifyEmail.jpg)
After logging into **Dify**, follow these steps:
Click **“Settings > Model Provider”** in the left-hand menu.
On the page, locate the **OpenAI** module and click **Install** to set it up.
![Dify Models](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/005DifyModels.jpg)
@@ -142,8 +114,7 @@ Copy the generated key.Return to **Dify**, and paste the key into the **OpenAI m
### 🧩 Step 2: Upload Internal Documents for the AI Sales Avatar
Once the model configuration is complete, your environment is ready.
You can now begin building the **knowledge base** for your AI Sales Avatar in Dify.
Once the model configuration is complete, your environment is ready. You can now begin building the **knowledge base** for your AI Sales Avatar in Dify.
1. In the **Dify console**, click **“Knowledge”** from the top menu.
2. Then click **“Create Knowledge”** to create a new **knowledge dataset**.
@@ -175,7 +146,6 @@ The **default settings** are suitable for most use cases.
We recommend keeping them as they are and simply clicking **“Save & Process”** to complete the setup.
> ⚙️ *(Optional)* If you later wish to improve the AI assistants comprehension accuracy,
> you can adjust parameters based on your specific business needs.
![Dify Knowledge](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/012DifyEmbedding.jpg)
✅ If you see the following page, it means your document has been successfully uploaded and parsed by the Dify system.
@@ -184,8 +154,7 @@ We recommend keeping them as they are and simply clicking **“Save & Process”
---
At this point, weve completed the **knowledge base setup** —
your AI Sales Avatar now has its foundational memory in place.
At this point, weve completed the **knowledge base setup** — your AI Sales Avatar now has its foundational memory in place.
---
@@ -247,6 +216,8 @@ In other words — we will give her a **face, expression, and presence**, enabli
---
## Create the Digital AI Avatar
### 🧩 Step 4: Register a Trulience Account and Get Your Digital Avatar ID & Token
Now its time to give your AI Sales Avatar a **visual identity**!
@@ -283,7 +254,6 @@ then click the green **“Create Avatar”** button to generate the digital huma
Once renamed, youll see her unique **Avatar ID** displayed below.
👇 Example view:
<!-- (Insert screenshot showing renamed avatar and Avatar ID) -->
![Trulience Vendy](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/022TrulienceAvatarName.jpg)
@@ -297,24 +267,16 @@ this is your **Access Token**.
---
🎉 **Congratulations!**
🎉 **Congratulations!**
Youve successfully completed the **visual appearance setup** for your AI Sales Avatar,
and obtained both the **Avatar ID** and **Access Token**.
---
## 🧩 Step 5: Connect Everything in TEN for Real-Time Voice AI Agent
## Enabling Voice Capabilities for Digital AI Avatar
Now its time for the final step:
Well integrate the **intelligent core from Dify** and the **digital human from Trulience**
into the **TEN platform**, building a truly unified AI agent that can **listen, speak, think, and perform** — all in real time!
> 📚 To learn more about Trulience, visit the official documentation:
👉 [https://www.trulience.com/docs#/](https://www.trulience.com/docs#/)
---
## 🧩 Step 5: Prepare Three Key Configurations Before Running TEN Agent Locally
### 🧩 Step 5: Prepare Three Key Configurations Before Running TEN Agent Locally
Before integrating the **Dify agent** and **Trulience digital human** into the TEN platform,
we need to set up the accounts and credentials required for voice communication and speech processing.
@@ -323,7 +285,7 @@ Specifically, youll need to prepare the following three components:
---
### ✅ 1. Agora Real-Time Voice Communication Parameters
#### ✅ 1. Agora Real-Time Voice Communication Parameters
TEN uses **Agora** to enable real-time voice interactions (i.e., “she can speak”).
Youll need the following parameters:
@@ -332,7 +294,8 @@ Youll need the following parameters:
- `AGORA_CERTIFICATE=`Certificate
👉 **How to get it:**
Log in to the Agora Console: [https://console.agora.io](https://console.agora.io)
Log in to the [Agora Console](https://console.agora.io).
Create a new project, and youll be able to access the required parameters.
👇 Sample view of the Agora Console:
@@ -348,7 +311,7 @@ Then, click **“Create New”** in the top-right corner to create a new project
---
### 📝 Input Field Guide:
📝 **Input Field Guide**:
- **Project Name**: Use something like `AISalesAvatar`
- **Use Case**: Select an appropriate option, e.g., `Enterprise Collaboration`
@@ -357,7 +320,6 @@ Then, click **“Create New”** in the top-right corner to create a new project
Once completed, click **“Submit”** to create the project.
👇 After successful creation, you will be able to access your **App ID** and **Certificate**:
<!-- (Insert screenshot showing the generated App ID and Certificate) -->
![Agora APP ID](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/025AgoraAPPID.jpg)
@@ -382,15 +344,11 @@ Click the **copy icon** to copy the project's **Certificate**.
At this point, youve successfully obtained the **Agora App ID** and **Primary Certificate**,
completing the required setup for enabling **real-time voice communication** in the TEN platform.
> 📚 For more information, refer to the official Agora documentation:
> [https://docs.agora.io](https://docs.agora.io)
📚 For more information, refer to the official Agora documentation:
👉 [https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project)
📚 For more information, refer to the official [Agora documentation](https://docs.agora.io):
---
### ✅ 2. Azure Speech Parameters (Speech-to-Text + Text-to-Speech)
#### ✅ 2. Azure Speech Parameters (Speech-to-Text + Text-to-Speech)
**Azure** handles two critical voice functions:
- **STT (Speech-to-Text)**: Converts the user's spoken words into text
@@ -398,14 +356,15 @@ completing the required setup for enabling **real-time voice communication** in
Youll need to prepare the following four environment variables:
AZURE_STT_KEY= AZURE_STT_REGION=
AZURE_TTS_KEY= AZURE_TTS_REGION=.
- `AZURE_STT_KEY`
- `AZURE_STT_REGION`
- `AZURE_TTS_KEY`
- `AZURE_TTS_REGION`
![Azure Resource](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/028Azure.jpg)
---
Next, fill in the required fields under the **Basics** tab:
👇 Reference guide for the "Basics" section:
![Azure OpenAI List](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/029AzureOpenAI.jpg)
@@ -417,7 +376,8 @@ which allows the service to be accessed over the internet.
![Azure OpenAI Public](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/030AzureCreateAzureOpenAI.jpg)
🧩 **Optional Step:**
🧩 **Optional Step:**
You can add resource tags — for example, `project=ai-agent` — to help with future organization and management.
👇 Example view of the **Tags** and **Networking** configuration screen:
@@ -487,18 +447,15 @@ Click the **“View Code”** button to copy the current speech services **AP
---
🎉 **Congratulations!**
Youve now completed all the required parameter preparations.
for running the **TEN platform** and connecting your AI Sales Avatar.
🎉 **Congratulations!**
Youve now completed all the required parameter preparations. For running the **TEN platform** and connecting your AI Sales Avatar.
---
---
🧱 Whats Next: Launching the TEN Agent Platform Locally
### 🧱 Whats Next: Launching the TEN Agent Platform Locally
Now were ready to **launch the TEN Agent platform on your local machine**,
and connect all the components weve prepared:
Now were ready to **launch the TEN Agent platform on your local machine** and connect all the components weve prepared:
- 🧠 **Intelligent Agent** (via Dify)
- 🔊 **Voice Capabilities** (via Azure Speech + Agora)
@@ -511,17 +468,19 @@ Lets build it!
---
📚 For more details on deploying Azure Speech and OpenAI services, refer to the official documentation:
👉 [https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal)
📚 For more details on deploying Azure Speech and OpenAI services, refer to the [official documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal):
## Debugging the Voice Interaction System for Digital Humans
### 🧩 Step 6: Set Up the TEN Agent Development Environment on macOS
To run and test the AI Sales Avatars real-time voice interaction system,
we first need to set up the **TEN Agent development environment** on your Mac.
To run and test the AI Sales Avatars real-time voice interaction system, we first need to set up the **TEN Agent development environment** on your Mac.
---
### 🔧 Required Tools & Installation Guide
#### Prerequisites
🔧 Required Tools & Installation Guide
| Tool | Purpose | Installation Method |
|-----------|----------------------------------------|-----------------------------------------|
@@ -529,10 +488,9 @@ we first need to set up the **TEN Agent development environment** on your Mac.
| Git | Clone and manage the TEN codebase | `brew install git` |
| Node.js | Run the front-end (Playground) | `brew install node` |
---
### ✅ ① Install Docker
##### ✅ ① Install Docker
💡 Docker is the core runtime environment for the TEN platform — all modules will run in containerized form.
@@ -546,7 +504,7 @@ Follow these steps:
Verify the installation: docker -v. If you see a version number, Docker is installed correctly.
### ✅ ② Install Git
##### ✅ ② Install Git
💡 Git is a version control tool used to **clone and manage the TEN framework codebase**.
@@ -554,15 +512,14 @@ Follow these steps:
brew install git.
Verify the installation: git -v. If a version number appears, Git is installed successfully.
### ✅ ③ Install Node.js
##### ✅ ③ Install Node.js
💡 Node.js is required to run the **TEN Playground frontend** locally.
- Install Node.js using Homebrew: brew install node
Verify the installation: node -v. If a version number appears, Node.js has been installed successfully.
### ✅ ④ Clone the TEN Agent Codebase
##### ✅ ④ Clone the TEN Agent Codebase
Once Docker, Git, and Node.js are installed, the next step is to **clone the TEN Agent source code** and prepare the `.env` environment configuration.
@@ -616,7 +573,7 @@ AZURE_TTS_REGION=your_tts_region
![TEN .env](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/042TENCursor.jpg)
## ✅ Step ⑤: Start the TEN Agent Container and Run the Server
##### ✅ Step ⑤: Start the TEN Agent Container and Run the Server
Once your `.env` file has been properly configured, the next step is to **launch the TEN Agent container environment**.
@@ -641,12 +598,11 @@ ten_agent_playground: Frontend interface for interactive testing
![TEN Agent ai_agents](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/043TENaiagents.jpg)
🔧 ② Enter the Container and Compile the Agent Server
### 🔧 ② Enter the Container and Compile the Agent Server
Run the following command to access the development container:docker exec -it ten_agent_dev bash
🔧 ③ Run the Initialization Script to Register the Agent.
### 🔧 ③ Run the Initialization Script to Register the Agent.
Once inside the container, execute the following command to register the Agent:task use
@@ -680,7 +636,7 @@ Then, click the **“Save”** button in the bottom-right corner to save your co
![TEN Agent Playground](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/046TEN494483.jpg)
✅ Replace the Text-to-Speech (TTS) Module with **Azure Engine**
### ✅ Replace the Text-to-Speech (TTS) Module with **Azure Engine**
1. Locate the **TTS module** in the graph (e.g., `tts_default`)
2. Right-click on the module and select **“Replace Node with”**
@@ -692,7 +648,7 @@ This completes the replacement of the TTS module with the Azure-based engine.
![TEN Agent Azure TTS Change](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/047TENAzuretts.jpg)
🎙️ **Customizing the Digital Humans Voice (TTS Settings)**
### 🎙️ **Customizing the Digital Humans Voice (TTS Settings)**
You can customize the voice of your digital avatar to match her personality and appearance.
Microsoft provides a full list of supported voice names in its speech service documentation.
@@ -708,11 +664,11 @@ In this example, we selected an English female voice:
In the Azure TTS module, set the following field:
Azure_synthesis_voice_name=en-US-AshleyNeural
`Azure_synthesis_voice_name=en-US-AshleyNeural`
![TEN Azure_synthesis_voice_name](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/048TENAzureVoice.jpg)
🔁 **Replace the LLM Module with Dify API to Connect Your Intelligent Agent**
### 🔁 **Replace the LLM Module with Dify API to Connect Your Intelligent Agent**
1. Right-click on the **`llm`** module and select **“Replace Node with”**
2. From the popup list, choose **`dify_python`**
@@ -733,7 +689,7 @@ and select **“Update Properties”** to open the configuration panel.
![TEN AgentDify API KeyGreeting](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/050TENDifyAPI2.jpg)
✅ 启动 TEN Agent 并连接 Trulience 数字人
## ✅ Start TEN Agent and Connect Trulience AI Avatar
---
@@ -863,7 +819,7 @@ Ultimately, it paves the way for a company-wide AI transformation and upgrade.
---
### ✨ Final Reflections
## ✨ Final Reflections
Ive always believed that AI should not merely be a cold, powerful tool —
but also a **warm companion to humanity**,
@@ -875,15 +831,12 @@ using the power of technology to uphold **human dignity and creativity**.
---
### 🤝 A Call for Co-Creation
If you, too, wish to join this global journey of co-creation,
we warmly invite you to **explore, experiment, and share** —
so that every individual can grow alongside AI,
and together, we may step into the AX era of:
> **“One Against a Thousand — Leaving No One Behind.”**
---
### 🌱 A Humble Beginning

View File

@@ -1,997 +0,0 @@
# 无效链接报告
生成时间: 2025-03-27 19:40:59
## 汇总
* 处理文件数: 231
* 发现无效链接数: 796
## 详细报告
### 文件: zh-hans/introduction.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 35 | **特性规格** | /zh-hans/getting-started/readme/features-and-specifications/ |
### 文件: zh-hans/url-report/link-check-report.md
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 4 | 文档标题 | 文档链接 |
| 4 | 引用的文档1 | 链接1 |
| 4 | 引用的文档2 | 链接2 |
| 9 | 欢迎使用 Dify | README |
| 9 | LLMOps | learn-more/extended-reading/what-is-llmops |
| 9 | **快速开始** | guides/application-orchestrate/creating-an-application |
| 9 | **自部署 Dify 到服务器** | getting-started/install-self-hosted/ |
| 9 | **接入开源模型** | guides/model-configuration/ |
| 9 | **特性规格** | getting-started/readme/features-and-specifications |
| 10 | 特性与技术规格 | getting-started/readme/features-and-specifications |
| 11 | 模型供应商列表 | getting-started/readme/model-providers |
| 11 | contribution.md | ../../community/contribution.md "mention" |
| 12 | 云服务 | getting-started/cloud |
| 13 | 社区版 | getting-started/install-self-hosted/README |
| 14 | Docker Compose 部署 | getting-started/install-self-hosted/docker-compose |
| 14 | 常见问题 | faq |
| 15 | 本地源码启动 | getting-started/install-self-hosted/local-source-code |
| 16 | 宝塔面板部署 | getting-started/install-self-hosted/bt-panel |
| 17 | 单独启动前端 Docker 容器 | getting-started/install-self-hosted/start-the-frontend-docker-container |
| 18 | 环境变量说明 | getting-started/install-self-hosted/environments |
| 18 | 文档 | https://www.volcengine.com/docs/6349/107356 |
| 19 | 常见问题 | getting-started/install-self-hosted/faq |
| 19 | 本地部署相关 | ../../learn-more/faq/install-faq |
| 20 | Dify Premium | getting-started/dify-premium |
| 24 | 接入大模型 | guides/model-configuration/README |
| 24 | Hugging Face | ../../development/models-integration/hugging-face |
| 24 | Replicate | ../../development/models-integration/replicate |
| 24 | Xinference | ../../development/models-integration/xinference |
| 24 | OpenLLM | ../../development/models-integration/openllm |
| 25 | 增加新供应商 | guides/model-configuration/new-provider |
| 26 | 预定义模型接入 | guides/model-configuration/predefined-model |
| 27 | 自定义模型接入 | guides/model-configuration/customizable-model |
| 28 | 接口方法 | guides/model-configuration/interfaces |
| 29 | 配置规则 | guides/model-configuration/schema |
| 30 | 负载均衡 | guides/model-configuration/load-balancing |
| 30 | 订阅 SaaS 付费服务 | ../../getting-started/cloud.md#ding-yue-ji-hua |
| 31 | 构建应用 | guides/application-orchestrate/README |
| 32 | 创建应用 | guides/application-orchestrate/creating-an-application |
| 33 | 聊天助手 | guides/application-orchestrate/chatbot-application |
| 33 | 知识库 | ../knowledge-base/ |
| 33 | 多模型调试 | ./multiple-llms-debugging |
| 34 | 多模型调试 | guides/application-orchestrate/multiple-llms-debugging |
| 35 | Agent | guides/application-orchestrate/agent |
| 36 | 应用工具箱 | guides/application-orchestrate/app-toolkits/README |
| 36 | 应用 | ../#application_type |
| 36 | 引用与归属 | ../../knowledge-base/retrieval-test-and-citation.md#id-2-yin-yong-yu-gui-shu |
| 36 | 敏感内容审查 | moderation-tool |
| 36 | 标注回复 | ../../annotation/annotation-reply |
| 37 | 敏感内容审查 | guides/application-orchestrate/app-toolkits/moderation-tool |
| 37 | moderation.md | ../../extension/api-based-extension/moderation.md "mention" |
| 38 | 工作流 | guides/workflow/README |
| 39 | 关键概念 | guides/workflow/key-concept |
| 39 | 节点说明 | node/ |
| 39 | 《变量》 | variables |
| 39 | End 节点 | node/end |
| 39 | Answer 节点 | node/answer |
| 39 | LLM | node/llm |
| 39 | 问题分类 | node/question-classifier |
| 39 | 变量 | key-concept.md#bian-liang |
| 40 | 变量 | guides/workflow/variables |
| 40 | 变量赋值 | node/variable-assigner |
| 40 | 变量赋值 | node/variable-assigner |
| 41 | 节点说明 | guides/workflow/node/README |
| 42 | 开始 | guides/workflow/node/start |
| 42 | 上传的文件 | ../file-upload |
| 42 | **系统变量** | ../variables.md#xi-tong-bian-liang |
| 42 | 文件上传 | ../file-upload |
| 42 | 文件上传 | ../file-upload |
| 42 | 外部数据工具 | ../../extension/api-based-extension/external-data-tool |
| 42 | 文件上传 | ../file-upload |
| 43 | LLM | guides/workflow/node/llm |
| 43 | 支持 | ../../../getting-started/readme/model-providers |
| 43 | 模型配置 | ../../model-configuration/ |
| 43 | 知识检索 | knowledge-retrieval |
| 43 | 知识检索节点 | knowledge-retrieval |
| 43 | 提示词专家模式(已下线) | ../../../learn-more/extended-reading/prompt-engineering/prompt-engineering-1/ |
| 43 | “知识库” | ../../knowledge-base/ |
| 43 | 知识检索节点 | knowledge-retrieval |
| 43 | **引用与归属** | ../../knowledge-base/retrieval-test-and-citation.md#id-2-yin-yong-yu-gui-shu |
| 43 | **引用与归属** | ../../knowledge-base/retrieval-test-and-citation.md#id-2-yin-yong-yu-gui-shu |
| 44 | 知识检索 | guides/workflow/node/knowledge-retrieval |
| 44 | 基本概念 | ../../../learn-more/extended-reading/retrieval-augment/ |
| 44 | 创建 | ../../knowledge-base/create-knowledge-and-upload-documents/ |
| 44 | 召回模式 | ../../../learn-more/extended-reading/retrieval-augment/retrieval |
| 45 | 问题分类 | guides/workflow/node/question-classifier |
| 46 | 条件分支 | guides/workflow/node/ifelse |
| 47 | 代码执行 | guides/workflow/node/code |
| 47 | 介绍 | code.md#介绍 |
| 47 | 使用场景 | code.md#使用场景 |
| 47 | 本地部署 | code.md#本地部署 |
| 47 | 安全策略 | code.md#安全策略 |
| 47 | 变量引用 | ../key-concept.md#变量 |
| 48 | 模板转换 | guides/workflow/node/template |
| 49 | 文档提取器 | guides/workflow/node/doc-extractor |
| 49 | list-operator.md | list-operator.md "mention" |
| 49 | “开始” | start |
| 49 | 附加功能 | ../additional-features |
| 50 | 列表操作 | guides/workflow/node/list-operator |
| 50 | 列表操作 | list-operator |
| 50 | Features | ../additional-features |
| 51 | 变量聚合 | guides/workflow/node/variable-aggregator |
| 52 | 变量赋值 | guides/workflow/node/variable-assigner |
| 52 | 会话变量 | ../key-concept.md#hui-hua-bian-liang |
| 53 | 迭代 | guides/workflow/node/iteration |
| 53 | 扩展阅读:数组 | ../../../learn-more/extended-reading/what-is-array-variable |
| 53 | 扩展阅读:如何将数组转换为文本 | iteration.md#ru-he-jiang-shu-zu-zhuan-huan-wei-wen-ben |
| 53 | **什么是数组变量?** | ../../../learn-more/extended-reading/what-is-array-variable |
| 53 | 代码节点 | code |
| 53 | 参数提取 | parameter-extractor |
| 53 | 知识库检索 | knowledge-retrieval |
| 53 | 迭代 | iteration |
| 53 | 工具 | tools |
| 53 | HTTP 请求 | http-request |
| 54 | 参数提取 | guides/workflow/node/parameter-extractor |
| 54 | 迭代 | iteration.md#id-1-ding-yi |
| 54 | 结构化参数的转换 | iteration.md#id-2-chang-jing |
| 54 | 迭代节点 | iteration |
| 54 | **HTTP 请求** | http-request |
| 55 | HTTP 请求 | guides/workflow/node/http-request |
| 56 | Agent | guides/workflow/node/agent |
| 57 | 工具 | guides/workflow/node/tools |
| 58 | 结束 | guides/workflow/node/end |
| 58 | 长故事生成工作流 | iteration.md#shi-li-2-chang-wen-zhang-die-dai-sheng-cheng-qi-ling-yi-zhong-bian-pai-fang-shi |
| 59 | 直接回复 | guides/workflow/node/answer |
| 60 | 循环 | guides/workflow/node/loop |
| 61 | 快捷键 | guides/workflow/shortcut-key |
| 62 | 编排节点 | guides/workflow/orchestrate-node |
| 63 | 文件上传 | guides/workflow/file-upload |
| 63 | ChatFlow | key-concept.md#chatflow-he-workflow |
| 63 | WorkFlow | key-concept.md#chatflow-he-workflow |
| 63 | 变量 | variables |
| 63 | "开始节点" | node/start |
| 63 | "附加功能" | additional-features |
| 63 | "开始节点" | node/start |
| 63 | **文档提取器** | node/doc-extractor |
| 63 | 外部工具 | ../tools/advanced-tool-integration |
| 63 | 文档提取器 | node/doc-extractor |
| 63 | “开始” | node/start |
| 63 | **“文档提取器”** | node/doc-extractor |
| 63 | 列表操作 | node/list-operator |
| 63 | 动手实验室 - 使用文件上传搭建文章理解助手 | ../../workshop/intermediate/article-reader |
| 63 | 文档提取器 | node/doc-extractor |
| 63 | 文档提取器 | node/doc-extractor |
| 63 | 列表操作 | node/list-operator |
| 63 | 变量 | variables |
| 64 | 异常处理 | guides/workflow/error-handling/README |
| 64 | LLM | ../node/llm |
| 64 | HTTP | ../node/http-request |
| 64 | 代码 | ../node/code |
| 64 | 工具 | ../node/tools |
| 64 | 预定义异常处理逻辑 | predefined-nodes-failure-logic |
| 64 | LLM | ../node/llm |
| 64 | HTTP | ../node/http-request |
| 64 | 代码 | ../node/code |
| 64 | 工具 | ../node/tools |
| 65 | 预定义异常处理逻辑 | guides/workflow/error-handling/predefined-nodes-failure-logic |
| 66 | 错误类型 | guides/workflow/error-handling/error-type |
| 67 | 附加功能 | guides/workflow/additional-features |
| 67 | 模型供应商 | ../../getting-started/readme/model-providers |
| 67 | “知识检索” | node/knowledge-retrieval |
| 67 | 敏感内容审查 | ../application-orchestrate/app-toolkits/moderation-tool |
| 67 | 《文件上传:在开始节点添加变量》 | file-upload.md#fang-fa-er-zai-tian-jia-wen-jian-bian-liang |
| 67 | 外部数据工具 | ../extension/api-based-extension/external-data-tool |
| 68 | 预览与调试 | guides/workflow/debug-and-preview/README |
| 69 | 预览与运行 | guides/workflow/debug-and-preview/yu-lan-yu-yun-hang |
| 70 | 单步调试 | guides/workflow/debug-and-preview/step-run |
| 71 | 对话/运行日志 | guides/workflow/debug-and-preview/log |
| 72 | 检查清单 | guides/workflow/debug-and-preview/checklist |
| 73 | 运行历史 | guides/workflow/debug-and-preview/history |
| 74 | 应用发布 | guides/workflow/publish |
| 75 | 变更公告:图片上传被替换为文件上传 | guides/workflow/bulletin |
| 75 | 文件上传 | file-upload |
| 75 | 附加功能 | additional-features |
| 75 | 附加功能 | additional-features |
| 75 | 开始 | node/start |
| 75 | 附加功能 | additional-features |
| 75 | 开始 | node/start |
| 76 | 知识库 | guides/knowledge-base/README |
| 76 | RAG 管线 | ../../learn-more/extended-reading/retrieval-augment/ |
| 76 | 连接外部知识库 | connect-external-knowledge-base |
| 76 | 连接外部知识库 | connect-external-knowledge-base |
| 77 | 创建知识库 | guides/knowledge-base/create-knowledge-and-upload-documents/README |
| 77 | import-content-data | import-content-data/ |
| 77 | chunking-and-cleaning-text.md | chunking-and-cleaning-text |
| 77 | setting-indexing-methods.md | setting-indexing-methods |
| 77 | 在应用内集成知识库 | ../integrate-knowledge-within-application |
| 77 | 知识库管理与文档维护 | ../knowledge-and-documents-maintenance/ |
| 77 | setting-indexing-methods.md | setting-indexing-methods |
| 78 | 1. 导入文本数据 | guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/README |
| 78 | sync-from-notion.md | sync-from-notion |
| 78 | sync-from-website.md | sync-from-website |
| 79 | 1.1 从 Notion 导入数据 | guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion |
| 80 | 1.2 从网页导入数据 | guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website |
| 81 | 2. 指定分段模式 | guides/knowledge-base/create-knowledge-and-upload-documents/chunking-and-cleaning-text |
| 81 | ETL | chunking-and-cleaning-text.md#etl |
| 81 | 设定索引方法 | setting-indexing-methods |
| 81 | “高质量索引” | chunking-and-cleaning-text.md#gao-zhi-liang-suo-yin |
| 82 | 3. 设定索引方法与检索设置 | guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods |
| 82 | 检索设置 | setting-indexing-methods.md#retrieval_settings |
| 82 | **社区版** | ../../../getting-started/install-self-hosted/ |
| 82 | **经济型索引方法** | setting-indexing-methods.md#jing-ji |
| 82 | 下文 | setting-indexing-methods.md#dao-pai-suo-yin |
| 82 | retrieval-test-and-citation.md | ../retrieval-test-and-citation |
| 83 | 管理知识库 | guides/knowledge-base/knowledge-and-documents-maintenance/README |
| 83 | 索引方法文档 | ../create-knowledge-and-upload-documents/setting-indexing-methods |
| 83 | 检索设置文档 | ../create-knowledge-and-upload-documents/setting-indexing-methods |
| 83 | maintain-knowledge-documents.md | maintain-knowledge-documents |
| 83 | maintain-dataset-via-api.md | maintain-dataset-via-api |
| 84 | 维护知识库内文档 | guides/knowledge-base/knowledge-and-documents-maintenance/maintain-knowledge-documents |
| 84 | 文本分段模式 | ../create-knowledge-and-upload-documents/chunking-and-cleaning-text |
| 84 | 通用模式 | ../create-knowledge-and-upload-documents/#tong-yong |
| 84 | 父子模式 | ../create-knowledge-and-upload-documents/#fu-zi-fen-duan |
| 85 | 通过 API 维护知识库 | guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api |
| 86 | 元数据 | guides/knowledge-base/metadata |
| 87 | 在应用内集成知识库 | guides/knowledge-base/integrate-knowledge-within-application |
| 87 | 所有应用类型 | ../application-orchestrate/#application_type |
| 88 | 召回测试/引用归属 | guides/knowledge-base/retrieval-test-and-citation |
| 88 | 检索增强生成RAG | ../../learn-more/extended-reading/retrieval-augment/ |
| 89 | 知识库请求频率限制 | guides/knowledge-base/knowledge-request-rate-limit |
| 90 | 连接外部知识库 | guides/knowledge-base/connect-external-knowledge-base |
| 90 | 外部知识库 API 规范。 | external-knowledge-api-documentation |
| 90 | how-to-connect-aws-bedrock.md | ../../learn-more/use-cases/how-to-connect-aws-bedrock.md "mention" |
| 91 | 外部知识库 API | guides/knowledge-base/external-knowledge-api-documentation |
| 92 | 工具 | guides/tools/README |
| 93 | 快速接入工具 | guides/tools/quick-tool-integration |
| 94 | 高级接入工具 | guides/tools/advanced-tool-integration |
| 95 | 工具配置 | guides/tools/tool-configuration/README |
| 95 | StableDiffusion | ./stable-diffusion |
| 95 | SearXNG | ./searxng |
| 96 | Google | guides/tools/tool-configuration/google |
| 97 | Bing | guides/tools/tool-configuration/bing |
| 98 | SearchApi | guides/tools/tool-configuration/searchapi |
| 99 | StableDiffusion | guides/tools/tool-configuration/stable-diffusion |
| 100 | Dall-e | guides/tools/tool-configuration/dall-e |
| 101 | Perplexity Search | guides/tools/tool-configuration/perplexity |
| 102 | AlphaVantage 股票分析 | guides/tools/tool-configuration/alphavantage |
| 103 | Youtube | guides/tools/tool-configuration/youtube |
| 104 | SearXNG | guides/tools/tool-configuration/searxng |
| 105 | Serper | guides/tools/tool-configuration/serper |
| 106 | SiliconFlow (支持 Flux 绘图) | guides/tools/tool-configuration/siliconflow |
| 106 | 变量 | ../../workflow/variables |
| 107 | ComfyUI | guides/tools/tool-configuration/comfyui |
| 108 | 发布 | guides/application-publishing/README |
| 108 | launch-your-webapp-quickly | launch-your-webapp-quickly/ |
| 108 | embedding-in-websites.md | embedding-in-websites |
| 108 | developing-with-apis.md | developing-with-apis |
| 108 | based-on-frontend-templates.md | based-on-frontend-templates |
| 109 | 发布为公开 Web 站点 | guides/application-publishing/launch-your-webapp-quickly/README |
| 109 | 前往预览 | text-generator |
| 109 | 前往预览 | conversation-application |
| 109 | 寻求支持 | ../../../community/support |
| 110 | Web 应用的设置 | guides/application-publishing/launch-your-webapp-quickly/web-app-settings |
| 111 | 文本生成型应用 | guides/application-publishing/launch-your-webapp-quickly/text-generator |
| 112 | 对话型应用 | guides/application-publishing/launch-your-webapp-quickly/conversation-application |
| 113 | 嵌入网站 | guides/application-publishing/embedding-in-websites |
| 114 | 基于 APIs 开发 | guides/application-publishing/developing-with-apis |
| 115 | 基于前端组件再开发 | guides/application-publishing/based-on-frontend-templates |
| 116 | 标注 | guides/annotation/README |
| 117 | 日志与标注 | guides/annotation/logs |
| 118 | 标注回复 | guides/annotation/annotation-reply |
| 119 | 监测 | guides/monitoring/README |
| 120 | 集成外部 Ops 工具 | guides/monitoring/integrate-external-ops-tools/README |
| 121 | 集成 LangSmith | guides/monitoring/integrate-external-ops-tools/integrate-langsmith |
| 122 | 集成 Langfuse | guides/monitoring/integrate-external-ops-tools/integrate-langfuse |
| 123 | 集成 Opik | guides/monitoring/integrate-external-ops-tools/integrate-opik |
| 124 | 数据分析 | guides/monitoring/analysis |
| 125 | 扩展 | guides/extension/README |
| 126 | API 扩展 | guides/extension/api-based-extension/README |
| 126 | 外部数据工具 | ../../knowledge-base/external-data-tool.md "mention" |
| 126 | cloudflare-workers.md | cloudflare-workers.md "mention" |
| 127 | 使用 Cloudflare Workers 部署 API Tools | guides/extension/api-based-extension/cloudflare-workers |
| 128 | 敏感内容审查 | guides/extension/api-based-extension/moderation |
| 129 | 代码扩展 | guides/extension/code-based-extension/README |
| 129 | 外部数据工具 | external-data-tool.md "mention" |
| 129 | 敏感内容审核 | moderation.md "mention" |
| 130 | 外部数据工具 | guides/extension/code-based-extension/external-data-tool |
| 130 | api-based-extension | ../api-based-extension/ "mention" |
| 131 | 敏感内容审查 | guides/extension/code-based-extension/moderation |
| 132 | 协同 | guides/workspace/README |
| 132 | 发现 | app |
| 133 | 发现 | guides/workspace/app |
| 134 | 邀请与管理成员 | guides/workspace/invite-and-manage-members |
| 135 | 管理 | guides/management/README |
| 136 | 应用管理 | guides/management/app-management |
| 137 | 团队成员管理 | guides/management/team-members-management |
| 138 | 个人账号管理 | guides/management/personal-account-management |
| 139 | 订阅管理 | guides/management/subscription-management |
| 140 | 版本管理 | guides/management/version-control |
| 144 | 初级 | workshop/basic/README |
| 145 | 如何搭建 AI 图片生成应用 | workshop/basic/build-ai-image-generation-app |
| 146 | AI Agent 实战:搭建个人在线旅游助手 | workshop/basic/travel-assistant |
| 146 | 如何搭建 AI 图片生成应用 | build-ai-image-generation-app |
| 146 | 社区版 - Docker Compose 部署 | ../../getting-started/install-self-hosted/docker-compose |
| 147 | 中级 | workshop/intermediate/README |
| 148 | 使用文件上传搭建文章理解助手 | workshop/intermediate/article-reader |
| 148 | 文件上传 | ../../guides/workflow/file-upload |
| 149 | 使用知识库搭建智能客服机器人 | workshop/intermediate/customer-service-bot |
| 149 | 帮助文档 | ../../guides/workflow/variables.md#xi-tong-bian-liang |
| 149 | 如何连接 AWS Bedrock 知识库? | ../../learn-more/use-cases/how-to-connect-aws-bedrock |
| 150 | ChatFlow 实战:搭建 Twitter 账号分析助手 | workshop/intermediate/twitter-chatflow |
| 154 | 寻求支持 | community/support |
| 155 | 成为贡献者 | community/contribution |
| 156 | 为 Dify 文档做出贡献 | community/docs-contribution |
| 160 | 功能简介 | plugins/introduction |
| 160 | GitHub | publish-plugins/publish-plugin-on-personal-github-repo |
| 160 | 本地文件 | publish-plugins/package-and-publish-plugin-file |
| 160 | 模型服务商 | quick-start/develop-plugins/model-plugin/integrate-the-predefined-model |
| 160 | 自定义模型 | quick-start/develop-plugins/model-plugin/customizable-model |
| 160 | 快速开始: Model 插件 | quick-start/develop-plugins/model-plugin/ |
| 160 | 快速开始Tool 插件 | quick-start/develop-plugins/tool-plugin |
| 160 | Agent 节点 | ../guides/workflow/node/agent |
| 160 | 快速开始: Agent 策略插件 | quick-start/develop-plugins/agent-strategy-plugin |
| 160 | 快速开始Extension 插件 | quick-start/develop-plugins/extension-plugin |
| 160 | 插件开发Bundle 插件 | quick-start/develop-plugins/bundle |
| 160 | install-plugins.md | quick-start/install-plugins |
| 160 | develop-plugins | quick-start/develop-plugins/ |
| 160 | publish-to-dify-marketplace | publish-plugins/publish-to-dify-marketplace/ |
| 160 | publish-plugin-on-personal-github-repo.md | publish-plugins/publish-plugin-on-personal-github-repo |
| 160 | package-plugin-file-and-publish.md | publish-plugins/package-plugin-file-and-publish |
| 161 | 快速开始 | plugins/quick-start/README |
| 161 | install-plugins.md | install-plugins |
| 161 | tool-plugin.md | develop-plugins/tool-plugin |
| 161 | extension-plugin.md | develop-plugins/extension-plugin |
| 161 | model-plugin | develop-plugins/model-plugin/ |
| 161 | bundle.md | develop-plugins/bundle |
| 161 | agent-strategy-plugin.md | develop-plugins/agent-strategy-plugin |
| 161 | schema-definition | ../schema-definition/ |
| 162 | 安装与使用插件 | plugins/quick-start/install-plugins |
| 162 | 发布插件GitHub | ../publish-plugins/publish-plugin-on-personal-github-repo |
| 162 | 打包插件 | ../publish-plugins/package-plugin-file-and-publish |
| 162 | develop-plugins | develop-plugins/ |
| 163 | 插件开发 | plugins/quick-start/develop-plugins/README |
| 163 | initialize-development-tools.md | initialize-development-tools |
| 163 | tool-plugin.md | tool-plugin |
| 163 | model-plugin | model-plugin/ |
| 163 | extension-plugin.md | extension-plugin |
| 163 | 通用结构标准定义 | ../../schema-definition/general-specifications |
| 163 | Manifest 标准定义 | ../../schema-definition/manifest |
| 163 | 工具接入标准定义 | ../../schema-definition/tool |
| 163 | 模型接入简介 | ../../schema-definition/model/ |
| 163 | Endpoint 标准定义 | ../../schema-definition/endpoint |
| 163 | 扩展 Agent 策略 | ../../schema-definition/agent |
| 163 | app.md | ../../schema-definition/reverse-invocation-of-the-dify-service/app.md "mention" |
| 163 | model.md | ../../schema-definition/reverse-invocation-of-the-dify-service/model.md "mention" |
| 163 | node.md | ../../schema-definition/reverse-invocation-of-the-dify-service/node.md "mention" |
| 163 | tool.md | ../../schema-definition/reverse-invocation-of-the-dify-service/tool.md "mention" |
| 163 | 插件持久化存储能力 | ../../schema-definition/persistent-storage |
| 163 | Marketplace 发布指南 | ../../publish-plugins/publish-to-dify-marketplace/ |
| 163 | GitHub 发布指南 | ../../publish-plugins/publish-plugin-on-personal-github-repo |
| 163 | tool-plugin.md | tool-plugin |
| 163 | model-plugin | model-plugin/ |
| 163 | extension-plugin.md | extension-plugin |
| 163 | 扩展 Agent 策略 | ../../schema-definition/agent |
| 163 | 扩展 Agent 策略 | ../../schema-definition/agent |
| 164 | 安装插件开发工具 | plugins/quick-start/develop-plugins/initialize-development-tools |
| 164 | agent-strategy-plugin.md | agent-strategy-plugin |
| 164 | bundle.md | bundle |
| 165 | Tool 插件 | plugins/quick-start/develop-plugins/tool-plugin |
| 165 | 安装插件开发工具 | initialize-development-tools |
| 165 | 接口文档 | ../../schema-definition/ |
| 165 | ProviderConfig | ../../schema-definition/general-specifications.md#providerconfig |
| 165 | 工具接口文档 | ../../schema-definition/tool |
| 165 | publish-plugins | ../../publish-plugins/ |
| 165 | 开发 Extension 插件 | extension-plugin |
| 165 | 开发 Model 插件 | model-plugin/ |
| 165 | Bundle 插件:将多个插件打包 | bundle |
| 165 | Manifest | ../../schema-definition/manifest |
| 165 | Endpoint | ../../schema-definition/endpoint |
| 165 | 反向调用 Dify 能力 | ../../schema-definition/reverse-invocation-of-the-dify-service/ |
| 165 | 工具 | ../../schema-definition/tool |
| 165 | 模型 | ../../schema-definition/model/ |
| 165 | 安装插件开发工具 | initialize-development-tools |
| 165 | 安装插件开发工具 | initialize-development-tools |
| 165 | 接口文档 | ../../schema-definition/ |
| 165 | Bundle 插件:将多个插件打包 | bundle |
| 165 | Manifest | ../../schema-definition/manifest |
| 165 | Endpoint | ../../schema-definition/endpoint |
| 165 | 反向调用 Dify 能力 | ../../schema-definition/reverse-invocation-of-the-dify-service/ |
| 165 | 工具 | ../../schema-definition/tool |
| 165 | 模型 | ../../schema-definition/model/ |
| 165 | 安装插件开发工具 | initialize-development-tools |
| 165 | Manifest | ../../schema-definition/manifest |
| 166 | Model 插件 | plugins/quick-start/develop-plugins/model-plugin/README |
| 166 | 创建模型供应商 | create-model-providers |
| 166 | 预定义 | ../../../../guides/model-configuration/predefined-model |
| 166 | 自定义 | customizable-model |
| 166 | 调试插件 | ../../debug-plugins |
| 167 | 创建模型供应商 | plugins/quick-start/develop-plugins/model-plugin/create-model-providers |
| 167 | 安装插件开发工具 | ../initialize-development-tools |
| 167 | 模型接口文档 | ../../../schema-definition/model/model-schema |
| 167 | 接入预定义模型 | ../../../../guides/model-configuration/predefined-model |
| 167 | 接入自定义模型 | ../../../../guides/model-configuration/customizable-model |
| 167 | 安装插件开发工具 | ../initialize-development-tools |
| 168 | 接入预定义模型 | plugins/quick-start/develop-plugins/model-plugin/integrate-the-predefined-model |
| 168 | 模型供应商 | create-model-providers |
| 168 | AIModelEntity | ../../../schema-definition/model/model-designing-rules.md#aimodelentity |
| 168 | 模型设计规则 | ../../../schema-definition/model/model-designing-rules |
| 168 | AIModelEntity | ../../../schema-definition/model/model-designing-rules.md#aimodelentity |
| 168 | 开发 Extension 类型插件 | ../extension-plugin |
| 168 | Bundle 类型插件:将多个插件打包 | ../bundle |
| 168 | Manifest | ../../../schema-definition/manifest |
| 168 | Endpoint | ../../../schema-definition/endpoint |
| 168 | 反向调用 Dify 能力 | ../../../schema-definition/reverse-invocation-of-the-dify-service/ |
| 168 | 工具 | ../../../schema-definition/tool |
| 168 | 模型 | ../../../schema-definition/model/ |
| 168 | Manifest | ../../../schema-definition/manifest |
| 168 | Endpoint | ../../../schema-definition/endpoint |
| 168 | 反向调用 Dify 能力 | ../../../schema-definition/reverse-invocation-of-the-dify-service/ |
| 168 | 工具 | ../../../schema-definition/tool |
| 168 | 模型 | ../../../schema-definition/model/ |
| 168 | Bundle 类型插件:将多个插件打包 | ../bundle |
| 168 | Manifest | ../../../schema-definition/manifest |
| 168 | Endpoint | ../../../schema-definition/endpoint |
| 168 | 反向调用 Dify 能力 | ../../../schema-definition/reverse-invocation-of-the-dify-service/ |
| 168 | 工具 | ../../../schema-definition/tool |
| 168 | 模型 | ../../../schema-definition/model/ |
| 169 | 接入自定义模型 | plugins/quick-start/develop-plugins/model-plugin/customizable-model |
| 169 | 预定义模型类型 | integrate-the-predefined-model |
| 169 | 接口文档Model | ../../../schema-definition/model/ |
| 169 | debug-plugins.md | ../../debug-plugins |
| 169 | publish-to-dify-marketplace | ../../../publish-plugins/publish-to-dify-marketplace/ |
| 169 | 开发 Extension 插件 | ../extension-plugin |
| 169 | 开发 Tool 插件 | ../tool-plugin |
| 169 | Bundle 插件:将多个插件打包 | ../bundle |
| 169 | 开发 Extension 插件 | ../extension-plugin |
| 170 | Agent 策略插件 | plugins/quick-start/develop-plugins/agent-strategy-plugin |
| 170 | 示例代码 | agent-strategy-plugin.md#diao-yong-gong-ju-1 |
| 170 | 示例代码 | agent-strategy-plugin.md#diao-yong-gong-ju-1 |
| 171 | Extension 插件 | plugins/quick-start/develop-plugins/extension-plugin |
| 171 | Tool 插件Google Search | tool-plugin |
| 171 | Model 插件 | model-plugin/ |
| 171 | 开发 Slack Bot 插件 | ../../best-practice/develop-a-slack-bot-plugin |
| 172 | Bundle 插件包 | plugins/quick-start/develop-plugins/bundle |
| 173 | 插件调试 | plugins/quick-start/debug-plugin |
| 174 | 插件管理 | plugins/manage-plugins |
| 175 | 接口定义 | plugins/schema-definition/README |
| 175 | manifest.md | manifest |
| 175 | endpoint.md | endpoint |
| 175 | model.md | reverse-invocation-of-the-dify-service/model |
| 175 | general-specifications.md | general-specifications |
| 175 | persistent-storage.md | persistent-storage |
| 175 | reverse-invocation-of-the-dify-service | reverse-invocation-of-the-dify-service/ |
| 176 | Manifest | plugins/schema-definition/manifest |
| 176 | 工具 | tool |
| 176 | 模型 | model/ |
| 176 | Endpoints | endpoint |
| 176 | 插件隐私政策准则 | ../publish-plugins/publish-to-dify-marketplace/plugin-privacy-protection-guidelines |
| 177 | Endpoint | plugins/schema-definition/endpoint |
| 177 | 彩虹猫 | ../quick-start/develop-plugins/extension-plugin |
| 177 | ProviderConfig | general-specifications.md#providerconfig |
| 178 | Tool | plugins/schema-definition/tool |
| 178 | 快速开始开发插件:工具 | ../quick-start/develop-plugins/tool-plugin |
| 179 | Agent | plugins/schema-definition/agent |
| 179 | Manifest | /zh_CN/plugins/schema-definition/manifest |
| 179 | `Tool` 标准格式 | tool |
| 180 | Model | plugins/schema-definition/model/README |
| 180 | model-designing-rules.md | model-designing-rules |
| 180 | model-schema.md | model-schema |
| 181 | 模型设计规则 | plugins/schema-definition/model/model-designing-rules |
| 181 | Provider | model-designing-rules.md#provider |
| 181 | AIModelEntity | model-designing-rules.md#aimodelentity |
| 181 | [ModelType | model-designing-rules.md#modeltype |
| 181 | [ConfigurateMethod | model-designing-rules.md#configuratemethod |
| 181 | [ProviderCredentialSchema | model-designing-rules.md#providercredentialschema |
| 181 | [ModelCredentialSchema | model-designing-rules.md#modelcredentialschema |
| 181 | [ParameterRule | model-designing-rules.md#parameterrule |
| 181 | [PriceConfig | model-designing-rules.md#priceconfig |
| 181 | [CredentialFormSchema | model-designing-rules.md#credentialformschema |
| 181 | [CredentialFormSchema | model-designing-rules.md#credentialformschema |
| 181 | [FormOption | model-designing-rules.md#formoption |
| 181 | [FormShowOnObject | model-designing-rules.md#formshowonobject |
| 181 | [FormShowOnObject | model-designing-rules.md#formshowonobject |
| 182 | 模型接口 | plugins/schema-definition/model/model-schema |
| 182 | [PromptMessage | model-schema.md#promptmessage |
| 182 | UserPromptMessage | model-schema.md#userpromptmessage |
| 182 | SystemPromptMessage | model-schema.md#systempromptmessage |
| 182 | UserPromptMessage | model-schema.md#userpromptmessage |
| 182 | AssistantPromptMessage | model-schema.md#assistantpromptmessage |
| 182 | ToolPromptMessage | model-schema.md#toolpromptmessage |
| 182 | [PromptMessageTool | model-schema.md#promptmessagecontent |
| 182 | [LLMResultChunk | model-schema.md#llmresultchunk |
| 182 | LLMResult | model-schema.md#llmresult |
| 182 | [LLMResultChunk | model-schema.md#llmresultchunk |
| 182 | LLMResult | model-schema.md#llmresult |
| 182 | TextEmbeddingResult | model-schema.md#textembeddingresult |
| 182 | RerankResult | model-schema.md#rerankresult |
| 183 | 通用规范定义 | plugins/schema-definition/general-specifications |
| 183 | I18nObject | general-specifications.md#i18nobject |
| 183 | provider\_config\_type | general-specifications.md#providerconfigtype-string |
| 183 | provider\_config\_scope | general-specifications.md#providerconfigscope-string |
| 183 | [provider\_config\_option | general-specifications.md#providerconfigoption-object |
| 184 | 持久化存储 | plugins/schema-definition/persistent-storage |
| 185 | 反向调用 Dify 服务 | plugins/schema-definition/reverse-invocation-of-the-dify-service/README |
| 185 | App | app |
| 185 | Model | model |
| 185 | Tool | tool |
| 185 | Node | node |
| 186 | App | plugins/schema-definition/reverse-invocation-of-the-dify-service/app |
| 187 | Model | plugins/schema-definition/reverse-invocation-of-the-dify-service/model |
| 187 | 通用规范定义 | ../general-specifications |
| 188 | Tool | plugins/schema-definition/reverse-invocation-of-the-dify-service/tool |
| 188 | 此文档 | tool.md#diao-yong-workflow-as-tool |
| 189 | Node | plugins/schema-definition/reverse-invocation-of-the-dify-service/node |
| 189 | 文档 | ../general-specifications.md#noderesponse |
| 190 | 最佳实践 | plugins/best-practice/README |
| 190 | develop-a-slack-bot-plugin.md | develop-a-slack-bot-plugin |
| 191 | 开发 Slack Bot 插件 | plugins/best-practice/develop-a-slack-bot-plugin |
| 191 | 快速开始:开发 Extension 插件 | ../extension-plugin |
| 191 | 反向调用App | ../../../schema-definition/reverse-invocation-of-the-dify-service/app |
| 191 | 开发 Model 插件 | ../model-plugin/ |
| 192 | 发布插件 | plugins/publish-plugins/README |
| 192 | publish-to-dify-marketplace | publish-to-dify-marketplace/ |
| 192 | publish-plugin-on-personal-github-repo.md | publish-plugin-on-personal-github-repo |
| 192 | package-plugin-file-and-publish.md | package-plugin-file-and-publish |
| 193 | 发布至 Dify Marketplace | plugins/publish-plugins/publish-to-dify-marketplace/README |
| 193 | 插件开发者准则 | plugin-developer-guidelines |
| 193 | 插件隐私政策准则 | plugin-privacy-protection-guidelines |
| 193 | Manifest 文件 | ../../schema-definition/manifest |
| 193 | 插件开发者准则 | plugin-developer-guidelines |
| 193 | Manifest 文件 | ../../schema-definition/manifest |
| 193 | 插件开发说明 | ../../quick-start/develop-plugins/ |
| 193 | 插件隐私政策准则 | plugin-privacy-protection-guidelines |
| 194 | 插件开发者准则 | plugins/publish-plugins/publish-to-dify-marketplace/plugin-developer-guidelines |
| 195 | 插件隐私政策准则 | plugins/publish-plugins/publish-to-dify-marketplace/plugin-privacy-protection-guidelines |
| 196 | 发布至个人 GitHub 仓库 | plugins/publish-plugins/publish-plugin-on-personal-github-repo |
| 196 | 打包插件 | broken-reference |
| 197 | 本地发布与分享 | plugins/publish-plugins/package-plugin-file-and-publish |
| 197 | 安装插件开发工具 | ../quick-start/develop-plugins/initialize-development-tools |
| 197 | 远程连接测试 | ../quick-start/develop-plugins/extension-plugin.md#tiao-shi-cha-jian |
| 198 | 常见问题 | plugins/faq |
| 202 | 后端 | development/backend/README |
| 203 | DifySandbox | development/backend/sandbox/README |
| 203 | 贡献指南 | contribution |
| 204 | 贡献指南 | development/backend/sandbox/contribution |
| 205 | 模型接入 | development/models-integration/README |
| 206 | 接入 Hugging Face 上的开源模型 | development/models-integration/hugging-face |
| 207 | 接入 Replicate 上的开源模型 | development/models-integration/replicate |
| 208 | 接入 Xinference 部署的本地模型 | development/models-integration/xinference |
| 209 | 接入 OpenLLM 部署的本地模型 | development/models-integration/openllm |
| 210 | 接入 LocalAI 部署的本地模型 | development/models-integration/localai |
| 211 | 接入 Ollama 部署的本地模型 | development/models-integration/ollama |
| 212 | 接入 LiteLLM 代理的模型 | development/models-integration/litellm |
| 213 | 接入 GPUStack 进行本地模型部署 | development/models-integration/gpustack |
| 214 | 接入 AWS Bedrock 上的模型DeepSeek | development/models-integration/aws-bedrock-deepseek |
| 215 | 迁移 | development/migration/README |
| 216 | 将社区版迁移至 v1.0.0 | development/migration/migrate-to-v1 |
| 220 | 应用案例 | learn-more/use-cases/README |
| 221 | DeepSeek 与 Dify 集成指南:打造具备多轮思考的 AI 应用 | learn-more/use-cases/integrate-deepseek-to-build-an-ai-app |
| 221 | **本地私有化部署 DeepSeek + Dify** | broken-reference |
| 221 | 本地部署指南 | broken-reference |
| 221 | 本地部署 DeepSeek + Dify构建你的专属私有 AI 助手 | broken-reference |
| 222 | 本地私有化部署 DeepSeek + Dify构建你的专属私人 AI 助手 | learn-more/use-cases/private-ai-ollama-deepseek-dify |
| 223 | 如何训练出专属于“你”的问答机器人? | learn-more/use-cases/train-a-qa-chatbot-that-belongs-to-you |
| 224 | 教你十几分钟不用代码创建 Midjourney 提示词机器人 | learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code |
| 225 | 构建一个 Notion AI 助手 | learn-more/use-cases/build-an-notion-ai-assistant |
| 226 | 如何在几分钟内创建一个带有业务数据的官网 AI 智能客服 | learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes |
| 227 | 使用全套开源工具构建 LLM 应用实战:在 Dify 调用 Baichuan 开源模型能力 | learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools |
| 228 | 手把手教你把 Dify 接入微信生态 | learn-more/use-cases/dify-on-wechat |
| 228 | dify文档仓库 | ../../guides/workflow/ |
| 229 | 使用 Dify 和 Twilio 构建 WhatsApp 机器人 | learn-more/use-cases/dify-on-whatsapp |
| 229 | 手把手教你把 Dify 接入微信生态 | dify-on-wechat |
| 230 | 将 Dify 应用与钉钉机器人集成 | learn-more/use-cases/dify-on-dingtalk |
| 231 | 使用 Dify 和 Azure Bot Framework 构建 Microsoft Teams 机器人 | learn-more/use-cases/dify-on-teams |
| 232 | 如何让 LLM 应用提供循序渐进的聊天体验? | learn-more/use-cases/how-to-make-llm-app-provide-a-progressive-chat-experience |
| 233 | 如何将 Dify Chatbot 集成至 Wix 网站? | learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website |
| 234 | 如何连接 AWS Bedrock 知识库? | learn-more/use-cases/how-to-connect-aws-bedrock |
| 234 | API 定义 | ../../guides/knowledge-base/external-knowledge-api-documentation |
| 234 | 后续步骤 | how-to-connect-aws-bedrock.md#id-5.-lian-jie-wai-bu-zhi-shi-ku |
| 234 | 第二步 | how-to-connect-aws-bedrock.md#id-2.-gou-jian-hou-duan-api-fu-wu |
| 234 | 第二步 | how-to-connect-aws-bedrock.md#id-2.-gou-jian-hou-duan-api-fu-wu |
| 234 | 第四步 | how-to-connect-aws-bedrock.md#id-4.-guan-lian-wai-bu-zhi-shi-api |
| 234 | 第三步 | how-to-connect-aws-bedrock.md#id-3.-huo-qu-aws-bedrock-knowledge-base-id |
| 235 | 构建 Dify 应用定时任务助手 | learn-more/use-cases/dify-schedule |
| 236 | 如何在 Dify 内体验大模型“竞技场”?以 DeepSeek R1 VS o1 为例 | learn-more/use-cases/dify-model-arena |
| 236 | “多模型调试” | /zh_CN/guides/application-orchestrate/multiple-llms-debugging |
| 236 | 多模型调试 | /zh_CN/guides/application-orchestrate/multiple-llms-debugging |
| 237 | 在 Dify 云端构建 AI Thesis Slack Bot | learn-more/use-cases/building-an-ai-thesis-slack-bot |
| 238 | 扩展阅读 | learn-more/extended-reading/README |
| 239 | 什么是 LLMOps | learn-more/extended-reading/what-is-llmops |
| 240 | 什么是数组变量? | learn-more/extended-reading/what-is-array-variable |
| 240 | 工作流 - 列表操作 | ../../guides/workflow/node/list-operator |
| 240 | 工作流 - 迭代 | ../../guides/workflow/node/iteration |
| 241 | 检索增强生成RAG | learn-more/extended-reading/retrieval-augment/README |
| 242 | 混合检索 | learn-more/extended-reading/retrieval-augment/hybrid-search |
| 243 | 重排序 | learn-more/extended-reading/retrieval-augment/rerank |
| 244 | 召回模式 | learn-more/extended-reading/retrieval-augment/retrieval |
| 245 | 提示词编排 | learn-more/extended-reading/prompt-engineering |
| 246 | 如何使用 JSON Schema 让 LLM 输出遵循结构化格式的内容? | learn-more/extended-reading/how-to-use-json-schema-in-dify |
| 247 | 常见问题 | learn-more/faq/README |
| 248 | 本地部署 | learn-more/faq/install-faq |
| 248 | 环境变量 | ../../getting-started/install-self-hosted/environments |
| 249 | LLM 配置与使用 | learn-more/faq/llms-use-faq |
| 250 | 插件 | learn-more/faq/plugins |
| 254 | 开源许可证 | policies/open-source |
| 255 | 用户协议 | policies/agreement/README |
| 255 | get-compliance-report.md | get-compliance-report |
| 258 | 获取合规报告 | policies/agreement/get-compliance-report |
### 文件: zh-hans/url-report/link-check-report-error.md
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 4 | 文档标题 | 文档链接 |
| 4 | 无效链接 | 链接路径 |
| 6 | 成为贡献者 | community/contribution |
| 6 | 成为贡献者 | community/contribution |
| 10 | 接入 AWS Bedrock 上的模型DeepSeek | development/models-integration/aws-bedrock-deepseek |
| 10 | 接入 AWS Bedrock 上的模型DeepSeek | development/models-integration/aws-bedrock-deepseek |
| 14 | 接入 Hugging Face 上的开源模型 | development/models-integration/hugging-face |
| 14 | 接入 Hugging Face 上的开源模型 | development/models-integration/hugging-face |
| 18 | 接入 LocalAI 部署的本地模型 | development/models-integration/localai |
| 18 | 接入 LocalAI 部署的本地模型 | development/models-integration/localai |
| 22 | 接入 Xinference 部署的本地模型 | development/models-integration/xinference |
| 22 | 接入 Xinference 部署的本地模型 | development/models-integration/xinference |
| 26 | Dify Premium | getting-started/dify-premium |
| 26 | Dify Premium | getting-started/dify-premium |
| 30 | 环境变量说明 | getting-started/install-self-hosted/environments |
| 30 | 环境变量说明 | getting-started/install-self-hosted/environments |
| 32 | 文档 | https://www.volcengine.com/docs/6349/107356 |
| 34 | 模型供应商列表 | getting-started/readme/model-providers |
| 34 | 模型供应商列表 | getting-started/readme/model-providers |
| 36 | contribution.md | ../../community/contribution.md "mention" |
| 38 | 敏感内容审查 | guides/application-orchestrate/app-toolkits/moderation-tool |
| 38 | 敏感内容审查 | guides/application-orchestrate/app-toolkits/moderation-tool |
| 40 | moderation.md | ../../extension/api-based-extension/moderation.md "mention" |
| 42 | 嵌入网站 | guides/application-publishing/embedding-in-websites |
| 42 | 嵌入网站 | guides/application-publishing/embedding-in-websites |
| 46 | 发布为公开 Web 站点 | guides/application-publishing/launch-your-webapp-quickly/README |
| 46 | 发布为公开 Web 站点 | guides/application-publishing/launch-your-webapp-quickly/README |
| 50 | API 扩展 | guides/extension/api-based-extension/README |
| 50 | API 扩展 | guides/extension/api-based-extension/README |
| 52 | 外部数据工具 | ../../knowledge-base/external-data-tool.md "mention" |
| 52 | cloudflare-workers.md | cloudflare-workers.md "mention" |
| 54 | 代码扩展 | guides/extension/code-based-extension/README |
| 54 | 代码扩展 | guides/extension/code-based-extension/README |
| 56 | 外部数据工具 | external-data-tool.md "mention" |
| 56 | 敏感内容审核 | moderation.md "mention" |
| 58 | 外部数据工具 | guides/extension/code-based-extension/external-data-tool |
| 58 | 外部数据工具 | guides/extension/code-based-extension/external-data-tool |
| 60 | api-based-extension | ../api-based-extension/ "mention" |
| 62 | 连接外部知识库 | guides/knowledge-base/connect-external-knowledge-base |
| 62 | 连接外部知识库 | guides/knowledge-base/connect-external-knowledge-base |
| 64 | how-to-connect-aws-bedrock.md | ../../learn-more/use-cases/how-to-connect-aws-bedrock.md "mention" |
| 66 | 接入大模型 | guides/model-configuration/README |
| 66 | 接入大模型 | guides/model-configuration/README |
| 70 | 自定义模型接入 | guides/model-configuration/customizable-model |
| 70 | 自定义模型接入 | guides/model-configuration/customizable-model |
| 74 | 接口方法 | guides/model-configuration/interfaces |
| 74 | 接口方法 | guides/model-configuration/interfaces |
| 78 | 增加新供应商 | guides/model-configuration/new-provider |
| 78 | 增加新供应商 | guides/model-configuration/new-provider |
| 82 | 预定义模型接入 | guides/model-configuration/predefined-model |
| 82 | 预定义模型接入 | guides/model-configuration/predefined-model |
| 86 | Perplexity Search | guides/tools/tool-configuration/perplexity |
| 86 | Perplexity Search | guides/tools/tool-configuration/perplexity |
| 90 | Youtube | guides/tools/tool-configuration/youtube |
| 90 | Youtube | guides/tools/tool-configuration/youtube |
| 94 | 文档提取器 | guides/workflow/node/doc-extractor |
| 94 | 文档提取器 | guides/workflow/node/doc-extractor |
| 96 | list-operator.md | list-operator.md "mention" |
| 98 | 如何使用 JSON Schema 让 LLM 输出遵循结构化格式的内容? | learn-more/extended-reading/how-to-use-json-schema-in-dify |
| 98 | 如何使用 JSON Schema 让 LLM 输出遵循结构化格式的内容? | learn-more/extended-reading/how-to-use-json-schema-in-dify |
| 102 | LLM 配置与使用 | learn-more/faq/llms-use-faq |
| 102 | LLM 配置与使用 | learn-more/faq/llms-use-faq |
| 106 | 如何在 Dify 内体验大模型“竞技场”?以 DeepSeek R1 VS o1 为例 | learn-more/use-cases/dify-model-arena |
| 106 | 如何在 Dify 内体验大模型“竞技场”?以 DeepSeek R1 VS o1 为例 | learn-more/use-cases/dify-model-arena |
| 108 | “多模型调试” | /zh_CN/guides/application-orchestrate/multiple-llms-debugging |
| 108 | 多模型调试 | /zh_CN/guides/application-orchestrate/multiple-llms-debugging |
| 110 | 使用 Dify 和 Azure Bot Framework 构建 Microsoft Teams 机器人 | learn-more/use-cases/dify-on-teams |
| 110 | 使用 Dify 和 Azure Bot Framework 构建 Microsoft Teams 机器人 | learn-more/use-cases/dify-on-teams |
| 114 | 手把手教你把 Dify 接入微信生态 | learn-more/use-cases/dify-on-wechat |
| 114 | 手把手教你把 Dify 接入微信生态 | learn-more/use-cases/dify-on-wechat |
| 118 | DeepSeek 与 Dify 集成指南:打造具备多轮思考的 AI 应用 | learn-more/use-cases/integrate-deepseek-to-build-an-ai-app |
| 118 | DeepSeek 与 Dify 集成指南:打造具备多轮思考的 AI 应用 | learn-more/use-cases/integrate-deepseek-to-build-an-ai-app |
| 120 | **本地私有化部署 DeepSeek + Dify** | broken-reference |
| 120 | 本地部署指南 | broken-reference |
| 120 | 本地部署 DeepSeek + Dify构建你的专属私有 AI 助手 | broken-reference |
| 122 | 使用全套开源工具构建 LLM 应用实战:在 Dify 调用 Baichuan 开源模型能力 | learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools |
| 122 | 使用全套开源工具构建 LLM 应用实战:在 Dify 调用 Baichuan 开源模型能力 | learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools |
| 126 | 开发 Slack Bot 插件 | plugins/best-practice/develop-a-slack-bot-plugin |
| 126 | 开发 Slack Bot 插件 | plugins/best-practice/develop-a-slack-bot-plugin |
| 128 | 安装插件开发工具 | ../initialize-development-tools |
| 128 | 快速开始:开发 Extension 插件 | ../extension-plugin |
| 128 | 反向调用App | ../../../schema-definition/reverse-invocation-of-the-dify-service/app |
| 128 | 开发 Extension 插件 | ../extension-plugin |
| 128 | 开发 Model 插件 | ../model-plugin/ |
| 128 | Bundle 类型插件:将多个插件打包 | ../bundle |
| 128 | Manifest | ../../../schema-definition/manifest |
| 128 | Endpoint | ../../../schema-definition/endpoint |
| 128 | 反向调用 Dify 能力 | ../../../schema-definition/reverse-invocation-of-the-dify-service/ |
| 128 | 工具 | ../../../schema-definition/tool |
| 128 | 模型 | ../../../schema-definition/model/ |
| 130 | 功能简介 | plugins/introduction |
| 130 | 功能简介 | plugins/introduction |
| 132 | 本地文件 | publish-plugins/package-and-publish-plugin-file |
| 134 | 发布至个人 GitHub 仓库 | plugins/publish-plugins/publish-plugin-on-personal-github-repo |
| 134 | 发布至个人 GitHub 仓库 | plugins/publish-plugins/publish-plugin-on-personal-github-repo |
| 136 | 打包插件 | broken-reference |
| 138 | 插件调试 | plugins/quick-start/debug-plugin |
| 138 | 插件调试 | plugins/quick-start/debug-plugin |
| 142 | 插件开发 | plugins/quick-start/develop-plugins/README |
| 142 | 插件开发 | plugins/quick-start/develop-plugins/README |
| 144 | app.md | ../../schema-definition/reverse-invocation-of-the-dify-service/app.md "mention" |
| 144 | model.md | ../../schema-definition/reverse-invocation-of-the-dify-service/model.md "mention" |
| 144 | node.md | ../../schema-definition/reverse-invocation-of-the-dify-service/node.md "mention" |
| 144 | tool.md | ../../schema-definition/reverse-invocation-of-the-dify-service/tool.md "mention" |
| 146 | Agent 策略插件 | plugins/quick-start/develop-plugins/agent-strategy-plugin |
| 146 | Agent 策略插件 | plugins/quick-start/develop-plugins/agent-strategy-plugin |
| 150 | Model 插件 | plugins/quick-start/develop-plugins/model-plugin/README |
| 150 | Model 插件 | plugins/quick-start/develop-plugins/model-plugin/README |
| 152 | 调试插件 | ../../debug-plugins |
| 154 | 接入自定义模型 | plugins/quick-start/develop-plugins/model-plugin/customizable-model |
| 154 | 接入自定义模型 | plugins/quick-start/develop-plugins/model-plugin/customizable-model |
| 156 | debug-plugins.md | ../../debug-plugins |
| 158 | Tool 插件 | plugins/quick-start/develop-plugins/tool-plugin |
| 158 | Tool 插件 | plugins/quick-start/develop-plugins/tool-plugin |
| 162 | Agent | plugins/schema-definition/agent |
| 162 | Agent | plugins/schema-definition/agent |
| 164 | Manifest | /zh_CN/plugins/schema-definition/manifest |
| 166 | 如何搭建 AI 图片生成应用 | workshop/basic/build-ai-image-generation-app |
| 166 | 如何搭建 AI 图片生成应用 | workshop/basic/build-ai-image-generation-app |
| 170 | ChatFlow 实战:搭建 Twitter 账号分析助手 | workshop/intermediate/twitter-chatflow |
| 170 | ChatFlow 实战:搭建 Twitter 账号分析助手 | workshop/intermediate/twitter-chatflow |
### 文件: zh-hans/plugins/best-practice/develop-a-slack-bot-plugin.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 42 | 安装插件开发工具 | ../initialize-development-tools |
| 64 | 快速开始:开发 Extension 插件 | ../extension-plugin |
| 76 | 反向调用App | ../../../schema-definition/reverse-invocation-of-the-dify-service/app |
| 316 | 开发 Extension 插件 | ../extension-plugin |
| 317 | 开发 Model 插件 | ../model-plugin/ |
| 318 | Bundle 类型插件:将多个插件打包 | ../bundle |
| 322 | Manifest | ../../../schema-definition/manifest |
| 323 | Endpoint | ../../../schema-definition/endpoint |
| 324 | 反向调用 Dify 能力 | ../../../schema-definition/reverse-invocation-of-the-dify-service/ |
| 325 | 工具 | ../../../schema-definition/tool |
| 326 | 模型 | ../../../schema-definition/model/ |
### 文件: zh-hans/learn-more/faq/llms-use-faq.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 105 | 文档 | /zh-hans/getting-started/faq/install-faq#11.-ben-di-bu-shu-ban-ru-he-jie-jue-shu-ju-ji-wen-dang-shang-chuan-de-da-xiao-xian-zhi-he-shu-liang |
| 113 | 此文档编写技巧 | /zh-hans/advanced/datasets |
### 文件: zh-hans/learn-more/extended-reading/what-is-array-variable.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 44 | 工作流 - 列表操作 | ../../guides/workflow/node/list-operator |
| 45 | 工作流 - 迭代 | ../../guides/workflow/node/iteration |
### 文件: zh-hans/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/README.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 6 | conversation-application.md | ../../../../guides/application-orchestrate/conversation-application.md "mention" |
| 149 | logs.md | ../../../../guides/biao-zhu/logs.md "mention" |
### 文件: zh-hans/learn-more/extended-reading/retrieval-augment/rerank.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 54 | 《多路召回》 | /zh-hans/guides/knowledge-base/integrate-knowledge-within-application#duo-lu-zhao-hui-tui-jian |
### 文件: zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 22 | API 定义 | ../../guides/knowledge-base/external-knowledge-api-documentation |
| 121 | 后续步骤 | how-to-connect-aws-bedrock.md#id-5.-lian-jie-wai-bu-zhi-shi-ku |
| 132 | 第二步 | how-to-connect-aws-bedrock.md#id-2.-gou-jian-hou-duan-api-fu-wu |
| 132 | 第二步 | how-to-connect-aws-bedrock.md#id-2.-gou-jian-hou-duan-api-fu-wu |
| 148 | 第四步 | how-to-connect-aws-bedrock.md#id-4.-guan-lian-wai-bu-zhi-shi-api |
| 151 | 第三步 | how-to-connect-aws-bedrock.md#id-3.-huo-qu-aws-bedrock-knowledge-base-id |
### 文件: zh-hans/learn-more/use-cases/dify-model-arena.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 8 | “多模型调试” | /zh_CN/guides/application-orchestrate/multiple-llms-debugging |
| 42 | 多模型调试 | /zh_CN/guides/application-orchestrate/multiple-llms-debugging |
### 文件: zh-hans/learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 210 | 部署文档 | /zh-hans/advanced/model-configuration/xinference |
### 文件: zh-hans/learn-more/use-cases/integrate-deepseek-to-build-an-ai-app.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 22 | **本地私有化部署 DeepSeek + Dify** | broken-reference |
| 32 | 本地部署指南 | broken-reference |
| 90 | 本地部署 DeepSeek + Dify构建你的专属私有 AI 助手 | broken-reference |
### 文件: zh-hans/getting-started/install-self-hosted/local-source-code.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 42 | 常见问题 | /zh-hans/learn-more/faq/install-faq#15-文本转语音遇到这个错误怎么办? |
### 文件: zh-hans/getting-started/install-self-hosted/environments.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 203 | 跨域 / 身份相关指南 | /zh-hans/learn-more/faq/install-faq#3-安装时后无法登录,登录成功,但后续接口均提示-401 |
| 254 | 文档 | https://www.volcengine.com/docs/6349/107356 |
### 文件: zh-hans/getting-started/install-self-hosted/faq.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 8 | 《环境变量说明:邮件相关配置》 | /zh-hans/getting-started/install-self-hosted/environments#you-jian-xiang-guan-pei-zhi |
### 文件: zh-hans/guides/tools/advanced-tool-integration.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 6 | 快速接入 | /zh-hans/user-guide/tools/quick-tool-integration |
### 文件: zh-hans/guides/tools/extensions/code-based/moderation.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 35 | Broken link | broken-reference "mention" |
### 文件: zh-hans/guides/tools/extensions/api-based/external-data-tool.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 6 | API 扩展 | /zh-hans/user-guide/tools/extensions/api-based/api-based-extension |
| 6 | API 扩展 | /zh-hans/user-guide/tools/extensions/api-based/api-based-extension |
### 文件: zh-hans/guides/tools/extensions/api-based/api-based-extension.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 266 | 外部数据工具 | ../../knowledge-base/external-data-tool.md "mention" |
| 272 | 使用 Cloudflare Workers 部署 API Tools | /zh-hans/user-guide/tools/extensions/api-based/cloudflare-workers |
### 文件: zh-hans/guides/tools/community/alphavantage.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 22 | 变量 | /zh-hans/user-guide/build-app/flow-app/variables |
### 文件: zh-hans/guides/tools/dify/dall-e.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 24 | 变量 | /zh-hans/user-guide/build-app/flow-app/variables |
### 文件: zh-hans/guides/tools/dify/stable-diffusion.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 76 | 变量 | /zh-hans/user-guide/build-app/flow-app/variables |
### 文件: zh-hans/guides/management/app-management.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 10 | 更新 Dify | /zh-hans/getting-started/install-self-hosted/docker-compose#更新-dify |
### 文件: zh-hans/guides/model-configuration/readme.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 26 | **Rerank 模型** | /zh-hans/advanced/retrieval-augment/rerank |
### 文件: zh-hans/guides/application-orchestrate/app-toolkits/readme.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 39 | 引用与归属 | /zh-hans/guides/knowledge-base/retrieval-test-and-citation#id-2-yin-yong-yu-gui-shu |
### 文件: zh-hans/guides/application-orchestrate/app-toolkits/moderation-tool.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 24 | moderation.md | ../../extension/api-based-extension/moderation.md "mention" |
### 文件: zh-hans/guides/knowledge-base/readme.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 33 | 连接外部知识库 | ./knowledge-base-creation/connect-external-knowledge-base |
| 33 | 连接外部知识库 | ./knowledge-base-creation/connect-external-knowledge-base |
### 文件: zh-hans/guides/workflow/additional-feature.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 68 | "知识检索" | node/knowledge-retrieval |
| 92 | 文档提取器 | node/doc-extractor |
| 92 | 文档提取器 | node/doc-extractor |
| 117 | 列表操作 | node/list-operator |
| 130 | 外部数据工具 | ../extension/api-based-extension/external-data-tool |
### 文件: zh-hans/guides/workflow/bulletin.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 7 | 附加功能 | additional-features |
| 7 | 附加功能 | additional-features |
| 7 | 附加功能 | additional-features |
| 52 | 开始 | node/start |
| 52 | 开始 | node/start |
### 文件: zh-hans/guides/workflow/file-upload.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 38 | ChatFlow | /zh-hans/guides/workflow/concepts#chatflow-和-workflow |
| 38 | WorkFlow | /zh-hans/guides/workflow/concepts#chatflow-和-workflow |
### 文件: zh-hans/guides/workflow/error-handling/readme.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 31 | LLM | ../node/llm |
| 32 | HTTP | ../node/http-request |
| 33 | 代码 | ../node/code |
| 34 | 工具 | ../node/tools |
### 文件: zh-hans/guides/workflow/error-handling/predefined-nodes-failure-logic.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 7 | LLM | ../node/llm |
| 8 | HTTP | ../node/http-request |
| 9 | 代码 | ../node/code |
| 10 | 工具 | ../node/tools |
### 文件: zh-hans/guides/workflow/nodes/end.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 20 | 长故事生成工作流 | /zh-hans/guides/workflow/nodes/iteration#示例-2长文章迭代生成器另一种编排方式 |
### 文件: zh-hans/guides/workflow/nodes/doc-extractor.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 39 | list-operator.md | list-operator "mention" |
### 文件: zh-hans/guides/workflow/nodes/code.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 22 | 变量引用 | ../concepts#变量 |
### 文件: zh-hans/guides/workflow/nodes/start.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 12 | **系统变量** | /zh-hans/guides/workflow/variables#系统变量 |
### 文件: zh-hans/guides/workflow/nodes/llm.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 41 | 支持 | user-guide/getting-started/readme/model-providers |
| 85 | 提示词专家模式(已下线) | user-guide/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/ |
| 132 | "知识库" | /zh-hans/user-guide/knowledge-base/ |
### 文件: zh-hans/guides/workflow/nodes/variable-assigner.mdx
| 行号 | 链接文本 | 链接 URL |
|------|----------|----------|
| 10 | 会话变量 | ../variables#会话变量 |

View File

@@ -1,4 +1,7 @@
# AIセールスアバターの探求
---
title: AIセールスアバターの探求
description: 著者:[Alec Lee](mailto:alec.lee1005@gmail.com)AXグローバルストラテジスト & フルスタックエクスプローラー。本文に不備や改善点がありましたら、どうぞお気軽にご連絡ください。
---
—— Dify × TEN × Trulience × Azure × Agora × OpenAI 統合実践ガイド ——
@@ -29,20 +32,6 @@ AXAIトランスフォーメーションを個人 × 企業 × 社会の
---
💡 **私は信じています:**
> **AIは人により生まれ、人に育まれ、そして人の尊厳と自由を守るために存在する。**
>
> テクノロジーの進化は、人の価値観と共鳴してこそ、真に一人ひとりの力となる。
---
**著者**Alec LeeAXグローバルストラテジスト & フルスタック・エクスプローラー
  文化やシステムを越え、「一騎当千」と「一人不遺」誰一人も取り残さないのAX新時代へ。
**日付**2025年5月11日
**Eメール**[alec.lee1005@gmail.com](mailto:alec.lee1005@gmail.com)
## 一、「聞く・話す・考える・演じる」AIデジタルアシスタントは、どの6つのプラットフォームから構成されているのか

View File

@@ -1,342 +0,0 @@
#!/usr/bin/env python3
import os
import re
import json
import sys
import datetime
from pathlib import Path
from typing import Dict, List, Set, Tuple, Optional
import logging
# 设置日志
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler("link_validation.log"),
logging.StreamHandler()
]
)
logger = logging.getLogger(__name__)
# ANSI 颜色代码
class Colors:
RESET = '\033[0m'
RED = '\033[91m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
BLUE = '\033[94m'
MAGENTA = '\033[95m'
CYAN = '\033[96m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def load_docs_json(docs_json_path: str) -> dict:
"""加载 docs.json 文件并解析其中的路径信息"""
try:
with open(docs_json_path, 'r', encoding='utf-8') as f:
docs_data = json.load(f)
return docs_data
except Exception as e:
logger.error(f"加载 docs.json 时出错: {e}")
raise
def extract_valid_paths(docs_data: dict) -> Set[str]:
"""从 docs.json 中提取所有有效的文档路径"""
valid_paths = set()
# 递归函数用于处理嵌套结构
def extract_paths_from_object(obj):
if isinstance(obj, dict):
# 检查是否有页面路径
if "pages" in obj:
for page in obj["pages"]:
if isinstance(page, str) and not page.startswith(("http://", "https://")):
valid_paths.add(page)
elif isinstance(page, dict):
extract_paths_from_object(page)
# 处理其他可能的字典键
for key, value in obj.items():
if key != "pages": # 避免重复处理
extract_paths_from_object(value)
elif isinstance(obj, list):
# 处理列表中的每个元素
for item in obj:
extract_paths_from_object(item)
# 开始提取
extract_paths_from_object(docs_data)
return valid_paths
def find_md_files(path: str) -> List[Path]:
"""查找指定路径下的所有 .md 和 .mdx 文件"""
path_obj = Path(path)
if path_obj.is_file() and (path_obj.suffix in ['.md', '.mdx']):
return [path_obj]
md_files = []
for root, _, files in os.walk(path):
for file in files:
if file.endswith(('.md', '.mdx')):
md_files.append(Path(os.path.join(root, file)))
return md_files
def detect_file_language(file_path: Path) -> str:
"""根据文件路径检测语言"""
path_str = str(file_path)
if "/en/" in path_str:
return "en"
elif "/zh-hans/" in path_str:
return "zh-hans"
elif "/ja-jp/" in path_str:
return "ja-jp"
else:
# 默认为英文
return "en"
def check_link_exists(link: str, base_path: str, valid_paths: Set[str]) -> bool:
"""检查链接是否存在"""
# 跳过锚点链接、邮件链接和外部链接
if link.startswith(('#', 'mailto:', 'http://', 'https://')):
return True
# 处理以 / 开头的路径 (绝对路径)
if link.startswith('/'):
# 移除开头的 /
clean_link = link[1:]
# 检查在 valid_paths 中是否存在
if clean_link in valid_paths:
return True
# 移除扩展名后检查
link_without_ext, _ = os.path.splitext(clean_link)
if link_without_ext in valid_paths:
return True
# 检查实际文件是否存在
full_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), clean_link)
if os.path.exists(full_path):
return True
# 尝试添加 .mdx 或 .md 扩展名
if os.path.exists(full_path + '.mdx') or os.path.exists(full_path + '.md'):
return True
return False
# 处理相对路径
base_dir = os.path.dirname(base_path)
target_path = os.path.normpath(os.path.join(base_dir, link))
# 检查文件是否存在
if os.path.exists(target_path):
return True
# 移除扩展名
target_without_ext, ext = os.path.splitext(target_path)
# 尝试添加 .mdx 或 .md 扩展名
if os.path.exists(target_without_ext + '.mdx') or os.path.exists(target_without_ext + '.md'):
return True
# 检查是否是目录
if os.path.isdir(target_without_ext):
# 检查目录中是否有 index.mdx 或 README.mdx
if os.path.exists(os.path.join(target_without_ext, 'index.mdx')) or \
os.path.exists(os.path.join(target_without_ext, 'index.md')) or \
os.path.exists(os.path.join(target_without_ext, 'README.mdx')) or \
os.path.exists(os.path.join(target_without_ext, 'README.md')):
return True
# 如果以上都不匹配,则检查在 valid_paths 中是否有相似路径
rel_path = os.path.relpath(target_path, os.path.dirname(os.path.abspath(__file__)))
rel_path = rel_path.replace('\\', '/') # 统一路径分隔符
if rel_path in valid_paths:
return True
# 移除扩展名再检查
rel_path_without_ext, _ = os.path.splitext(rel_path)
if rel_path_without_ext in valid_paths:
return True
return False
def find_line_number(content: str, link_text: str, link_url: str) -> int:
"""查找链接在文件中的行号"""
lines = content.split('\n')
# 先尝试精确匹配
full_link = f"[{link_text}]({link_url})"
for i, line in enumerate(lines, 1):
if full_link in line:
return i
# 如果精确匹配失败,尝试使用正则表达式进行模糊匹配
# 这可以处理链接包含特殊字符或包含属性的情况
try:
escaped_text = re.escape(link_text)
escaped_url = re.escape(link_url)
pattern = re.compile(f"\\[{escaped_text}\\]\\({escaped_url}")
for i, line in enumerate(lines, 1):
if pattern.search(line):
return i
except Exception:
pass # 如果正则表达式出错,忽略并继续
# 如果以上方法都失败,尝试只匹配 URL
try:
for i, line in enumerate(lines, 1):
if f"]({link_url})" in line or f"]({link_url} " in line:
return i
except Exception:
pass
return 0 # 如果找不到,返回 0
def validate_links_in_file(file_path: Path, valid_paths: Set[str], base_dir: str) -> List[Dict]:
"""验证文件中的链接"""
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
except Exception as e:
logger.error(f"读取文件 {file_path} 时出错: {e}")
return []
# 提取当前文件的相对路径(相对于基础目录)
relative_file_path = os.path.relpath(file_path, base_dir)
# 找出所有 Markdown 链接
link_pattern = re.compile(r'\[([^\]]+)\]\(([^)]+)(\s+"[^"]*")?\)')
matches = link_pattern.findall(content)
invalid_links = []
for match in matches:
link_text, link_url, _ = match
# 跳过锚点链接和邮件链接
if link_url.startswith(('#', 'mailto:')):
continue
# 跳过外部链接
if link_url.startswith(('http://', 'https://')):
continue
# 检查链接是否有效
if not check_link_exists(link_url, str(file_path), valid_paths):
line_number = find_line_number(content, link_text, link_url)
invalid_links.append({
"file": relative_file_path,
"link_text": link_text,
"link_url": link_url,
"line_number": line_number
})
return invalid_links
def generate_report(all_invalid_links: List[Dict], total_files_processed: int, base_dir: str) -> str:
"""生成报告并保存到文件"""
report_path = os.path.join(base_dir, "invalid_links_report.md")
with open(report_path, 'w', encoding='utf-8') as f:
f.write("# 无效链接报告\n\n")
f.write("生成时间: " + datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n\n")
f.write("## 汇总\n\n")
f.write(f"* 处理文件数: {total_files_processed}\n")
f.write(f"* 发现无效链接数: {len(all_invalid_links)}\n\n")
# 按文件分组
files_groups = {}
for link in all_invalid_links:
if link['file'] not in files_groups:
files_groups[link['file']] = []
files_groups[link['file']].append(link)
f.write("## 详细报告\n\n")
for file, links in files_groups.items():
f.write(f"### 文件: {file}\n\n")
f.write("| 行号 | 链接文本 | 链接 URL |\n")
f.write("|------|----------|----------|\n")
for link in sorted(links, key=lambda x: x['line_number']):
# 处理可能包含特殊字符的文本
link_text = link['link_text'].replace('|', '\\|')
link_url = link['link_url'].replace('|', '\\|')
line_num = link['line_number'] if link['line_number'] > 0 else "未知"
f.write(f"| {line_num} | {link_text} | {link_url} |\n")
f.write("\n")
return report_path
def main():
"""主函数"""
base_dir = os.path.dirname(os.path.abspath(__file__))
docs_json_path = os.path.join(base_dir, 'docs.json')
# 显示脚本标题
print(f"\n{Colors.CYAN}{Colors.BOLD}===== Dify 文档链接验证工具 V2 ====={Colors.RESET}\n")
# 加载 docs.json
try:
print(f"{Colors.BLUE}正在加载 docs.json...{Colors.RESET}")
docs_data = load_docs_json(docs_json_path)
valid_paths = extract_valid_paths(docs_data)
print(f"{Colors.GREEN}从 docs.json 中提取了 {Colors.YELLOW}{len(valid_paths)}{Colors.GREEN} 个有效路径{Colors.RESET}")
except Exception as e:
print(f"{Colors.RED}加载 docs.json 时出错: {e}{Colors.RESET}")
sys.exit(1)
# 获取用户输入的路径
path_input = input(f"{Colors.CYAN}请输入要验证的文件或目录路径(相对于当前目录): {Colors.RESET}")
target_path = os.path.join(base_dir, path_input)
if not os.path.exists(target_path):
print(f"{Colors.RED}路径不存在: {target_path}{Colors.RESET}")
sys.exit(1)
# 查找 Markdown 文件
md_files = find_md_files(target_path)
print(f"{Colors.GREEN}找到 {Colors.YELLOW}{len(md_files)}{Colors.GREEN} 个 Markdown 文件{Colors.RESET}")
# 验证每个文件中的链接
all_invalid_links = []
total_files_processed = 0
for file_path in md_files:
total_files_processed += 1
print(f"{Colors.BLUE}正在验证文件 ({total_files_processed}/{len(md_files)}): {Colors.YELLOW}{file_path}{Colors.RESET}")
invalid_links = validate_links_in_file(file_path, valid_paths, base_dir)
if invalid_links:
print(f"{Colors.RED}发现 {len(invalid_links)} 个无效链接{Colors.RESET}")
for link in invalid_links:
line_num = link['line_number'] if link['line_number'] > 0 else "未知行"
print(f" {Colors.YELLOW}{line_num}: {Colors.RED}[{link['link_text']}]({link['link_url']}){Colors.RESET}")
all_invalid_links.extend(invalid_links)
else:
print(f"{Colors.GREEN}所有链接验证通过{Colors.RESET}")
# 显示总结
print(f"\n{Colors.CYAN}{Colors.BOLD}===== 验证完成 ====={Colors.RESET}")
print(f"{Colors.GREEN}共处理了 {Colors.YELLOW}{total_files_processed}{Colors.GREEN} 个文件{Colors.RESET}")
if all_invalid_links:
print(f"{Colors.RED}发现 {Colors.YELLOW}{len(all_invalid_links)}{Colors.RED} 个无效链接{Colors.RESET}")
# 询问是否保存报告
save_report = input(f"{Colors.CYAN}是否保存无效链接报告到文件? (y/n): {Colors.RESET}").lower() == 'y'
if save_report:
report_path = generate_report(all_invalid_links, total_files_processed, base_dir)
print(f"{Colors.GREEN}报告已保存到: {Colors.YELLOW}{report_path}{Colors.RESET}")
else:
print(f"{Colors.GREEN}恭喜!所有链接验证通过{Colors.RESET}")
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print(f"\n{Colors.RED}用户中断,程序退出{Colors.RESET}")
sys.exit(0)

View File

@@ -1,548 +0,0 @@
#!/usr/bin/env python3
import os
import re
import json
import sys
import difflib
import logging
from pathlib import Path
from typing import Dict, List, Set, Tuple, Optional, Any
# 设置日志
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler("link_conversion.log"),
logging.StreamHandler()
]
)
logger = logging.getLogger(__name__)
# ANSI 颜色代码
class Colors:
RESET = '\033[0m'
RED = '\033[91m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
BLUE = '\033[94m'
MAGENTA = '\033[95m'
CYAN = '\033[96m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def load_docs_json(docs_json_path: str) -> dict:
"""加载 docs.json 文件并解析其中的路径信息"""
try:
with open(docs_json_path, 'r', encoding='utf-8') as f:
docs_data = json.load(f)
return docs_data
except Exception as e:
logger.error(f"加载 docs.json 时出错: {e}")
raise
def extract_valid_paths(docs_data: dict) -> Tuple[Set[str], Dict[str, Set[str]]]:
"""从 docs.json 中提取所有有效的文档路径,并创建语言映射"""
valid_paths = set()
# 递归函数用于处理嵌套结构
def extract_paths_from_object(obj: Any) -> None:
if isinstance(obj, dict):
# 检查是否有页面路径
if "pages" in obj:
for page in obj["pages"]:
if isinstance(page, str) and not page.startswith(("http://", "https://")):
valid_paths.add(page)
elif isinstance(page, dict):
extract_paths_from_object(page)
# 处理其他可能的字典键
for key, value in obj.items():
if key != "pages": # 避免重复处理
extract_paths_from_object(value)
elif isinstance(obj, list):
# 处理列表中的每个元素
for item in obj:
extract_paths_from_object(item)
# 开始提取
extract_paths_from_object(docs_data)
# 创建一个语言版本到路径的映射
lang_path_map = {}
for path in valid_paths:
parts = path.split('/')
if len(parts) > 1:
lang = parts[0] # 第一部分通常是语言代码 (en, zh-hans 等)
# 创建无语言前缀的版本
no_lang_path = '/'.join(parts[1:])
# 添加到映射
if no_lang_path not in lang_path_map:
lang_path_map[no_lang_path] = set()
lang_path_map[no_lang_path].add(path)
return valid_paths, lang_path_map
def find_closest_path(target_path: str, valid_paths: Set[str], lang_path_map: Dict[str, Set[str]], current_lang: str = "en") -> Optional[str]:
"""查找最接近的有效路径"""
# 清理路径,移除 .md 和 .mdx 扩展名
target_path_clean = target_path
if target_path.endswith(('.md', '.mdx')):
target_path_clean = target_path[:-3] if target_path.endswith('.md') else target_path[:-4]
# 尝试直接匹配
if target_path_clean in valid_paths:
return target_path_clean
if target_path in valid_paths:
return target_path
# 移除扩展名
target_without_ext, ext = os.path.splitext(target_path_clean)
# 只有在扩展名不是已经处理过的 .md/.mdx 时才进一步处理
if ext and ext not in ['.md', '.mdx']:
target_without_ext = target_path_clean
# 尝试匹配无扩展名版本
if target_without_ext in valid_paths:
return target_without_ext
# 检查是否是 README 或 index 文件 - 尝试匹配到目录
basename = os.path.basename(target_without_ext).lower()
if basename in ["readme", "index"]:
dir_path = os.path.dirname(target_without_ext)
# 直接匹配目录
if dir_path in valid_paths:
return dir_path
# 尝试匹配目录下的 README 文件
for path in valid_paths:
if path.startswith(dir_path + '/') and path.lower().endswith(('/readme', '/index')):
return path
# 检查无语言前缀的匹配
target_parts = target_path.split('/')
if len(target_parts) > 1 and target_parts[0] in ["en", "zh-hans", "ja-jp"]:
# 移除语言前缀
no_lang_target = '/'.join(target_parts[1:])
# 查找是否有匹配的路径
if no_lang_target in lang_path_map:
# 优先返回当前语言的路径
for path in lang_path_map[no_lang_target]:
if path.startswith(f"{current_lang}/"):
return path
# 否则返回第一个匹配
return next(iter(lang_path_map[no_lang_target]))
# 没有前缀的情况下,尝试添加语言前缀后匹配
if not target_path.startswith(("en/", "zh-hans/", "ja-jp/")):
prefixed_path = f"{current_lang}/{target_path}"
if prefixed_path in valid_paths:
return prefixed_path
# 移除扩展名再试
prefixed_without_ext = f"{current_lang}/{target_without_ext}"
if prefixed_without_ext in valid_paths:
return prefixed_without_ext
# 使用相似度算法进行模糊匹配
best_match = None
best_score = 0
# 优先匹配文件名
target_filename = os.path.basename(target_without_ext).lower()
for path in valid_paths:
path_filename = os.path.basename(path).lower()
# 如果文件名匹配,增加相似度分数
filename_match = False
if target_filename == path_filename:
filename_match = True
# 计算整体路径的相似度
path_without_ext, _ = os.path.splitext(path)
score = difflib.SequenceMatcher(None, target_without_ext.lower(), path_without_ext.lower()).ratio()
# 文件名匹配时增加分数
if filename_match:
score += 0.3
# 如果当前语言匹配,增加分数
if path.startswith(f"{current_lang}/"):
score += 0.1
if score > best_score:
best_score = score
best_match = path
# 只有当相似度够高时才返回匹配结果
if best_score > 0.6:
return best_match
return None
def find_md_files(path: str) -> List[Path]:
"""查找指定路径下的所有 .md 和 .mdx 文件"""
path_obj = Path(path)
if path_obj.is_file() and (path_obj.suffix in ['.md', '.mdx']):
return [path_obj]
md_files = []
for root, _, files in os.walk(path):
for file in files:
if file.endswith(('.md', '.mdx')):
md_files.append(Path(os.path.join(root, file)))
return md_files
def detect_file_language(file_path: Path) -> str:
"""根据文件路径检测语言"""
path_str = str(file_path)
if "/en/" in path_str:
return "en"
elif "/zh-hans/" in path_str:
return "zh-hans"
elif "/ja-jp/" in path_str:
return "ja-jp"
else:
# 默认为英文
return "en"
def convert_links_in_file(file_path: Path, valid_paths: Set[str], lang_path_map: Dict[str, Set[str]], base_dir: str) -> Tuple[List[dict], str]:
"""转换文件中的链接"""
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
except Exception as e:
logger.error(f"读取文件 {file_path} 时出错: {e}")
return [], ""
# 检测文件语言
current_lang = detect_file_language(file_path)
# 提取当前文件的相对路径(相对于基础目录)
relative_file_path = os.path.relpath(file_path, base_dir)
file_dir = os.path.dirname(relative_file_path)
# 找出所有 Markdown 链接 - 支持带属性的链接
link_pattern = re.compile(r'\[([^\]]+)\]\(([^)]+)(\s+"[^"]*")?\)')
matches = link_pattern.findall(content)
changes = []
for match in matches:
link_text, link_url, link_attr = match
# 修正link_attr可能为空
link_attr = link_attr or ""
# 跳过锚点链接、邮件链接和图片资源链接
if link_url.startswith(('#', 'mailto:')):
continue
# 跳过图片和其他资源链接
if any(link_url.endswith(ext) for ext in ['.png', '.jpg', '.jpeg', '.gif', '.svg', '.pdf', '.mp4']):
continue
# 跳过资源服务器的链接
if "assets-docs.dify.ai" in link_url:
continue
# 跳过外部链接,但保留 docs.dify.ai 链接进行处理
if link_url.startswith(('http://', 'https://')) and "docs.dify.ai" not in link_url:
continue
# 已经是正确格式的链接(以 /en/ 或 /zh-hans/ 或 /ja-jp/ 开头)可以跳过
if link_url.startswith(('/en/', '/zh-hans/', '/ja-jp/')):
# 可选:验证链接是否有效
clean_url = link_url.lstrip('/')
if clean_url in valid_paths:
continue
matched_path = None
match_type = ""
# 处理 docs.dify.ai 链接 - 只处理指向文档的链接
if "docs.dify.ai" in link_url and not any(link_url.endswith(ext) for ext in ['.png', '.jpg', '.jpeg', '.gif', '.svg', '.pdf', '.mp4']):
match_type = "docs.dify.ai"
# 从 docs.dify.ai 链接中提取路径部分
docs_path = link_url.split("docs.dify.ai/")[-1] if "docs.dify.ai/" in link_url else ""
# 检查是否是图片或资源URL
if any(segment in docs_path for segment in ['assets', 'images', 'assets-docs']):
continue
if docs_path:
# 查找最接近的有效路径
matched_path = find_closest_path(docs_path, valid_paths, lang_path_map, current_lang)
# 处理相对路径链接
elif link_url.startswith(('../', './')) or not link_url.startswith('/'):
match_type = "relative"
# 对路径做一些标准化
if link_url.startswith('./'):
link_url = link_url[2:] # 移除开头的 ./
# 计算目标文件的完整路径
target_path = os.path.normpath(os.path.join(file_dir, link_url))
target_path = target_path.replace('\\', '/') # 统一路径分隔符
# 处理可能的扩展名
target_path_no_ext, ext = os.path.splitext(target_path)
if ext in ['.md', '.mdx']:
target_path = target_path_no_ext
# 特殊处理 README/index 文件
basename = os.path.basename(target_path).lower()
if basename in ["readme", "index", "readme.md", "index.md", "readme.mdx", "index.mdx"]:
dir_path = os.path.dirname(target_path)
# 检查目录是否在有效路径中
dir_match = find_closest_path(dir_path, valid_paths, lang_path_map, current_lang)
if dir_match:
matched_path = dir_match
continue
# 查找最接近的有效路径
matched_path = find_closest_path(target_path, valid_paths, lang_path_map, current_lang)
# 处理带有语言前缀但没有前导斜杠的路径
elif any(link_url.startswith(prefix) for prefix in ["en/", "zh-hans/", "ja-jp/"]):
match_type = "lang-prefixed"
# 添加前导斜杠
matched_path = find_closest_path(link_url, valid_paths, lang_path_map, current_lang)
# 处理其他类型的链接
else:
match_type = "other"
# 尝试将链接作为路径的一部分进行匹配
matched_path = find_closest_path(link_url, valid_paths, lang_path_map, current_lang)
# 如果找到了匹配路径,创建新链接
if matched_path:
# 构造新链接 URL确保有前导斜杠
new_link_url = f"/{matched_path}" if not matched_path.startswith('/') else matched_path
old_link = f"[{link_text}]({link_url}{link_attr})"
new_link = f"[{link_text}]({new_link_url}{link_attr})"
changes.append({
"old_link": old_link,
"new_link": new_link,
"old_url": link_url,
"new_url": new_link_url,
"match_type": match_type,
"match_path": matched_path,
"confidence": "high"
})
else:
# 未找到匹配路径,根据链接类型做通用处理
generic_url = None
if match_type == "docs.dify.ai":
# 对于 docs.dify.ai 链接,使用路径部分
# 但我们现在更谨慎,如果没有匹配到就不对它做任何改变
continue # 由于大部分 docs.dify.ai 链接可能指向资源,如果没有精确匹配,我们不做任何更改
elif match_type == "relative":
# 对于相对路径,标准化并添加语言前缀
target_path = os.path.normpath(os.path.join(file_dir, link_url))
target_path = target_path.replace('\\', '/')
target_without_ext, _ = os.path.splitext(target_path)
if target_without_ext.startswith(f"{current_lang}/"):
generic_url = f"/{target_without_ext}"
else:
generic_url = f"/{current_lang}/{target_without_ext}"
elif match_type == "lang-prefixed":
# 已经有语言前缀,只需添加斜杠
generic_url = f"/{link_url}"
else:
# 其他类型,尝试使用当前语言
link_without_ext, _ = os.path.splitext(link_url)
generic_url = f"/{current_lang}/{link_without_ext}"
if generic_url:
old_link = f"[{link_text}]({link_url}{link_attr})"
new_link = f"[{link_text}]({generic_url}{link_attr})"
changes.append({
"old_link": old_link,
"new_link": new_link,
"old_url": link_url,
"new_url": generic_url,
"match_type": f"{match_type} (generic)",
"match_path": None,
"confidence": "low"
})
return changes, content
def apply_changes(content: str, changes: List[dict]) -> str:
"""应用更改到内容中"""
modified_content = content
for change in changes:
modified_content = modified_content.replace(change["old_link"], change["new_link"])
return modified_content
def main():
"""主函数"""
base_dir = os.path.dirname(os.path.abspath(__file__))
docs_json_path = os.path.join(base_dir, 'docs.json')
# 显示脚本标题
print(f"\n{Colors.CYAN}{Colors.BOLD}===== Dify 文档链接修复工具 ====={Colors.RESET}\n")
# 加载 docs.json
try:
print(f"{Colors.BLUE}正在加载 docs.json...{Colors.RESET}")
docs_data = load_docs_json(docs_json_path)
valid_paths, lang_path_map = extract_valid_paths(docs_data)
print(f"{Colors.GREEN}从 docs.json 中提取了 {Colors.YELLOW}{len(valid_paths)}{Colors.GREEN} 个有效路径{Colors.RESET}")
except Exception as e:
print(f"{Colors.RED}加载 docs.json 时出错: {e}{Colors.RESET}")
sys.exit(1)
# 获取用户输入的路径
path_input = input(f"{Colors.CYAN}请输入要处理的文件或目录路径(相对于当前目录): {Colors.RESET}")
target_path = os.path.join(base_dir, path_input)
if not os.path.exists(target_path):
print(f"{Colors.RED}路径不存在: {target_path}{Colors.RESET}")
sys.exit(1)
# 查找 Markdown 文件
md_files = find_md_files(target_path)
print(f"{Colors.GREEN}找到 {Colors.YELLOW}{len(md_files)}{Colors.GREEN} 个 Markdown 文件{Colors.RESET}")
# 用户选项
auto_apply = input(f"{Colors.CYAN}是否自动应用所有高置信度的更改? (y/n): {Colors.RESET}").lower() == 'y'
review_all = not auto_apply and input(f"{Colors.CYAN}是否审查所有更改? (y/n默认仅审查低置信度更改): {Colors.RESET}").lower() == 'y'
review_individual = not auto_apply and input(f"{Colors.CYAN}是否需要逐个审查每个链接? (y/n): {Colors.RESET}").lower() == 'y'
# 处理每个文件
total_changed = 0
total_files_changed = 0
total_files_processed = 0
for file_path in md_files:
total_files_processed += 1
print(f"\n{Colors.BLUE}{Colors.BOLD}处理文件 ({total_files_processed}/{len(md_files)}): {Colors.RESET}{Colors.YELLOW}{file_path}{Colors.RESET}")
changes, content = convert_links_in_file(file_path, valid_paths, lang_path_map, base_dir)
if not changes:
print(f"{Colors.GREEN}未发现需要修改的链接{Colors.RESET}")
continue
high_confidence_changes = [c for c in changes if c["confidence"] == "high"]
low_confidence_changes = [c for c in changes if c["confidence"] == "low"]
print(f"{Colors.MAGENTA}{Colors.BOLD}发现 {len(changes)} 个链接需要修改 ({len(high_confidence_changes)} 高置信度, {len(low_confidence_changes)} 低置信度){Colors.RESET}")
# 显示更改
apply_changes_to_file = False
# 将要应用的更改收集到一个列表中
changes_to_apply = []
# 处理高置信度更改
if high_confidence_changes:
print(f"\n{Colors.GREEN}{Colors.BOLD}高置信度更改:{Colors.RESET}")
for i, change in enumerate(high_confidence_changes, 1):
print(f"{Colors.YELLOW}{i}. {Colors.RESET}[{change['match_type']}] {change['old_link']} -> {change['new_link']}")
if auto_apply:
# 自动应用所有高置信度更改
changes_to_apply.extend(high_confidence_changes)
elif review_individual:
# 逐个审查每个链接
for i, change in enumerate(high_confidence_changes, 1):
confirm = input(f"\n{Colors.CYAN}应用更改 {i}? (y/n/q-退出): {Colors.RESET}").lower()
if confirm == 'q':
break
if confirm == 'y':
changes_to_apply.append(change)
elif review_all:
# 整体审查高置信度更改
if input(f"\n{Colors.CYAN}应用这些高置信度更改? (y/n): {Colors.RESET}").lower() == 'y':
changes_to_apply.extend(high_confidence_changes)
else:
# 默认应用高置信度更改
changes_to_apply.extend(high_confidence_changes)
# 处理低置信度更改
if low_confidence_changes:
print(f"\n{Colors.RED}{Colors.BOLD}低置信度更改:{Colors.RESET}")
for i, change in enumerate(low_confidence_changes, 1):
print(f"{Colors.YELLOW}{i}. {Colors.RESET}[{change['match_type']}] {change['old_link']} -> {change['new_link']}")
if auto_apply:
# 自动模式下不应用低置信度更改
pass
elif review_individual:
# 逐个审查每个链接
for i, change in enumerate(low_confidence_changes, 1):
confirm = input(f"\n{Colors.CYAN}应用更改 {i}? (y/n/q-退出): {Colors.RESET}").lower()
if confirm == 'q':
break
if confirm == 'y':
changes_to_apply.append(change)
else:
# 整体审查低置信度更改
if input(f"\n{Colors.CYAN}应用这些低置信度更改? (y/n): {Colors.RESET}").lower() == 'y':
changes_to_apply.extend(low_confidence_changes)
# 判断是否需要应用更改
apply_changes_to_file = len(changes_to_apply) > 0
if apply_changes_to_file:
# 应用更改
modified_content = apply_changes(content, changes_to_apply)
# 备份原文件
backup_path = str(file_path) + '.bak'
try:
with open(backup_path, 'w', encoding='utf-8') as f:
f.write(content)
print(f"{Colors.BLUE}已备份原文件到: {backup_path}{Colors.RESET}")
except Exception as e:
print(f"{Colors.RED}备份文件失败: {e}{Colors.RESET}")
if not input(f"{Colors.YELLOW}是否继续修改? (y/n): {Colors.RESET}").lower() == 'y':
print(f"{Colors.YELLOW}跳过此文件{Colors.RESET}")
continue
# 写回文件
try:
with open(file_path, 'w', encoding='utf-8') as f:
f.write(modified_content)
except Exception as e:
print(f"{Colors.RED}写入文件失败: {e}{Colors.RESET}")
# 尝试从备份恢复
try:
with open(backup_path, 'r', encoding='utf-8') as f_bak:
bak_content = f_bak.read()
with open(file_path, 'w', encoding='utf-8') as f:
f.write(bak_content)
print(f"{Colors.GREEN}已从备份恢复文件{Colors.RESET}")
except Exception as restore_err:
print(f"{Colors.RED}恢复文件失败: {restore_err}{Colors.RESET}")
continue
total_changed += len(changes_to_apply)
total_files_changed += 1
print(f"{Colors.GREEN}文件已更新: {file_path}{Colors.RESET}")
print(f"{Colors.GREEN}应用了 {len(changes_to_apply)} 个链接更改{Colors.RESET}")
else:
print(f"{Colors.YELLOW}跳过此文件{Colors.RESET}")
# 显示总结
print(f"\n{Colors.CYAN}{Colors.BOLD}===== 转换完成 ====={Colors.RESET}")
print(f"{Colors.GREEN}共处理了 {Colors.YELLOW}{total_files_processed}{Colors.GREEN} 个文件")
print(f"修改了 {Colors.YELLOW}{total_files_changed}{Colors.GREEN} 个文件,{Colors.YELLOW}{total_changed}{Colors.GREEN} 个链接{Colors.RESET}")
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print(f"\n{Colors.RED}用户中断,程序退出{Colors.RESET}")
sys.exit(0)

View File

@@ -1,127 +0,0 @@
- [customer-service-bot.mdx:155](zh-hans/workshop/intermediate/customer-service-bot.mdx) - 无效链接: ../../guides/workflow/variables.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/workflow/variables.md
- [localai.mdx:20](zh-hans/development/models-integration/localai.mdx) - 无效链接: https://github.com/go-skynet/LocalAI/blob/master/examples/langchain-chroma/README.md -> HTTP 404
- [xinference.mdx:6](zh-hans/development/models-integration/xinference.mdx) - 无效链接: https://github.com/xorbitsai/inference -> Connection Error
- [xinference.mdx:53](zh-hans/development/models-integration/xinference.mdx) - 无效链接: https://github.com/xorbitsai/inference -> Connection Error
- [xinference.mdx:12](zh-hans/development/models-integration/xinference.mdx) - 无效链接: https://github.com/xorbitsai/inference/blob/main/README\_zh\_CN.md#%E5%88%86%E5%B8%83%E5%BC%8F%E9%83%A8%E7%BD%B2 -> Connection Error
- [xinference.mdx:51](zh-hans/development/models-integration/xinference.mdx) - 无效链接: https://github.com/xorbitsai/inference -> Connection Error
- [xinference.mdx:37](zh-hans/development/models-integration/xinference.mdx) - 无效链接: https://inference.readthedocs.io/en/latest/models/builtin/index.html -> Connection Error
- [gpustack.mdx:11](zh-hans/development/models-integration/gpustack.mdx) - 无效链接: https://docs.gpustack.ai -> Connection Error
- [replicate.mdx:19](zh-hans/development/models-integration/replicate.mdx) - 无效链接: https://assets-docs.dify.ai/dify-enterprise-mintlify/zh_CN/development/models-integration/95e2ad371c82ef7ef641192f2bf1a1f8.png -> Connection Error
- [README.mdx:8](zh-hans/plugins/publish-plugins/publish-to-dify-marketplace/README.mdx) - 无效链接: https://github.com/langgenius/dify-plugins -> Connection Error
- [tool-plugin.mdx:168](zh-hans/plugins/quick-start/develop-plugins/tool-plugin.mdx) - 无效链接: ../../schema-definition/general-specifications.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/plugins/schema-definition/general-specifications.md
- [integrate-the-predefined-model.mdx:16](zh-hans/plugins/quick-start/develop-plugins/model-plugin/integrate-the-predefined-model.mdx) - 无效链接: ../../../schema-definition/model/model-designing-rules.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/plugins/schema-definition/model/model-designing-rules.md
- [integrate-the-predefined-model.mdx:188](zh-hans/plugins/quick-start/develop-plugins/model-plugin/integrate-the-predefined-model.mdx) - 无效链接: ../../../schema-definition/model/model-designing-rules.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/plugins/schema-definition/model/model-designing-rules.md
- [develop-a-slack-bot-plugin.mdx:41](zh-hans/plugins/best-practice/develop-a-slack-bot-plugin.mdx) - 无效链接: ../initialize-development-tools -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/plugins/initialize-development-tools
- [develop-a-slack-bot-plugin.mdx:75](zh-hans/plugins/best-practice/develop-a-slack-bot-plugin.mdx) - 无效链接: ../../../schema-definition/reverse-invocation-of-the-dify-service/app -> File not found: /Users/allen/Documents/dify-docs-mintlify/schema-definition/reverse-invocation-of-the-dify-service/app
- [how-to-use-json-schema-in-dify.mdx:224](zh-hans/learn-more/how-to-use-json-schema-in-dify.mdx) - 无效链接: https://platform.openai.com/docs/guides/structured-outputs/supported-schemas -> HTTP 403
- [how-to-use-json-schema-in-dify.mdx:226](zh-hans/learn-more/how-to-use-json-schema-in-dify.mdx) - 无效链接: https://platform.openai.com/docs/guides/structured-outputs/additionalproperties-false-must-always-be-set-in-objects -> HTTP 403
- [plugins.mdx:16](zh-hans/learn-more/faq/plugins.mdx) - 无效链接: /zh_hans/plugins/publish-plugins/signing-plugins-for-third-party-signature-verification.mdx -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/zh_hans/plugins/publish-plugins/signing-plugins-for-third-party-signature-verification.mdx
- [llms-use-faq.mdx:105](zh-hans/learn-more/faq/llms-use-faq.mdx) - 无效链接: getting-started/faq/install-faq -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/getting-started/faq/install-faq
- [llms-use-faq.mdx:113](zh-hans/learn-more/faq/llms-use-faq.mdx) - 无效链接: advanced/datasets -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/advanced/datasets
- [llms-use-faq.mdx:58](zh-hans/learn-more/faq/llms-use-faq.mdx) - 无效链接: https://platform.openai.com/docs/guides/rate-limits -> HTTP 403
- [llms-use-faq.mdx:13](zh-hans/learn-more/faq/llms-use-faq.mdx) - 无效链接: https://platform.openai.com/docs/models/overview -> HTTP 403
- [llms-use-faq.mdx:125](zh-hans/learn-more/faq/llms-use-faq.mdx) - 无效链接: https://platform.openai.com/account/billing/overview -> HTTP 403
- [llms-use-faq.mdx:125](zh-hans/learn-more/faq/llms-use-faq.mdx) - 无效链接: https://openai.com/pricing -> HTTP 403
- [llms-use-faq.mdx:30](zh-hans/learn-more/faq/llms-use-faq.mdx) - 无效链接: https://en.wikipedia.org/wiki/Cosine\_similarity -> HTTP 404
- [how-to-use-json-schema-in-dify.mdx:230](zh-hans/learn-more/extended-reading/how-to-use-json-schema-in-dify.mdx) - 无效链接: https://platform.openai.com/docs/guides/structured-outputs/additionalproperties-false-must-always-be-set-in-objects -> HTTP 403
- [how-to-use-json-schema-in-dify.mdx:13](zh-hans/learn-more/extended-reading/how-to-use-json-schema-in-dify.mdx) - 无效链接: https://platform.openai.com/docs/guides/structured-outputs/introduction -> HTTP 403
- [how-to-use-json-schema-in-dify.mdx:229](zh-hans/learn-more/extended-reading/how-to-use-json-schema-in-dify.mdx) - 无效链接: https://platform.openai.com/docs/guides/structured-outputs/supported-schemas -> HTTP 403
- [how-to-use-json-schema-in-dify.mdx:235](zh-hans/learn-more/extended-reading/how-to-use-json-schema-in-dify.mdx) - 无效链接: https://cookbook.openai.com/examples/structured\_outputs\_intro -> HTTP 404
- [README.mdx:5](zh-hans/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/README.mdx) - 无效链接: ../../../../guides/application-orchestrate/conversation-application.md "mention" -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/application-orchestrate/conversation-application.md "mention"
- [README.mdx:41](zh-hans/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/README.mdx) - 无效链接: prompt-engineering-template.md "mention" -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/prompt-engineering-template.md "mention"
- [README.mdx:148](zh-hans/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/README.mdx) - 无效链接: ../../../../guides/biao-zhu/logs.md "mention" -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/biao-zhu/logs.md "mention"
- [README.mdx:119](zh-hans/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/README.mdx) - 无效链接: prompt-engineering-template.md "mention" -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/prompt-engineering-template.md "mention"
- [dify-on-teams.mdx:19](zh-hans/learn-more/use-cases/dify-on-teams.mdx) - 无效链接: https://azure.microsoft.com/en-us/free -> Timeout
- [how-to-connect-aws-bedrock.mdx:22](zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.mdx) - 无效链接: ../../guides/knowledge-base/external-knowledge-api-documentation -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/knowledge-base/external-knowledge-api-documentation
- [how-to-connect-aws-bedrock.mdx:121](zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.mdx) - 无效链接: how-to-connect-aws-bedrock.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.md
- [how-to-connect-aws-bedrock.mdx:148](zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.mdx) - 无效链接: how-to-connect-aws-bedrock.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.md
- [how-to-connect-aws-bedrock.mdx:132](zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.mdx) - 无效链接: how-to-connect-aws-bedrock.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.md
- [how-to-connect-aws-bedrock.mdx:133](zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.mdx) - 无效链接: how-to-connect-aws-bedrock.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.md
- [how-to-connect-aws-bedrock.mdx:151](zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.mdx) - 无效链接: how-to-connect-aws-bedrock.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock.md
- [dify-on-dingtalk.mdx:161](zh-hans/learn-more/use-cases/dify-on-dingtalk.mdx) - 无效链接: ../../.gitbook/assets/dify-on-dingtalk-demo.gif -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/.gitbook/assets/dify-on-dingtalk-demo.gif
- [dify-model-arena.mdx:42](zh-hans/learn-more/use-cases/dify-model-arena.mdx) - 无效链接: /zh_CN/guides/application-orchestrate/multiple-llms-debugging -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/zh_CN/guides/application-orchestrate/multiple-llms-debugging
- [dify-model-arena.mdx:8](zh-hans/learn-more/use-cases/dify-model-arena.mdx) - 无效链接: /zh_CN/guides/application-orchestrate/multiple-llms-debugging -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/zh_CN/guides/application-orchestrate/multiple-llms-debugging
- [practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.mdx:210](zh-hans/learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.mdx) - 无效链接: advanced/model-configuration/xinference -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/advanced/model-configuration/xinference
- [practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.mdx:246](zh-hans/learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.mdx) - 无效链接: http://localhost:9997 -> Connection Error
- [practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.mdx:181](zh-hans/learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.mdx) - 无效链接: https://www.cnblogs.com/tuilk/p/16287472.html -> HTTP 404
- [integrate-deepseek-to-build-an-ai-app.mdx:32](zh-hans/learn-more/use-cases/integrate-deepseek-to-build-an-ai-app.mdx) - 无效链接: broken-reference -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/use-cases/broken-reference
- [integrate-deepseek-to-build-an-ai-app.mdx:22](zh-hans/learn-more/use-cases/integrate-deepseek-to-build-an-ai-app.mdx) - 无效链接: broken-reference -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/use-cases/broken-reference
- [integrate-deepseek-to-build-an-ai-app.mdx:90](zh-hans/learn-more/use-cases/integrate-deepseek-to-build-an-ai-app.mdx) - 无效链接: broken-reference -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/learn-more/use-cases/broken-reference
- [build-an-notion-ai-assistant.mdx:66](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/PN9F3/train-3.png -> HTTP 403
- [build-an-notion-ai-assistant.mdx:52](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/M8Xtz/connect-with-notion-4.png -> HTTP 403
- [build-an-notion-ai-assistant.mdx:58](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/Nkjuj/train-1.png -> HTTP 403
- [build-an-notion-ai-assistant.mdx:62](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/OYoCv/train-2.png -> HTTP 403
- [build-an-notion-ai-assistant.mdx:76](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/R6DT5/create-app-2.png -> HTTP 403
- [build-an-notion-ai-assistant.mdx:72](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/QWRHo/create-app-1.png -> HTTP 403
- [build-an-notion-ai-assistant.mdx:108](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/xk2Fx/using-api-2.png -> HTTP 403
- [build-an-notion-ai-assistant.mdx:102](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/wp0Cy/using-api-1.png -> HTTP 403
- [build-an-notion-ai-assistant.mdx:114](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/yPXHL/using-api-3.png -> HTTP 403
- [build-an-notion-ai-assistant.mdx:139](zh-hans/learn-more/use-cases/build-an-notion-ai-assistant.mdx) - 无效链接: https://pan.wsyfin.com/f/zpnI4/using-api-4.png -> HTTP 429
- [dify-on-wechat.mdx:394](zh-hans/learn-more/use-cases/dify-on-wechat.mdx) - 无效链接: https://dldir1.qq.com/wework/work\_weixin/WeCom\_4.0.8.6027.exe -> HTTP 404
- [dify-on-whatsapp.mdx:20](zh-hans/learn-more/use-cases/dify-on-whatsapp.mdx) - 无效链接: https://www.twilio.com/try-twilio -> Connection Error
- [environments.mdx:562](zh-hans/getting-started/install-self-hosted/environments.mdx) - 无效链接: https://github.com/langgenius/dify/blob/main/api/core/tools/provider/_position.yaml -> HTTP 404
- [advanced-tool-integration.mdx:5](zh-hans/guides/tools/advanced-tool-integration.mdx) - 无效链接: user-guide/tools/quick-tool-integration -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/tools/quick-tool-integration
- [moderation.mdx:34](zh-hans/guides/tools/extensions/code-based/moderation.mdx) - 无效链接: guides/extension/code-based-extension -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/extension/code-based-extension
- [external-data-tool.mdx:6](zh-hans/guides/tools/extensions/api-based/external-data-tool.mdx) - 无效链接: user-guide/tools/extensions/api-based/api-based-extension -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/tools/extensions/api-based/api-based-extension
- [external-data-tool.mdx:10](zh-hans/guides/tools/extensions/api-based/external-data-tool.mdx) - 无效链接: user-guide/tools/extensions/api-based/api-based-extension -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/tools/extensions/api-based/api-based-extension
- [api-based-extension.mdx:272](zh-hans/guides/tools/extensions/api-based/api-based-extension.mdx) - 无效链接: user-guide/tools/extensions/api-based/cloudflare-workers -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/tools/extensions/api-based/cloudflare-workers
- [searchapi.mdx:28](zh-hans/guides/tools/tool-configuration/searchapi.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tool-searchapi-flow.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tool-searchapi-flow.png
- [searchapi.mdx:18](zh-hans/guides/tools/tool-configuration/searchapi.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tool-searchapi.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tool-searchapi.png
- [dall-e.mdx:18](zh-hans/guides/tools/tool-configuration/dall-e.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-dalle.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-dalle.png
- [dall-e.mdx:24](zh-hans/guides/tools/tool-configuration/dall-e.mdx) - 无效链接: user-guide/build-app/flow-app/variables -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/build-app/flow-app/variables
- [dall-e.mdx:26](zh-hans/guides/tools/tool-configuration/dall-e.mdx) - 无效链接: user-guide/.gitbook/assets/zh-dalle3-node.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-dalle3-node.png
- [dall-e.mdx:32](zh-hans/guides/tools/tool-configuration/dall-e.mdx) - 无效链接: user-guide/.gitbook/assets/zh-agent-dalle3.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-agent-dalle3.png
- [alphavantage.mdx:22](zh-hans/guides/tools/tool-configuration/alphavantage.mdx) - 无效链接: user-guide/build-app/flow-app/variables -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/build-app/flow-app/variables
- [stable-diffusion.mdx:76](zh-hans/guides/tools/tool-configuration/stable-diffusion.mdx) - 无效链接: user-guide/build-app/flow-app/variables -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/build-app/flow-app/variables
- [stable-diffusion.mdx:43](zh-hans/guides/tools/tool-configuration/stable-diffusion.mdx) - 无效链接: https://huggingface.co/JamesFlare/pastel-mix -> HTTP 401
- [comfyui.mdx:13](zh-hans/guides/tools/tool-configuration/comfyui.mdx) - 无效链接: img/0503c5838f163b54884ca58240281f3f.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/img/0503c5838f163b54884ca58240281f3f.png
- [serper.mdx:18](zh-hans/guides/tools/tool-configuration/serper.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tool-serper.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tool-serper.png
- [bing.mdx:18](zh-hans/guides/tools/tool-configuration/bing.mdx) - 无效链接: img/5e8f18c29c50f14c5c83d7b45c546725.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/img/5e8f18c29c50f14c5c83d7b45c546725.png
- [bing.mdx:12](zh-hans/guides/tools/tool-configuration/bing.mdx) - 无效链接: https://platform.openai.com/ -> HTTP 403
- [google.mdx:18](zh-hans/guides/tools/tool-configuration/google.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-google.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-google.png
- [perplexity.mdx:28](zh-hans/guides/tools/tool-configuration/perplexity.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-chatflow-perplexity.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-chatflow-perplexity.png
- [perplexity.mdx:34](zh-hans/guides/tools/tool-configuration/perplexity.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-agent-perplexity.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-agent-perplexity.png
- [perplexity.mdx:18](zh-hans/guides/tools/tool-configuration/perplexity.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-perplexity.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-perplexity.png
- [perplexity.mdx:12](zh-hans/guides/tools/tool-configuration/perplexity.mdx) - 无效链接: https://www.perplexity.ai/settings/api -> HTTP 403
- [searchapi.mdx:18](zh-hans/guides/tools/community/searchapi.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tool-searchapi.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tool-searchapi.png
- [searchapi.mdx:28](zh-hans/guides/tools/community/searchapi.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tool-searchapi-flow.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tool-searchapi-flow.png
- [alphavantage.mdx:22](zh-hans/guides/tools/community/alphavantage.mdx) - 无效链接: user-guide/build-app/flow-app/variables -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/build-app/flow-app/variables
- [comfyui.mdx:13](zh-hans/guides/tools/community/comfyui.mdx) - 无效链接: img/0503c5838f163b54884ca58240281f3f.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/img/0503c5838f163b54884ca58240281f3f.png
- [serper.mdx:18](zh-hans/guides/tools/community/serper.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tool-serper.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tool-serper.png
- [dall-e.mdx:18](zh-hans/guides/tools/dify/dall-e.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-dalle.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-dalle.png
- [dall-e.mdx:32](zh-hans/guides/tools/dify/dall-e.mdx) - 无效链接: user-guide/.gitbook/assets/zh-agent-dalle3.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-agent-dalle3.png
- [dall-e.mdx:26](zh-hans/guides/tools/dify/dall-e.mdx) - 无效链接: user-guide/.gitbook/assets/zh-dalle3-node.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-dalle3-node.png
- [dall-e.mdx:24](zh-hans/guides/tools/dify/dall-e.mdx) - 无效链接: user-guide/build-app/flow-app/variables -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/build-app/flow-app/variables
- [dall-e.mdx:12](zh-hans/guides/tools/dify/dall-e.mdx) - 无效链接: https://platform.openai.com/ -> HTTP 403
- [stable-diffusion.mdx:76](zh-hans/guides/tools/dify/stable-diffusion.mdx) - 无效链接: user-guide/build-app/flow-app/variables -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/build-app/flow-app/variables
- [stable-diffusion.mdx:43](zh-hans/guides/tools/dify/stable-diffusion.mdx) - 无效链接: https://huggingface.co/JamesFlare/pastel-mix -> HTTP 401
- [bing.mdx:18](zh-hans/guides/tools/dify/bing.mdx) - 无效链接: img/5e8f18c29c50f14c5c83d7b45c546725.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/img/5e8f18c29c50f14c5c83d7b45c546725.png
- [google.mdx:18](zh-hans/guides/tools/dify/google.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-google.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-google.png
- [perplexity.mdx:18](zh-hans/guides/tools/dify/perplexity.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-perplexity.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-perplexity.png
- [perplexity.mdx:34](zh-hans/guides/tools/dify/perplexity.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-agent-perplexity.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-agent-perplexity.png
- [perplexity.mdx:28](zh-hans/guides/tools/dify/perplexity.mdx) - 无效链接: user-guide/.gitbook/assets/zh-tools-chatflow-perplexity.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/zh-tools-chatflow-perplexity.png
- [perplexity.mdx:12](zh-hans/guides/tools/dify/perplexity.mdx) - 无效链接: https://www.perplexity.ai/settings/api -> HTTP 403
- [customizable-model.mdx:306](zh-hans/guides/model-configuration/customizable-model.mdx) - 无效链接: https://github.com/langgenius/dify/blob/main/api/core/model\_runtime/docs/zh\_Hans/interfaces -> HTTP 404
- [customizable-model.mdx:306](zh-hans/guides/model-configuration/customizable-model.mdx) - 无效链接: https://github.com/langgenius/dify-runtime/blob/main/lib/model_providers/anthropic/llm/llm.py -> HTTP 404
- [predefined-model.mdx:175](zh-hans/guides/model-configuration/predefined-model.mdx) - 无效链接: https://github.com/langgenius/dify/blob/main/api/core/model\_runtime/docs/zh\_Hans/interfaces -> HTTP 404
- [predefined-model.mdx:175](zh-hans/guides/model-configuration/predefined-model.mdx) - 无效链接: https://github.com/langgenius/dify-runtime/blob/main/lib/model_providers/anthropic/llm/llm.py -> HTTP 404
- [new-provider.mdx:146](zh-hans/guides/model-configuration/new-provider.mdx) - 无效链接: https://github.com/langgenius/dify/blob/main/api/core/model\_runtime/model\_providers/anthropic/anthropic.py -> HTTP 404
- [new-provider.mdx:88](zh-hans/guides/model-configuration/new-provider.mdx) - 无效链接: https://github.com/langgenius/dify/blob/main/api/core/model\_runtime/docs/zh\_Hans/schema -> HTTP 404
- [new-provider.mdx:43](zh-hans/guides/model-configuration/new-provider.mdx) - 无效链接: https://github.com/langgenius/dify/blob/main/api/core/model\_runtime/docs/zh\_Hans/schema.md#aimodelentity -> HTTP 404
- [new-provider.mdx:39](zh-hans/guides/model-configuration/new-provider.mdx) - 无效链接: https://github.com/langgenius/dify/blob/main/api/core/model\_runtime/docs/zh\_Hans/schema -> HTTP 404
- [new-provider.mdx:128](zh-hans/guides/model-configuration/new-provider.mdx) - 无效链接: https://github.com/langgenius/dify/blob/main/api/core/model\_runtime/docs/zh\_Hans/schema -> HTTP 404
- [readme.mdx:26](zh-hans/guides/model-configuration/readme.mdx) - 无效链接: advanced/retrieval-augment/rerank -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/advanced/retrieval-augment/rerank
- [readme.mdx:22](zh-hans/guides/model-configuration/readme.mdx) - 无效链接: https://platform.openai.com/account/api-keys -> HTTP 403
- [interfaces.mdx:230](zh-hans/guides/model-configuration/interfaces.mdx) - 无效链接: https://github.com/langgenius/dify-runtime/blob/main/lib/model_providers/anthropic/llm/llm.py -> HTTP 404
- [load-balancing.mdx:14](zh-hans/guides/model-configuration/load-balancing.mdx) - 无效链接: ../../getting-started/cloud.md -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/getting-started/cloud.md
- [agent.mdx:67](zh-hans/guides/application-orchestrate/agent.mdx) - 无效链接: https://assets-docs.dify.ai/dify-enterprise-mintlify/zh_CN/guides/application-orchestrate/cd4a7ffded1a86d5e4aed1b9df36dc64.png -> Connection Error
- [agent.mdx:71](zh-hans/guides/application-orchestrate/agent.mdx) - 无效链接: https://assets-docs.dify.ai/dify-enterprise-mintlify/zh_CN/guides/application-orchestrate/44b15a78c45e21afafd110864f78f33e.png -> Connection Error
- [moderation-tool.mdx:12](zh-hans/guides/application-orchestrate/app-toolkits/moderation-tool.mdx) - 无效链接: https://platform.openai.com/docs/guides/moderation/overview -> HTTP 403
- [create-flow-app.mdx:15](zh-hans/guides/workflow/create-flow-app.mdx) - 无效链接: img/8eb5a12939c298bc7cb9a778d10d42db.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/img/8eb5a12939c298bc7cb9a778d10d42db.png
- [create-flow-app.mdx:27](zh-hans/guides/workflow/create-flow-app.mdx) - 无效链接: user-guide/.gitbook/assets/workflow.png -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/user-guide/.gitbook/assets/workflow.png
- [additional-feature.mdx:129](zh-hans/guides/workflow/additional-feature.mdx) - 无效链接: ../extension/api-based-extension/external-data-tool -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/extension/api-based-extension/external-data-tool
- [file-upload.mdx:38](zh-hans/guides/workflow/file-upload.mdx) - 无效链接: guides/workflow/concepts -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/workflow/concepts
- [file-upload.mdx:38](zh-hans/guides/workflow/file-upload.mdx) - 无效链接: guides/workflow/key-concepts -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/workflow/key-concepts
- [code.mdx:22](zh-hans/guides/workflow/node/code.mdx) - 无效链接: ../key-concepts -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/workflow/key-concepts
- [README.mdx:7](zh-hans/guides/workflow/node/README.mdx) - 无效链接: variable-assignment -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/workflow/node/variable-assignment
- [llm.mdx:87](zh-hans/guides/workflow/node/llm.mdx) - 无效链接: user-guide/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/ -> File not found: /Users/allen/Documents/dify-docs-mintlify/zh-hans/guides/workflow/node/user-guide/learn-more/extended-reading/prompt-engineering/prompt-engineering-1

View File

@@ -1,62 +1,33 @@
# AI Sales Avatar 的探索
---
title: 构建 AI 数字销售助理
description: 作者:[Alec Lee](mailto:alec.lee1005@gmail.com)AX 全球战略师 & 全栈探索者。若您发现文中存在不足或改进空间,欢迎随时联系我。
---
—— Dify × TEN × Trulience × Azure × Agora × OpenAI 集成实践 ——
本次选择的应用场景是:**名车 AI 数字导购**,她的名字叫 **Vendy**。我们将用最简单易懂的方式,一步步搭建一个会 “听、说、想、演” 的 AI 数字销售助理。
本指南面向全球 🌍 企业开发者和个人探索者,我们将用最简单易懂的方式,
一步步搭建一个会 “听、说、想、演” 的 AI 数字销售助理。
次选择的应用场景是:**名品车 AI 数字导购**,她的名字叫 **Vendy**
![TEN AgentTalk](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/053TrulienceDifyFinal.jpg)
项目所涉及的产品Dify × TEN × Trulience × Azure × Agora × OpenAI
---
在正式开始搭建之前,我衷心感谢 Dify、TEN、Agora 和 Azure 团队给予的指导与鼓励。
正是全球开源社区所秉持的**探索、共创与赋能**精神,
让像我这样的从零起步的 AI 共建探索者也有机会将设想落地,
实现这一端到端的集成方案。
## 项目介绍
---
“会听说想演”的 AI 数字人助理由哪部分构成?本项目将集成六大平台,构建一个具备完整对话能力的名品车 AI 销售数字人AI Sales Avatar——**Vendy**。
我希望这份文档能为全球更多 AI 探索者提供:
**一条实用、可复用的路径**
降低动手门槛,推动 AXAI Transformation在个体 × 企业 × 社会层面的真正落地与赋能。
若您发现文中存在不足或改进空间,欢迎随时联系我。
---
💡 **我坚信:**
> **AI 源于人、发展于人,其根本目的,是为守护人的尊严与自由。**
>
> 技术的进步,唯有与人的价值共振,才能真正成为每一个人的力量。
---
**作者**Alec LeeAX 全球战略师 & 全栈探索者
跨越文化与系统,共创 **“以一当千,不落一人”** 的AX新时代。
**日期**2025 年 5 月 11 日
**E-Mail**alec.lee1005@gmail.com
## 一、“会听说想演”的 AI 数字人助理由哪六大平台构成?
本项目以 **TEN 平台为中枢**,集成以下六大平台,
构建一个具备完整对话能力的名品车 AI 销售数字人AI Sales Avatar——**Vendy**。
她能“**听、说、想、演**”——
也就是:**聆听用户提问、思考应答、语音回复,并以数字人形象呈现**。
她能“**听、说、想、演**” —— 也就是:**聆听用户提问、思考应答、语音回复,并以数字人形象呈现**。
👇 下图展示了系统整体集成架构图:
![AI Sales Avatar](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/001AIsalesAvatar.jpg)
## 🧩 各平台在系统中的角色分工:
### 🧩 各平台在系统中的角色分工:
👇 下图展示了系统中各平台的集成模块与工作流程:
![Trulience 工作模块图](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/002Trulience.jpg)
## 📌 各平台功能说明:
### 📌 各平台功能说明:
- **Dify + OpenAI**:搭建智能体,支持调用企业内部数据与 OpenAI API并向 TEN 提供统一的对话接口API
@@ -67,44 +38,31 @@
- **Azure Speech**提供语音识别STT与语音合成TTS服务向 TEN 提供以下参数:
`AZURE_STT_KEY`、`AZURE_STT_REGION`、`AZURE_TTS_KEY`、`AZURE_TTS_REGION`
- **TEN平台中枢**:作为系统的中枢平台,统一集成并调度上述所有平台的 API、密钥与 Token
实现 AI Sales Avatar —— **Vendy** 的整体智能对话流程与实时互动能力。
---
- **TEN平台中枢**:作为系统的中枢平台,统一集成并调度上述所有平台的 API、密钥与 Token 实现 AI Sales Avatar —— **Vendy** 的整体智能对话流程与实时互动能力。
📌 **小提示**:上述平台均可根据实际需求,替换为其他开源或 SaaS 方案。
本项目所用组合为参考示例,便于学习与复用。
---
## 搭建销售智能体“大脑”
## 二、开始搭建(每一步都像玩乐高)
我们首先将在 Dify 上完成三步操作,搭建出一个基于内部数据的 AI Sales Avatar “本体”。
演示场景是:**名品车导购数字人**,她的名字叫 **Vendy**。
我们首先将在 Dify 上完成三步操作,搭建出一个基于内部数据的 AI Sales Avatar “Vendy 本体”。
---
### 🧩 Step 1注册 Dify 账号并配置模型 API
👉 打开 Dify 官网 [https://dify.ai/](https://dify.ai/),点击右上角 “Get Started”开始注册流程。
👉 打开 [Dify 官网](https://dify.ai),点击右上角 “Get Started”开始注册流程。
![Dify AI](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/003DifyAIsales.jpg)
你可以使用以下方式登录或注册账号:**GitHub**、**Gmail**,或 **Hotmail**。
![Dify Email](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/004DifyEmail.jpg)
登录 Dify 后,在左侧菜单点击 **「Settings > Model Provider」模型提供商**。
在页面中找到 **OpenAI** 模块,点击 **Install** 进行安装。
登录 Dify 后,在左侧菜单点击 **「Settings > Model Provider」模型提供商**。在页面中找到 **OpenAI** 模块,点击 **Install** 进行安装。
![Dify Models](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/005DifyModels.jpg)
在 **OpenAI** 模块中,点击蓝色链接 **「Get your API Key from OpenAI」**
系统会自动跳转到 OpenAI 官方平台:[https://platform.openai.com/api-keys](https://platform.openai.com/api-keys)。
在 **OpenAI** 模块中,点击蓝色链接 **「Get your API Key from OpenAI」**系统会自动跳转到 [OpenAI 官方平台](https://platform.openai.com/api-keys)。
![Dify OpenAI](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/006DifyOpenAI.jpg)
在 OpenAI 上点击 **「+ Create new secret key」** 生成新的 API 密钥。
在 OpenAI 上点击 **「+ Create new secret key」** 生成新的 API 密钥。
复制生成的 Key并返回 Dify在 OpenAI 模块中粘贴如下字段:
![Dify OpenAI Key](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/007DifyOpenAIKey.jpg)
@@ -201,19 +159,19 @@ Your task is to provide information about luxury cars to the customers based on
接下来,我们将进入 **Trulience 平台**,为 AI Sales Avatar 生成她的 “数字人外貌与演绎能力” ——
也就是构建她的虚拟形象,让她不仅能“听、说、想”,还能真实地出现在用户面前,与人互动!
📚 如需进一步了解 Dify可参考官方技术文档
👉 [https://docs.dify.ai/en/introduction](https://docs.dify.ai/en/introduction)
---
## 创建数字人形象
### 🧩 Step 4注册 Trulience 账号,获取数字人的 ID 和访问 Token
现在,我们将为 AI Sales Avatar 赋予一个可视化的 “数字人形象”!
我们将使用 Trulience 平台来生成形象,并获取用于后续连接的 **Avatar ID** 与访问 **Token**。
我们将使用 [Trulience 平台](https://www.trulience.com/docs#/)来生成形象,并获取用于后续连接的 **Avatar ID** 与访问 **Token**。
✅ 操作流程如下:
1⃣ 打开 Trulience 官网 [https://trulience.com](https://trulience.com)
1⃣ 打开 [Trulience 官网](https://trulience.com)
点击主页上的 **「Start For Free」** 按钮,开始注册账号。
👇 页面示意图如下:
@@ -255,23 +213,20 @@ Your task is to provide information about luxury cars to the customers based on
🎉 恭喜你!
我们已经完成了 AI Sales Avatar 的“**外貌搭建**”,并成功获得了她的 Avatar ID 与访问 Token
接下来就进入最后一步:
我们将把 Dify 的智能体 + Trulience 的数字人,
一并接入 **TEN 平台**,构建真正“听说想演”一体化的实时语音 AI 代理!
---
📚 如需进一步了解 Trulience可参考官方技术文档
👉 [https://www.trulience.com/docs#/](https://www.trulience.com/docs#/)
## 赋予数字人语音能力
### 🧩 Step 5申请 Agora 与 Azure Speech
在将 Dify 的智能体、Trulience 的数字人接入 TEN 平台之前,我们需要提前准备好语音通信和语音识别/合成所需的账号与密钥,主要包括以下服务:
- Agora
- Azure Speech
---
## 🧩 Step 5在本地搭建 TEN Agent 平台前,我们需要准备这三项配置
在将 Dify 的智能体、Trulience 的数字人接入 TEN 平台之前,
我们需要提前准备好语音通信和语音识别/合成所需的账号与密钥,主要包括以下三项:
---
### ✅ 1. Agora 实时语音通信参数
#### ✅ 1. Agora 实时语音通信参数
TEN 使用 **Agora** 来实现语音通话能力(“她会说话”),需要准备以下参数:
@@ -294,7 +249,7 @@ TEN 使用 **Agora** 来实现语音通话能力(“她会说话”),需
---
### 📝 输入项说明:
📝 **输入项说明**
- **Project Name**:填写为 `AISalesAvatar`
- **Use Case**:选择合适的用途,例如 `Enterprise Collaboration`
@@ -327,25 +282,25 @@ TEN 使用 **Agora** 来实现语音通话能力(“她会说话”),需
至此,我们已经成功获取 **Agora 的 App ID 和 Primary Certificate**
为后续在 TEN 平台启用语音通信功能做好了准备。
📚 如需进一步了解,可参考官方技术文档:
👉 [https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project)
📚 如需进一步了解,可参考 [Agora 官方技术文档](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project)。
---
### ✅ 2. Azure Speech 参数(语音识别 + 语音合成)
#### ✅ 2. Azure Speech 参数(语音识别 + 语音合成)
**Azure** 负责将用户的语音转为文字STT并将 AI 回复转成语音TTS
需要准备以下 4 个环境变量:
AZURE_STT_KEY= AZURE_STT_REGION= AZURE_TTS_KEY= AZURE_TTS_REGION= 。
- `AZURE_STT_KEY`
- `AZURE_STT_REGION`
- `AZURE_TTS_KEY`
- `AZURE_TTS_REGION`
👉 获取方式如下:
打开 Azure Portal请登录 Azure 官方门户网站:
🔗 [https://portal.azure.com](https://portal.azure.com)
打开 Azure Portal请登录 [Azure 官方门户网站](https://portal.azure.com)
在首页点击左上角的 **「Create a resource创建资源」**
在搜索栏中输入 **Azure OpenAI**,点击进入创建页面。
在首页点击左上角的 **「Create a resource创建资源」** 在搜索栏中输入 **Azure OpenAI**,点击进入创建页面。
👇 创建入口界面如下:
@@ -424,8 +379,7 @@ AZURE_STT_KEY= AZURE_STT_REGION= AZURE_TTS_KEY= AZURE_TTS_REGION= 。
---
### 🧱 下一步,我们就可以正式在本地启动 TEN Agent 平台
并将前面搭建的所有模块:
🧱 下一步,我们就可以正式在本地启动 TEN Agent 平台。并将前面搭建的所有模块:
- 🧠 智能体Dify
- 🔊 语音能力Azure Speech + Agora
@@ -435,17 +389,19 @@ AZURE_STT_KEY= AZURE_STT_REGION= AZURE_TTS_KEY= AZURE_TTS_REGION= 。
---
📚 如需进一步了解 Azure Speech 与 OpenAI 服务部署,参考官方文档
👉 [https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal)
📚 如需进一步了解 Azure Speech 与 OpenAI 服务部署,参考[官方文档](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal)。
## 🧩 Step 6在 Mac 上本地部署 TEN Agent 的开发环境
## 调试数字人语音交互系统
为了运行并调试 AI Sales Avatar 的语音交互系统,
我们需要在本地准备好 **TEN Agent 的开发环境**。
### 🧩 Step 6本地部署 TEN Agent
为了运行并调试 AI Sales Avatar 的语音交互系统,需要在本地准备好 **TEN Agent 的开发环境**。
---
### 🔧 所需工具与安装方式一览:
#### 前置准备
🔧 所需工具与安装方式一览:
| 工具 | 功能说明 | 安装方式 |
|----------|---------------------------|----------------------------------|
@@ -455,7 +411,7 @@ AZURE_STT_KEY= AZURE_STT_REGION= AZURE_TTS_KEY= AZURE_TTS_REGION= 。
---
### ✅ ① 安装 Docker
##### ✅ ① 安装 Docker
💡 Docker 是 TEN 平台的核心运行环境,所有模块都将以容器形式部署。
@@ -467,17 +423,24 @@ AZURE_STT_KEY= AZURE_STT_REGION= AZURE_TTS_KEY= AZURE_TTS_REGION= 。
```bash
docker -v
✅ ② 安装 Git
##### ✅ ② 安装 Git
💡 Git 是用来克隆和管理 TEN 框架代码的版本控制工具。
安装命令brew install git; 验证安装git -v
安装命令:`brew install git`。
验证安装:`git -v`。
##### ✅ ③ 安装 Node.js
✅ ③ 安装 Node.js
💡 Node.js 是运行 TEN 的前端 Playground 所必需的环境。
安装命令brew install node; 验证安装node -v
安装命令:`brew install node`。
验证安装:`node -v`。
##### ✅ ④ 克隆 TEN Agent 框架代码
✅ ④ 克隆 TEN Agent 框架代码
完成 Docker、Git、Node 安装后,下一步就是克隆 TEN Agent 的源代码,并配置 .env 环境变量。
🚀 1. 克隆 TEN Agent 代码仓库
@@ -524,17 +487,18 @@ AZURE_TTS_REGION=your_tts_region
![TEN .env](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/042TENCursor.jpg)
## ✅ Step ⑤:启动 TEN Agent 容器,编译并运行 Server
##### ✅ Step ⑤:启动 TEN Agent 容器,编译并运行 Server
在 `.env` 环境变量配置完成后,下一步是正式启动 **TEN Agent 的容器环境**。
---
### 🐳 启动容器
### 🐳 启动容器
进入 `ai_agents` 目录并启动 Docker 容器服务:
cd ai_agents
docker compose up -d
这会启动以下容器服务:
@@ -549,8 +513,8 @@ ten_agent_playground前端交互页面
![TEN Agent ai_agents 目录结构](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/043TENaiagents.jpg)
### 🔧 进入容器并编译 Agent Server
🔧 ② 进入容器并编译 Agent Server
执行以下命令进入开发容器docker exec -it ten_agent_dev bash
进入容器后,执行初始化任务脚本来注册 Agenttask use
@@ -559,8 +523,7 @@ ten_agent_playground前端交互页面
![task use](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/044TENtaskuse.jpg)
该命令将自动读取并链接 Agent 的配置文件(如 `manifest.json` 和 `property.json`
并自动安装所需依赖包。
该命令将自动读取并链接 Agent 的配置文件(如 `manifest.json` 和 `property.json`并自动安装所需依赖包。
👇 执行过程示意图如下:
@@ -582,7 +545,7 @@ ten_agent_playground前端交互页面
![TEN Agent Playground](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/046TEN494483.jpg)
✅ 替换语音合成TTS模块为 **Azure 引擎**
### ✅ 替换语音合成TTS模块为 **Azure 引擎**
1. 找到图中的 **TTS 模块**(如 `tts_default`
2. 鼠标右键点击该模块,选择 **「Replace Node with」**
@@ -594,27 +557,27 @@ ten_agent_playground前端交互页面
![TEN Agent Azure TTS Change](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/047TENAzuretts.jpg)
🎙️ 关于数字人的声音设置TTS 语音)
### 🎙️ 关于数字人的声音设置TTS 语音)
我们可以根据数字人的形象需求,自定义她的声音。
在 Microsoft 提供的语音服务页面中,列出了所有支持的语音名称。
我们可以根据数字人的形象需求,自定义她的声音。在 Microsoft 提供的语音服务页面中,列出了所有支持的语音名称。
👉 访问地址如下:
[https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts#multilingual-voices](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts#multilingual-voices)
👉 [访问地址](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts#multilingual-voices)。
---
在本例中,我们选择的是一位英文女声:
在本例中,我们选择的是一位英文女声:
🗣️ **`en-US-AshleyNeural`**
在 Azure TTS 模块中,请将以下字段填写为:
Azure_synthesis_voice_name=en-US-AshleyNeural
`Azure_synthesis_voice_name=en-US-AshleyNeural`
👇 Azure TTS 语音名称设置示意图如下:
![TEN Azure_synthesis_voice_name](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/048TENAzureVoice.jpg)
🔁 替换 LLM 模块为 Dify 接口,连接 Dify 智能体
### 🔁 替换 LLM 模块为 Dify 智能体
1. 右键点击 **`llm` 模块**,选择 **「Replace Node with」**
2. 在弹出的列表中选择 **`dify_python`**
@@ -625,8 +588,7 @@ Azure_synthesis_voice_name=en-US-AshleyNeural
![TEN Agent Dify](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/049TENDifyAPI.jpg)
2⃣ 完成替换后,再次右键点击新生成的 **`dify_python` 模块**
点击 **「Update Properties」**,进入属性设置页面。
2⃣ 完成替换后,再次右键点击新生成的 **`dify_python` 模块** 点击 **「Update Properties」**,进入属性设置页面。
- 在 **API Key** 字段中,输入你在 Dify 平台上创建的 API Key
- 在 **Greeting** 字段中,可以根据需求自定义欢迎语(如欢迎语音问候)
@@ -635,7 +597,7 @@ Azure_synthesis_voice_name=en-US-AshleyNeural
![TEN AgentDify API KeyGreeting](https://raw.githubusercontent.com/aleclee1005/AISalesAvatar/img/img/050TENDifyAPI2.jpg)
✅ 启动 TEN Agent 并连接 Trulience 数字人
## ✅ 启动 TEN Agent 并连接 Trulience 数字人
---
@@ -683,15 +645,14 @@ Azure_synthesis_voice_name=en-US-AshleyNeural
🎯 恭喜你!你现在已经拥有了完整的 **AI Sales Avatar**
---
## 总结
✅ 来自 **OpenAI / Dify** 的聊天大脑
✅ 使用 **Azure** 的自然语音合成能力(女声)
✅ 拥有 **Trulience** 的数字人形象
✅ 构建于 **TEN 平台** 的语音交互能力
---
🌟 这就是 AI Agent 最核心的完整链路:
**“听 → 想 → 说 → 演 → 链接”**
---
🌟 这就是 AI Agent 最核心的完整链路:**“听 → 想 → 说 → 演 → 链接”**
📚 如需进一步了解,可参考 TEN 官方技术文档:
👉 [https://theten.ai/docs/ten_agent/architecture_flow](https://theten.ai/docs/ten_agent/architecture_flow)