diff --git a/en/community/docs-contribution.md b/en/community/docs-contribution.md index 207542293..a7325f69f 100644 --- a/en/community/docs-contribution.md +++ b/en/community/docs-contribution.md @@ -13,7 +13,7 @@ We categorize documentation issues into two main types: If you encounter errors while reading a document or wish to suggest modifications, please use the **"Edit on GitHub"** button located in the table of contents on the right side of the document page. Utilize GitHub's built-in online editor to make your changes, then submit a pull request with a concise description of your edits. Please format your pull request title as `Fix: Update xxx`. We'll review your submission and merge the changes if everything looks good. -![](../.gitbook/assets/docs-contribution.png) +![](https://assets-docs.dify.ai/img/en/community/e9fca78c743762d464eb146fbc3d879d.webp) Alternatively, you can post the document link on our [Issues page](https://github.com/langgenius/dify-docs/issues) with a brief description of the necessary modifications. We'll address these promptly upon receipt. diff --git a/en/development/models-integration/gpustack.md b/en/development/models-integration/gpustack.md index 7749a3d55..80ce7881e 100644 --- a/en/development/models-integration/gpustack.md +++ b/en/development/models-integration/gpustack.md @@ -36,7 +36,7 @@ Using a LLM hosted on GPUStack as an example: 3. Click `Save` to deploy the model. -![gpustack-deploy-llm](../../.gitbook/assets/gpustack-deploy-llm.png) +![gpustack-deploy-llm](https://assets-docs.dify.ai/img/en/models-integration/9ba129b9bae6e6698217b9207c4ec911.webp) ## Create an API Key @@ -60,6 +60,6 @@ Using a LLM hosted on GPUStack as an example: Click "Save" to use the model in the application. -![add-gpustack-llm](../../.gitbook/assets/add-gpustack-llm.png) +![add-gpustack-llm](https://assets-docs.dify.ai/img/en/models-integration/ef6f8cfd721943783d1a3b6122256624.webp) For more information about GPUStack, please refer to [Github Repo](https://github.com/gpustack/gpustack). diff --git a/en/development/models-integration/hugging-face.md b/en/development/models-integration/hugging-face.md index c27524e8b..d527f3941 100644 --- a/en/development/models-integration/hugging-face.md +++ b/en/development/models-integration/hugging-face.md @@ -11,7 +11,7 @@ The specific steps are as follows: 2. Set the API key of Hugging Face ([obtain address](https://huggingface.co/settings/tokens)). 3. Select a model to enter the [Hugging Face model list page](https://huggingface.co/models?pipeline\_tag=text-generation\&sort=trending). -
+
Dify supports accessing models on Hugging Face in two ways: @@ -24,17 +24,17 @@ Dify supports accessing models on Hugging Face in two ways: Hosted inference API is supported only when there is an area containing Hosted inference API on the right side of the model details page. As shown in the figure below: -
+
On the model details page, you can get the name of the model. -
+
#### 2 Using access models in Dify Select Hosted Inference API for Endpoint Type in `Settings > Model Provider > Hugging Face > Model Type`. As shown below: -
+
API Token is the API Key set at the beginning of the article. The model name is the model name obtained in the previous step. @@ -44,26 +44,26 @@ API Token is the API Key set at the beginning of the article. The model name is Inference Endpoint is only supported for models with the Inference Endpoints option under the Deploy button on the right side of the model details page. As shown below: -
+
#### 2 Deployment model Click the Deploy button for the model and select the Inference Endpoint option. If you have not bound a bank card before, you will need to bind the card. Just follow the process. After binding the card, the following interface will appear: modify the configuration according to the requirements, and click Create Endpoint in the lower left corner to create an Inference Endpoint. -
+
After the model is deployed, you can see the Endpoint URL. -
+
#### 3 Using access models in Dify Select Inference Endpoints for Endpoint Type in `Settings > Model Provider > Hugging face > Model Type`. As shown below: -
+
The API Token is the API Key set at the beginning of the article. `The name of the Text-Generation model can be arbitrary, but the name of the Embeddings model needs to be consistent with Hugging Face.` The Endpoint URL is the Endpoint URL obtained after the successful deployment of the model in the previous step. -
+
> Note: The "User name / Organization Name" for Embeddings needs to be filled in according to your deployment method on Hugging Face's [Inference Endpoints](https://huggingface.co/docs/inference-endpoints/guides/access), with either the ''[User name](https://huggingface.co/settings/account)'' or the "[Organization Name](https://ui.endpoints.huggingface.co/)". diff --git a/en/development/models-integration/litellm.md b/en/development/models-integration/litellm.md index b5d2dc450..e4be3d1f2 100644 --- a/en/development/models-integration/litellm.md +++ b/en/development/models-integration/litellm.md @@ -51,7 +51,7 @@ On success, the proxy will start running on `http://localhost:4000` In `Settings > Model Providers > OpenAI-API-compatible`, fill in: -
+
* Model Name: `gpt-4` * Base URL: `http://localhost:4000` diff --git a/en/development/models-integration/replicate.md b/en/development/models-integration/replicate.md index fb08b4243..8f7b59ed0 100644 --- a/en/development/models-integration/replicate.md +++ b/en/development/models-integration/replicate.md @@ -9,8 +9,8 @@ Specific steps are as follows: 3. Pick a model. Select the model under [Language models](https://replicate.com/collections/language-models) and [Embedding models](https://replicate.com/collections/embedding-models) . 4. Add models in Dify's `Settings > Model Provider > Replicate`. -
+
The API key is the API Key set in step 2. Model Name and Model Version can be found on the model details page: -
+
diff --git a/en/development/models-integration/xinference.md b/en/development/models-integration/xinference.md index 2511e7168..5832c63f2 100644 --- a/en/development/models-integration/xinference.md +++ b/en/development/models-integration/xinference.md @@ -33,7 +33,7 @@ There are two ways to deploy Xinference, namely [local deployment](https://githu Visit `http://127.0.0.1:9997`, select the model and specification you need to deploy, as shown below: -
+
As different models have different compatibility on different hardware platforms, please refer to [Xinference built-in models](https://inference.readthedocs.io/en/latest/models/builtin/index.html) to ensure the created model supports the current hardware platform. 4. Obtain the model UID diff --git a/en/guides/annotation/annotation-reply.md b/en/guides/annotation/annotation-reply.md index a9d63b055..5cdee78f7 100644 --- a/en/guides/annotation/annotation-reply.md +++ b/en/guides/annotation/annotation-reply.md @@ -17,13 +17,13 @@ The annotated replies feature essentially provides another set of retrieval-enha 4. If no match is found, the question will continue through the regular process (passing to LLM or RAG). 5. Once the annotated replies feature is disabled, the system will no longer match responses from annotations. -

Annotated Replies Workflow

+

Annotated Replies Workflow

### Enabling Annotated Replies in Prompt Orchestration Enable the annotated replies switch by navigating to **“Orchestrate -> Add Features”**: -

Enabling Annotated Replies in Prompt Orchestration

+

Enabling Annotated Replies in Prompt Orchestration

When enabling, you need to set the parameters for annotated replies, which include: Score Threshold and Embedding Model. @@ -33,27 +33,27 @@ When enabling, you need to set the parameters for annotated replies, which inclu Click save and enable, and the settings will take effect immediately. The system will generate embeddings for all saved annotations using the embedding model. -

Setting Parameters for Annotated Replies

+

Setting Parameters for Annotated Replies

### Adding Annotations in the Conversation Debug Page You can directly add or edit annotations on the model response information in the debug and preview pages. -

Adding Annotated Replies

+

Adding Annotated Replies

Edit the response to the high-quality reply you need and save it. -

Editing Annotated Replies

+

Editing Annotated Replies

Re-enter the same user question, and the system will use the saved annotation to reply to the user's question directly. -

Replying to User Questions with Saved Annotations

+

Replying to User Questions with Saved Annotations

### Enabling Annotated Replies in Logs and Annotations Enable the annotated replies switch by navigating to “Logs & Ann. -> Annotations”: -

Enabling Annotated Replies in Logs and Annotations

+

Enabling Annotated Replies in Logs and Annotations

### Setting Parameters for Annotated Replies in the Annotation Backend @@ -63,22 +63,22 @@ The parameters that can be set for annotated replies include: Score Threshold an **Embedding Model:** This is used to vectorize the annotated text. Changing the model will regenerate the embeddings. -

Setting Parameters for Annotated Replies

+

Setting Parameters for Annotated Replies

### Bulk Import of Annotated Q\&A Pairs In the bulk import feature, you can download the annotation import template, edit the annotated Q\&A pairs according to the template format, and then import them in bulk. -

Bulk Import of Annotated Q&A Pairs

+

Bulk Import of Annotated Q&A Pairs

### Bulk Export of Annotated Q\&A Pairs Through the bulk export feature, you can export all saved annotated Q\&A pairs in the system at once. -

Bulk Export of Annotated Q&A Pairs

+

Bulk Export of Annotated Q&A Pairs

### Viewing Annotation Hit History In the annotation hit history feature, you can view the edit history of all hits on the annotation, the user's hit questions, the response answers, the source of the hits, the matching similarity scores, the hit time, and other information. You can use this information to continuously improve your annotated content. -

Viewing Annotation Hit History

+

Viewing Annotation Hit History

diff --git a/en/guides/annotation/logs.md b/en/guides/annotation/logs.md index 2adb428e4..f4829db6e 100644 --- a/en/guides/annotation/logs.md +++ b/en/guides/annotation/logs.md @@ -24,7 +24,7 @@ The logs currently do not include interaction records from the Prompt debugging These annotations will be used for model fine-tuning in future versions of Dify to improve model accuracy and response style. The current preview version only supports annotations. {% endhint %} -

Mark logs to improve your app

+

Mark logs to improve your app

Clicking on a log entry will open the log details panel on the right side of the interface. In this panel, operators can annotate an interaction: diff --git a/en/guides/application-orchestrate/app-toolkits/README.md b/en/guides/application-orchestrate/app-toolkits/README.md index a825fc0cb..be03b1fd2 100644 --- a/en/guides/application-orchestrate/app-toolkits/README.md +++ b/en/guides/application-orchestrate/app-toolkits/README.md @@ -4,19 +4,19 @@ In **Application Orchestration**, click **Add Feature** to open the application The application toolbox provides various additional features for Dify's [applications](../#application_type): -
+
### Conversation Opening In conversational applications, the AI will proactively say the first sentence or ask a question. You can edit the content of the opening, including the initial question. Using conversation openings can guide users to ask questions, explain the application background, and lower the barrier for initiating a conversation. -

Conversation Opening

+

Conversation Opening

### Next Step Question Suggestions Setting next step question suggestions allows the AI to generate 3 follow-up questions based on the previous conversation, guiding the next round of interaction. -
+
### Citation and Attribution diff --git a/en/guides/application-orchestrate/app-toolkits/moderation-tool.md b/en/guides/application-orchestrate/app-toolkits/moderation-tool.md index 73c387212..5243597a3 100644 --- a/en/guides/application-orchestrate/app-toolkits/moderation-tool.md +++ b/en/guides/application-orchestrate/app-toolkits/moderation-tool.md @@ -2,7 +2,7 @@ In our interactions with AI applications, we often have stringent requirements in terms of content security, user experience, and legal regulations. At this point, we need the "Sensitive Word Review" feature to create a better interactive environment for end-users. On the orchestration page, click "Add Feature" and locate the "Content Review" toolbox at the bottom: -

Content moderation

+

Content moderation

## Call the OpenAI Moderation API @@ -10,16 +10,16 @@ OpenAI, along with most companies providing LLMs, includes content moderation fe Now you can also directly call the OpenAI Moderation API on Dify; you can review either input or output content simply by entering the corresponding "preset reply." -

Configuring Load Balancing from Add Model

+

Configuring Load Balancing from Add Model

## Keywords Developers can customize the sensitive words they need to review, such as using "kill" as a keyword to perform an audit action when users input. The preset reply content should be "The content is violating usage policies." It can be anticipated that when a user inputs a text chuck containing "kill" at the terminal, it will trigger the sensitive word review tool and return the preset reply content. -

Configuring Load Balancing from Add Model

+

Configuring Load Balancing from Add Model

## Moderation Extension Different enterprises often have their own mechanisms for sensitive word moderation. When developing their own AI applications, such as an internal knowledge base ChatBot, enterprises need to moderate the query content input by employees for sensitive words. For this purpose, developers can write an API extension based on their enterprise's internal sensitive word moderation mechanisms, which can then be called on Dify to achieve a high degree of customization and privacy protection for sensitive word review. -

Moderation Extension

+

Moderation Extension

diff --git a/en/guides/application-orchestrate/chatbot-application.md b/en/guides/application-orchestrate/chatbot-application.md index 37e2f3ee9..382ab9faa 100644 --- a/en/guides/application-orchestrate/chatbot-application.md +++ b/en/guides/application-orchestrate/chatbot-application.md @@ -22,7 +22,7 @@ Click the "Create Application" button on the homepage to create an application. After the application is successfully created, it will automatically redirect to the application overview page. Click on the button on the left menu: **"Orchestrate"** to compose the application. -
+
**2.1 Fill in Prompts** @@ -38,17 +38,17 @@ For a better experience, we will add an opening dialogue: `"Hello, {{name}}. I'm To add the opening dialogue, click the "Add Feature" button in the upper left corner, and enable the "Conversation remarkers" feature: -
+
And then edit the opening remarks: -![](../../.gitbook/assets/conversation-options.png) +![](https://assets-docs.dify.ai/img/en/application-orchestrate/92f7d07aaa4c86c9e8b59286af602635.webp) **2.2 Adding Context** If an application wants to generate content based on private contextual conversations, it can use our [knowledge](../knowledge-base/) feature. Click the "Add" button in the context to add a knowledge base. -![](../../../img/context.png) +![](https://assets-docs.dify.ai/img/en/application-orchestrate/729377b24c0e96977be70d52215c6053.webp) **2.3 Uploading Documentation File** @@ -62,11 +62,11 @@ Select an LLM that supports file reading and enable the "Documentation" feature. Enter user inputs on the right side and check the respond content. -![](../../.gitbook/assets/debug.png) +![](https://assets-docs.dify.ai/img/en/application-orchestrate/0a7d50796925831c52decc4eccc069a0.webp) If the results are not satisfactory, you can adjust the prompts and model parameters. Click on the model name in the upper right corner to set the parameters of the model: -![](../../.gitbook/assets/adjust-model-parameters.png) +![](https://assets-docs.dify.ai/img/en/application-orchestrate/97051afb0f6a32ad77d8489eb734ffde.webp) **Multiple Model Debugging:** diff --git a/en/guides/application-orchestrate/creating-an-application.md b/en/guides/application-orchestrate/creating-an-application.md index e026807f4..c39942576 100644 --- a/en/guides/application-orchestrate/creating-an-application.md +++ b/en/guides/application-orchestrate/creating-an-application.md @@ -12,17 +12,17 @@ When using Dify for the first time, you might be unfamiliar with creating applic You can select "Studio" from the navigation menu, then choose "Create from Template" in the application list. -

Create an application from a template

+

Create an application from a template

Select any template and click **Use this template.** -

Dify application templates

+

Dify application templates

### Creating a New Application If you need to create a blank application on Dify, you can select "Studio" from the navigation and then choose "Create from Blank" in the application list. -

Create a blank application

+

Create a blank application

When creating an application for the first time, you might need to first understand the [basic concepts](./#application_type) of the four different types of applications on Dify: Chatbot, Text Generator, Agent, Chatflow and Workflow. @@ -42,7 +42,7 @@ Dify DSL is an AI application engineering file standard defined by Dify.AI. The If you have obtained a template (DSL file) from the community or others, you can choose "Import DSL File" from the studio. After importing, all configuration information of the original application will be loaded directly. -

Create an application by importing a DSL file

+

Create an application by importing a DSL file

#### Import DSL file from URL @@ -52,6 +52,6 @@ You can also import DSL files via a URL, using the following link format: https://example.com/your_dsl.yml ``` -

Create an application by importing a DSL file

+

Create an application by importing a DSL file

> When importing a DSL file, the version will be checked. Significant discrepancies between DSL versions may lead to compatibility issues. For more details, please refer to [Application Management: Import](https://docs.dify.ai/guides/management/app-management#importing-application). diff --git a/en/guides/application-publishing/launch-your-webapp-quickly/README.md b/en/guides/application-publishing/launch-your-webapp-quickly/README.md index 57b7be8ff..52028a30f 100644 --- a/en/guides/application-publishing/launch-your-webapp-quickly/README.md +++ b/en/guides/application-publishing/launch-your-webapp-quickly/README.md @@ -9,7 +9,7 @@ One of the benefits of creating AI applications with Dify is that you can publis Toggle the **"In service / Disabled"** switch, your Web App URL will be effective immediately publicly shared on the internet. -
+
We have pre-set Web App UI for the following two types of applications: @@ -29,7 +29,7 @@ We have pre-set Web App UI for the following two types of applications: You can modify the language, color theme, copyright ownership, privacy policy link, and disclaimer by clicking the "setting" button. -![](../../../.gitbook/assets/en-web-app-settings.png) +![](https://assets-docs.dify.ai/img/en/launch-your-webapp-quickly/e45a1f60a59071428953b9777f345f7d.webp) Currently, Web App supports multiple languages: English, Simplified Chinese, Traditional Chinese, Portuguese, German, Japanese, Korean, Ukrainian, and Vietnamese. If you want more languages to be supported, you can submit an Issue on GitHub to seek support or submit a PR to contribute code. diff --git a/en/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md b/en/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md index f4d730bc8..1016306b6 100644 --- a/en/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md +++ b/en/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md @@ -13,29 +13,29 @@ Conversational applications engage in continuous dialogue with users in a questi If you have set variable filling requirements during application orchestration, you will need to fill out the prompted information before entering the conversation window: -
+
Fill in the necessary details and click the "Start Conversation" button to begin chatting. Hover over the AI's response to copy the conversation content, and provide "like" or "dislike" feedback. -
+
### Creation, Pinning, and Deletion of Conversations Click the "New Conversation" button to start a new conversation. Hover over a conversation to pin or delete it. -
+
### Conversation Opener If the "Conversation Opener" feature is enabled on the application orchestration page, the AI application will automatically initiate the first line of dialogue when a new conversation is created. -
+
### Follow Up If the "Follow-up" feature is enabled on the application orchestration page, the system will automatically generate 3 relevant question suggestions after the conversation: -
+
### Speech-to-Text @@ -43,7 +43,7 @@ If the "Speech-to-Text" feature is enabled during application orchestration, you _Please ensure that your device environment is authorized to use the microphone._ -
+
### References and Attributions diff --git a/en/guides/application-publishing/launch-your-webapp-quickly/text-generator.md b/en/guides/application-publishing/launch-your-webapp-quickly/text-generator.md index 2cdcfe56d..39e4f500f 100644 --- a/en/guides/application-publishing/launch-your-webapp-quickly/text-generator.md +++ b/en/guides/application-publishing/launch-your-webapp-quickly/text-generator.md @@ -15,7 +15,7 @@ Let's introduce them separately. Enter the query content, click the run button, and the result will be generated on the right, as shown in the following figure: -
+
In the generated results section, click the "Copy" button to copy the content to the clipboard. Click the "Save" button to save the content. You can see the saved content in the "Saved" tab. You can also "like" and "dislike" the generated content. @@ -29,17 +29,17 @@ In the above scenario, the batch operation function is used, which is convenient Click the "Run Batch" tab to enter the batch run page. -
+
#### Step 2 Download the template and fill in the content Click the **"Download the template here"** button to obtain the template file. Edit the file and fill in the required content, then save it as a `.csv` file. Finally, upload the completed file back to Dify. -
+
#### Step 3 Upload the file and run -
+
If you need to export the generated content, you can click the download "button" in the upper right corner to export as a `csv` file. @@ -49,10 +49,10 @@ If you need to export the generated content, you can click the download "button" Click the "Save" button below the generated results to save the running results. In the "Saved" tab, you can see all saved content. -
+
### Generate more similar results If the "More like this" function is turned on the App's Orchestrate page,clicking the "More like this" button in the web application generates content similar to the current result. As shown below: -
+
diff --git a/en/guides/extension/api-based-extension/README.md b/en/guides/extension/api-based-extension/README.md index fd9f62c62..6cac12884 100644 --- a/en/guides/extension/api-based-extension/README.md +++ b/en/guides/extension/api-based-extension/README.md @@ -7,7 +7,7 @@ Developers can extend module capabilities through the API extension module. Curr Before extending module capabilities, prepare an API and an API Key for authentication, which can also be automatically generated by Dify. In addition to developing the corresponding module capabilities, follow the specifications below so that Dify can invoke the API correctly. -

Add API Extension

+

Add API Extension

## API Specifications @@ -194,11 +194,11 @@ The default port is 8000. The complete address of the API is: `http://127.0.0.1: #### Configure this API in Dify. -
+
#### Select this API extension in the App. -
+
When debugging the App, Dify will request the configured API and send the following content (example): @@ -230,7 +230,7 @@ Since Dify's cloud version can't access internal network API services, you can u 1. Visit the Ngrok official website at [https://ngrok.com](https://ngrok.com/), register, and download the Ngrok file. -
+
2. After downloading, go to the download directory. Unzip the package and run the initialization script as instructed: @@ -241,7 +241,7 @@ $ ./ngrok config add-authtoken 你的Token 3. Check the port of your local API service. -
+
Run the following command to start: @@ -251,7 +251,7 @@ $ ./ngrok http [port number] Upon successful startup, you'll see something like the following: -
+
4. Find the 'Forwarding' address, like the sample domain `https://177e-159-223-41-52.ngrok-free.app`, and use it as your public domain. diff --git a/en/guides/extension/api-based-extension/cloudflare-workers.md b/en/guides/extension/api-based-extension/cloudflare-workers.md index 7607dea09..d832e5a15 100644 --- a/en/guides/extension/api-based-extension/cloudflare-workers.md +++ b/en/guides/extension/api-based-extension/cloudflare-workers.md @@ -43,9 +43,9 @@ npm run deploy After successful deployment, you will get a public internet address, which you can add in Dify as an API Endpoint. Please note not to miss the `endpoint` path. -

Adding API Endpoint in Dify

+

Adding API Endpoint in Dify

-

Adding API Tool in the App edit page

+

Adding API Tool in the App edit page

## Other Logic TL;DR diff --git a/en/guides/knowledge-base/connect-external-knowledge.md b/en/guides/knowledge-base/connect-external-knowledge.md index d871fe5f2..caa1f8e35 100644 --- a/en/guides/knowledge-base/connect-external-knowledge.md +++ b/en/guides/knowledge-base/connect-external-knowledge.md @@ -15,7 +15,7 @@ The **Connect to External Knowledge Base** feature enables integration between t * The Dify platform can directly obtain the text content hosted in the cloud service provider's knowledge base, so that developers do not need to repeatedly move the content to the knowledge base in Dify; * The Dify platform can directly obtain the text content processed by algorithms in the self-built knowledge base. Developers only need to focus on the information retrieval mechanism of the self-built knowledge base and continuously optimize and improve the accuracy of information retrieval. -

Principle of external knowledge base connection

+

Principle of external knowledge base connection

Here are the detailed steps for connecting to external knowledge: @@ -33,13 +33,13 @@ Navigate to the **"Knowledge"** page, click **"External Knowledge API"** in the * API Endpoint The URL of the external knowledge base API endpoint, e.g., api-endpoint/retrieval; refer to the [External Knowledge API](external-knowledge-api-documentation.md) for detailed instructions; * API Key Connection key for the external knowledge, refer to the [External Knowledge API](external-knowledge-api-documentation.md) for detailed instructions. -

Associate External Knowledge API

+

Associate External Knowledge API

## 3. Connect to the External Knowledge Base Go to the **"Knowledge"** page, click **"Connect to an External Knowledge Base"** under the Add Knowledge Base card to direct to the parameter configuration page. -

Connect to the external knowledge base

+

Connect to the external knowledge base

Fill in the following parameters: @@ -56,13 +56,13 @@ Fill in the following parameters: **Score Threshold:** The similarity threshold for text chunk filtering, only retrievaling text chunks that exceed the set score. The default value is 0.5. A higher value indicates a higher requirement for similarity between the text and the question, expecting fewer retrievaled text chunks, and the results will be relatively more precise. -
+
## 4. Test External Knowledge Base and Retrieval Results After connected with the external knowledge base, developers can simulate possible question keywords in the **"Retrieval Testing"** to preview text chunks that might be retrieval. If you are unsatisfied with the retrieval results, try modifying the **External Knowledge Base Settings** or adjusting the retrieval strategy of the external knowledge base. -

Test external knowledge base connection and retrieval

+

Test external knowledge base connection and retrieval

## 5. Integrating External Knowledge base in Applications @@ -70,13 +70,13 @@ After connected with the external knowledge base, developers can simulate possib Associate the external knowledge base in the orchestration page within Chatbot / Agent type applications. -

Chatbot / Agent

+

Chatbot / Agent

* **Chatflow / Workflow** type application Add a **"Knowledge Retrieval"** node and select the external knowledge base. -

Chatflow / Workflow

+

Chatflow / Workflow

## 6. Manage External Knowledge @@ -94,7 +94,7 @@ Navigate to the **"Knowledge"** page, external knowledge base cards will list an The **"External Knowledge API"** and **"External Knowledge ID"** associated with the external knowledge base do not support modification. If modification is needed, please associate a new **"External Knowledge API"** and reset it. -
+
### Connection Example diff --git a/en/guides/knowledge-base/integrate-knowledge-within-application.md b/en/guides/knowledge-base/integrate-knowledge-within-application.md index 94565df8e..bbbbce38e 100644 --- a/en/guides/knowledge-base/integrate-knowledge-within-application.md +++ b/en/guides/knowledge-base/integrate-knowledge-within-application.md @@ -24,7 +24,7 @@ In applications that utilize multiple knowledge bases, it is essential to config The retriever scans all knowledge bases linked to the application for text content relevant to the user's question. The results are then consolidated. Below is the technical flowchart for the Multi-path Retrieval mode: -
+
This method simultaneously queries all knowledge bases connected in **"Context"**, seeking relevant text chucks across multiple knowledge bases, collecting all content that aligns with the user's question, and ultimately applying the Rerank strategy to identify the most appropriate content to respond to the user. This retrieval approach offers more comprehensive and accurate results by leveraging multiple knowledge bases simultaneously. @@ -60,7 +60,7 @@ While this method incurs some additional costs, it is more adept at handling com Dify currently supports multiple Rerank models. To use external Rerank models, you'll need to provide an API Key. Enter the API Key for the Rerank model (such as Cohere, Jina AI, etc.) on the "Model Provider" page. -

Configuring the Rerank model in the Model Provider

+

Configuring the Rerank model in the Model Provider

**Adjustable Parameters** @@ -89,7 +89,7 @@ If the knowledge base is complex, making simple semantic or keyword matches insu Here's how the knowledge base retrieval method affects Multi-path Retrieval: -
+
3. **What should I do if I cannot adjust the “Weight Score” when referencing multiple knowledge bases and an error message appears?** diff --git a/en/guides/knowledge-base/knowledge-and-documents-maintenance.md b/en/guides/knowledge-base/knowledge-and-documents-maintenance.md index 609b1d06a..f041d0747 100644 --- a/en/guides/knowledge-base/knowledge-and-documents-maintenance.md +++ b/en/guides/knowledge-base/knowledge-and-documents-maintenance.md @@ -46,4 +46,4 @@ Dify Knowledge Base provides a comprehensive set of standard APIs. Developers ca [maintain-dataset-via-api.md](knowledge-and-documents-maintenance/maintain-dataset-via-api.md) {% endcontent-ref %} -

Knowledge base API management

+

Knowledge base API management

diff --git a/en/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.md b/en/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.md index f3de63c56..fa565957a 100644 --- a/en/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.md +++ b/en/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.md @@ -17,7 +17,7 @@ Key advantages include: Navigate to the knowledge base page, and you can switch to the **API ACCESS** page from the left navigation. On this page, you can view the dataset API documentation provided by Dify and manage the credentials for accessing the dataset API in **API Keys**. -

Knowledge API Document

+

Knowledge API Document

### API Requesting Examples diff --git a/en/guides/knowledge-base/retrieval-test-and-citation.md b/en/guides/knowledge-base/retrieval-test-and-citation.md index 3f9cf4be9..c8417ac99 100644 --- a/en/guides/knowledge-base/retrieval-test-and-citation.md +++ b/en/guides/knowledge-base/retrieval-test-and-citation.md @@ -63,11 +63,11 @@ If you want to permanently modify the retrieval method for the knowledge base, g When testing the knowledge base effect within the application, you can go to **Workspace -- Add Feature -- Citation and Attribution** to enable the citation attribution feature. -

Enable citation and attribution feature

+

Enable citation and attribution feature

After enabling the feature, when the large language model responds to a question by citing content from the knowledge base, you can view specific citation paragraph information below the response content, including **original segment text, segment number, matching degree**, etc. Clicking **Link to Knowledge** above the cited segment allows quick access to the segment list in the knowledge base, facilitating developers in debugging and editing. -

View citation information in response content

+

View citation information in response content

#### View Linked Applications in the Knowledge Base diff --git a/en/guides/management/app-management.md b/en/guides/management/app-management.md index fc73b5b0d..5d5bc6b6d 100644 --- a/en/guides/management/app-management.md +++ b/en/guides/management/app-management.md @@ -4,7 +4,7 @@ After creating an application, if you want to modify the application name or description, you can click "Edit info" in the upper left corner of the application to revise the application's icon, name, or description. -

Edit App Info

+

Edit App Info

### Duplicating Application @@ -17,13 +17,13 @@ Applications created in Dify support export in DSL format files, allowing you to * Click "Export DSL" in the application menu button on the "Studio" page * After entering the application's orchestration page, click "Export DSL" in the upper left corner -![](../../.gitbook/assets/export-dsl.png) +![](https://assets-docs.dify.ai/img/en/management/457a66965cf27bf5960954bba25c96dc.webp) The DSL file does not include authorization information already filled in [Tool](../workflow/node/tools.md) nodes, such as API keys for third-party services. If the environment variables contain variables of the `Secret` type, a prompt will appear during file export asking whether to allow the export of this sensitive information. -![](../../.gitbook/assets/export-dsl-secret.png) +![](https://assets-docs.dify.ai/img/en/management/c3b27947ca294bf846af82df0f87ae31.webp) {% hint style="info" %} Dify DSL is an AI application engineering file standard defined by Dify.AI in v0.6 and later. The file format is YML. This standard covers the basic description of the application, model parameters, orchestration configuration, and other information. diff --git a/en/guides/management/personal-account-management.md b/en/guides/management/personal-account-management.md index 4860382c5..3733d4455 100644 --- a/en/guides/management/personal-account-management.md +++ b/en/guides/management/personal-account-management.md @@ -8,7 +8,7 @@ The login methods supported by different versions of Dify are as follows: > Note: For Dify Cloud Service, if the email associated with a GitHub or Google account is the same as the email used to log in with a verification code, the system will automatically link them as the same account, avoiding the need for manual binding and preventing duplicate registrations. -
+
## Modifying Personal Information @@ -27,7 +27,7 @@ You can modify the following details: > Note: The password reset feature is only available in the Community Version. -
+
### Login Methods diff --git a/en/guides/management/subscription-management.md b/en/guides/management/subscription-management.md index 8de5bf478..2b9e78875 100644 --- a/en/guides/management/subscription-management.md +++ b/en/guides/management/subscription-management.md @@ -10,7 +10,7 @@ After subscribing to Dify's paid services (Professional or Team plan), team owne On the billing page, you can view the usage statistics for various team resources. -

Team billing management

+

Team billing management

### Frequently Asked Questions @@ -21,7 +21,7 @@ Team owners and administrators can navigate to **Settings** → **Billing**, the * Upgrading from Professional to Team plan requires paying the difference for the current month and takes effect immediately. * Downgrading from Team to Professional plan takes effect immediately. -

Changing the paid plan

+

Changing the paid plan

Upon cancellation of the subscription plan, **the team will automatically transition to the Sandbox/Free plan at the end of the current billing cycle**. Subsequently, any team members and resources exceeding the Sandbox/Free plan limitations will become inaccessible. diff --git a/en/guides/management/team-members-management.md b/en/guides/management/team-members-management.md index c503e51c3..03bb2c9b9 100644 --- a/en/guides/management/team-members-management.md +++ b/en/guides/management/team-members-management.md @@ -14,14 +14,14 @@ Only team owners have permission to invite team members. To add a member, the team owner can click on the avatar in the upper right corner, then select **"Members"** → **"Add"**. Enter the email address and assign member permissions to complete the process. -

Assigning permissions to team members

+

Assigning permissions to team members

> For Community Edition, enabling email functionality requires the team owner to configure and activate the email service via system [environment variables](https://docs.dify.ai/getting-started/install-self-hosted/environments). - If the invited member has not registered with Dify, they will receive an invitation email. They can complete registration by clicking the link in the email. - If the invited member is already registered with Dify, permissions will be automatically assigned and **no invitation email will be sent**. The invited member can switch to the new workspace via the menu in the top right corner. -![](../../../img/switch-workspace.png) +![](https://assets-docs.dify.ai/img/en/management/127c49e4102f75e9acc5d1cf37a51f14.webp) ### Member Permissions @@ -48,7 +48,7 @@ Only team owners have permission to remove team members. To remove a member, click on the avatar in the upper right corner of the Dify team homepage, navigate to **"Settings"** → **"Members"**, select the member to be removed, and click **"Remove from team"**. -

Removing a member

+

Removing a member

### Frequently Asked Questions diff --git a/en/guides/model-configuration/README.md b/en/guides/model-configuration/README.md index e24ca394f..22400fe80 100644 --- a/en/guides/model-configuration/README.md +++ b/en/guides/model-configuration/README.md @@ -6,7 +6,7 @@ description: Learn about the Different Models Supported by Dify. Dify is a development platform for AI application based on LLM Apps, when you are using Dify for the first time, you need to go to **Settings --> Model Providers** to add and configure the LLM you are going to use. -

Settings - Model Provider

+

Settings - Model Provider

Dify supports major model providers like OpenAI's GPT series and Anthropic's Claude series. Each model's capabilities and parameters differ, so select a model provider that suits your application's needs. **Obtain the API key from the model provider's official website before using it in Dify.** @@ -39,13 +39,13 @@ Dify offers trial quotas for cloud service users to experiment with different mo Dify automatically selects the default model based on usage. Configure this in `Settings > Model Provider`. -
+
## Model Integration Settings Choose your model in Dify's `Settings > Model Provider`. -
+
Model providers fall into two categories: @@ -73,4 +73,4 @@ Specific integration methods are not detailed here. Once configured, these models are ready for application use. -
+
diff --git a/en/guides/model-configuration/customizable-model.md b/en/guides/model-configuration/customizable-model.md index 427097261..974f7862a 100644 --- a/en/guides/model-configuration/customizable-model.md +++ b/en/guides/model-configuration/customizable-model.md @@ -8,7 +8,7 @@ It is important to note that for custom models, each model integration requires Unlike predefined models, custom vendor integration will always have the following two parameters, which do not need to be defined in the vendor YAML file. -![](../../.gitbook/assets/customizable-model.png) +![](https://assets-docs.dify.ai/img/en/model-configuration/eaace9746edaa0072eb2d22bc9804bc8.webp) In the previous section, we have learned that vendors do not need to implement `validate_provider_credential`. The Runtime will automatically call the corresponding model layer's `validate_credentials` based on the model type and model name selected by the user for validation. diff --git a/en/guides/model-configuration/load-balancing.md b/en/guides/model-configuration/load-balancing.md index da6b5c769..7647d5939 100644 --- a/en/guides/model-configuration/load-balancing.md +++ b/en/guides/model-configuration/load-balancing.md @@ -6,7 +6,7 @@ In enterprise-level large-scale model API calls, high concurrent requests can ex You can enable this feature by navigating to **Model Provider -- Model List -- Configure Model Load Balancing** and adding multiple credentials (API keys) for the same model. -

Model Load Balancing

+

Model Load Balancing

{% hint style="info" %} Model load balancing is a paid feature. You can enable it by [subscribing to SaaS paid services](../../getting-started/cloud.md#subscription-plan) or purchasing the enterprise edition. @@ -14,17 +14,17 @@ Model load balancing is a paid feature. You can enable it by [subscribing to Saa The default API key is the credential added when initially configuring the model provider. You need to click **Add Configuration** to add different API keys for the same model to use the load balancing feature properly. -

Configuring Load Balancing

+

Configuring Load Balancing

**At least one additional model credential** must be added to save and enable load balancing. You can also **temporarily disable** or **delete** configured credentials. -
+
Once configured, all models with load balancing enabled will be displayed in the model list. -

Enabling Load Balancing

+

Enabling Load Balancing

{% hint style="info" %} By default, load balancing uses the Round-robin strategy. If the rate limit is triggered, a 1-minute cooldown period will be applied. @@ -32,4 +32,4 @@ By default, load balancing uses the Round-robin strategy. If the rate limit is t You can also configure load balancing from **Add Model**, following the same process as above. -

Configuring Load Balancing from Add Model

+

Configuring Load Balancing from Add Model

diff --git a/en/guides/monitoring/README.md b/en/guides/monitoring/README.md index 54ad0ca3f..84901d931 100644 --- a/en/guides/monitoring/README.md +++ b/en/guides/monitoring/README.md @@ -2,4 +2,4 @@ You can monitor and track the performance of your application in a production environment within the **Overview** section. In the data analytics dashboard, you can analyze various metrics such as usage costs, latency, user feedback, and performance in the production environment. By continuously debugging and iterating, you can continually improve your application. -

概览

+

概览

diff --git a/en/guides/monitoring/analysis.md b/en/guides/monitoring/analysis.md index c7776666f..0d72a52ff 100644 --- a/en/guides/monitoring/analysis.md +++ b/en/guides/monitoring/analysis.md @@ -2,7 +2,7 @@ The **Overview -- Data Analysis** section displays metrics such as usage, active users, and LLM (Language Learning Model) invocation costs. This allows you to continuously improve the effectiveness, engagement, and cost-efficiency of your application operations. We will gradually provide more useful visualization capabilities, so please let us know what you need. -

Overview—Data Analysis

+

Overview—Data Analysis

*** diff --git a/en/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md b/en/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md index 4b40510a6..29db6948b 100644 --- a/en/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md +++ b/en/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md @@ -15,35 +15,35 @@ Introduction to Langfuse: [https://langfuse.com/](https://langfuse.com/) 1. Register and log in to Langfuse on the [official website](https://langfuse.com/) 2. Create a project in Langfuse. After logging in, click **New** on the homepage to create your own project. The **project** will be used to associate with **applications** in Dify for data monitoring. -

Create a project in Langfuse

+

Create a project in Langfuse

Edit a name for the project. -

Create a project in Langfuse

+

Create a project in Langfuse

3. Create project API credentials. In the left sidebar of the project, click **Settings** to open the settings. -

Create project API credentials

+

Create project API credentials

In Settings, click **Create API Keys** to create project API credentials. -

Create project API credentials

+

Create project API credentials

Copy and save the **Secret Key**, **Public Key**, and **Host**. -

Get API Key configuration

+

Get API Key configuration

4. Configure Langfuse in Dify. Open the application you need to monitor, open **Monitoring** in the side menu, and select **Tracing app performance** on the page. -

Configure Langfuse

+

Configure Langfuse

After clicking configure, paste the **Secret Key, Public Key, Host** created in Langfuse into the configuration and save. -

Configure Langfuse

+

Configure Langfuse

Once successfully saved, you can view the status on the current page. If it shows as started, it is being monitored. -

View configuration status

+

View configuration status

*** @@ -51,9 +51,9 @@ Once successfully saved, you can view the status on the current page. If it show After configuration, debugging or production data of the application in Dify can be viewed in Langfuse. -

Debugging Applications in Dify

+

Debugging Applications in Dify

-

Viewing application data in Langfuse

+

Viewing application data in Langfuse

*** diff --git a/en/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md b/en/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md index 822b3aee3..2becea10f 100644 --- a/en/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md +++ b/en/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md @@ -18,39 +18,39 @@ For more details, please refer to [LangSmith](https://www.langchain.com/langsmit Create a project in LangSmith. After logging in, click **New Project** on the homepage to create your own project. The **project** will be used to associate with **applications** in Dify for data monitoring. -

Create a project in LangSmith

+

Create a project in LangSmith

Once created, you can view all created projects in the Projects section. -

View created projects in LangSmith

+

View created projects in LangSmith

#### 3. Create Project Credentials Find the project settings **Settings** in the left sidebar. -

Project settings

+

Project settings

Click **Create API Key** to create project credentials. -

Create a project API Key

+

Create a project API Key

Select **Personal Access Token** for subsequent API authentication. -

Create an API Key

+

Create an API Key

Copy and save the created API key. -

Copy API Key

+

Copy API Key

#### 4. Integrating LangSmith with Dify Configure LangSmith in the Dify application. Open the application you need to monitor, open **Monitoring** in the side menu, and select **Tracing app performance** on the page. -

Tracing app performance

+

Tracing app performance

After clicking configure, paste the **API Key** and **project name** created in LangSmith into the configuration and save. -

Configure LangSmith

+

Configure LangSmith

{% hint style="info" %} The configured project name needs to match the project set in LangSmith. If the project names do not match, LangSmith will automatically create a new project during data synchronization. @@ -58,21 +58,21 @@ The configured project name needs to match the project set in LangSmith. If the Once successfully saved, you can view the monitoring status on the current page. -

View configuration status

+

View configuration status

### Viewing Monitoring Data in LangSmith Once configured, the debug or production data from applications within Dify can be monitored in LangSmith. -

Debugging Applications in Dify

+

Debugging Applications in Dify

When you switch to LangSmith, you can view detailed operation logs of Dify applications in the dashboard. -

Viewing application data in LangSmith

+

Viewing application data in LangSmith

Detailed LLM operation logs through LangSmith will help you optimize the performance of your Dify application. -

Viewing application data in LangSmith

+

Viewing application data in LangSmith

### Monitoring Data List diff --git a/en/guides/tools/quick-tool-integration.md b/en/guides/tools/quick-tool-integration.md index d0d7aef20..03d6d7edd 100644 --- a/en/guides/tools/quick-tool-integration.md +++ b/en/guides/tools/quick-tool-integration.md @@ -275,4 +275,4 @@ After the above steps are completed, we can see this tool on the frontend, and i Of course, because google\_search needs a credential, before using it, you also need to input your credentials on the frontend. -
+
diff --git a/en/guides/tools/tool-configuration/bing.md b/en/guides/tools/tool-configuration/bing.md index 2f95fd2fa..aad3f5b9f 100644 --- a/en/guides/tools/tool-configuration/bing.md +++ b/en/guides/tools/tool-configuration/bing.md @@ -12,7 +12,7 @@ Please apply for an API Key on the [Azure platform](https://www.microsoft.com/en In the Dify navigation page, click `Tools > Azure > Authorize` to fill in the API Key. -![](../../../.gitbook/assets/tools-bing.png) +![](https://assets-docs.dify.ai/img/en/tool-configuration/6a4dfdcb1871100bc810ae5f4c05f808.webp) ## 3. Use the tool diff --git a/en/guides/tools/tool-configuration/dall-e.md b/en/guides/tools/tool-configuration/dall-e.md index 9cf1b0571..54cd9569b 100644 --- a/en/guides/tools/tool-configuration/dall-e.md +++ b/en/guides/tools/tool-configuration/dall-e.md @@ -12,7 +12,7 @@ Please apply for an API Key at [OpenAI Platform](https://platform.openai.com/), In the Dify navigation page, click `Tools > DALL-E > Authorize` and fill in the API Key. -![](../../../.gitbook/assets/tools-dalle.png) +![](https://assets-docs.dify.ai/img/en/tool-configuration/3fe0eb51cfc75f0b6facb518d5e789a5.webp) ## 3. Use the tool diff --git a/en/guides/tools/tool-configuration/google.md b/en/guides/tools/tool-configuration/google.md index 66cc96e01..9b542e610 100644 --- a/en/guides/tools/tool-configuration/google.md +++ b/en/guides/tools/tool-configuration/google.md @@ -12,7 +12,7 @@ Please apply for an API Key on the [Serp](https://serpapi.com/dashboard). In the Dify navigation page, click `Tools > Google > Go to authorize` to fill in the API Key. -![](../../../.gitbook/assets/tools-google.png) +![](https://assets-docs.dify.ai/img/en/tool-configuration/f626c043fe814f971eaf630cf56442fa.webp) ## 3. Using the tool diff --git a/en/guides/tools/tool-configuration/perplexity.md b/en/guides/tools/tool-configuration/perplexity.md index 6f94656d8..e0c211099 100644 --- a/en/guides/tools/tool-configuration/perplexity.md +++ b/en/guides/tools/tool-configuration/perplexity.md @@ -12,7 +12,7 @@ Please apply for an API Key at [Perplexity](https://www.perplexity.ai/settings/a In the Dify navigation page, click on `Tools > Perplexity > Go to authorize` to fill in the API Key. -![](../../../.gitbook/assets/tools-perplexity.png) +![](https://assets-docs.dify.ai/img/en/tool-configuration/001626f39cbf672dc4661ad24fedd122.webp) ## 3. Using the tool @@ -22,10 +22,10 @@ You can use the Perplexity Search tool in the following application types. Both Chatflow and Workflow applications support adding Perplexity tool nodes. Pass the user's input content through variables to the "Query" box in the Perplexity tool node, adjust the built-in parameters of the Perplexity tool as needed, and finally select the output content of the Perplexity tool node in the response box of the "End" node. -![](../../../.gitbook/assets/tools-chatflow-perplexity.png) +![](https://assets-docs.dify.ai/img/en/tool-configuration/e2f98fdd5be7103f5552eb41d0e62c8b.webp) * **Agent applications** Add the `Perplexity Search` tool in the Agent application, then enter relevant commands to invoke this tool. -![](../../../.gitbook/assets/tools-agent-perplexity.png) +![](https://assets-docs.dify.ai/img/en/tool-configuration/f7a8a875bedc13091ad297a2b91e3a2b.webp) diff --git a/en/guides/tools/tool-configuration/searchapi.md b/en/guides/tools/tool-configuration/searchapi.md index 00dc2b123..b1d282a77 100644 --- a/en/guides/tools/tool-configuration/searchapi.md +++ b/en/guides/tools/tool-configuration/searchapi.md @@ -12,7 +12,7 @@ Please apply for an API Key at [SearchApi](https://www.searchapi.io/). In the Dify navigation page, click on `Tools > SearchApi > Go to authorize` to fill in the API Key. -![](../../../.gitbook/assets/tool-searchapi.png) +![](https://assets-docs.dify.ai/img/en/tool-configuration/368c00090eac4865d152f0fde2073789.webp) ## 3. Using the tool @@ -22,7 +22,7 @@ You can use the SearchApi tool in the following application types. Both Chatflow and Workflow applications support adding `SearchApi` series tool nodes, providing four tools: Google Jobs API, Google News API, Google Search API, and YouTube Scraper API. -![](../../../.gitbook/assets/tool-searchapi-flow.png) +![](https://assets-docs.dify.ai/img/en/tool-configuration/5c387872fdc5ab89d88d8b44a1bf6b31.webp) * **Agent applications** diff --git a/en/guides/tools/tool-configuration/serper.md b/en/guides/tools/tool-configuration/serper.md index 718828c70..a558835e0 100644 --- a/en/guides/tools/tool-configuration/serper.md +++ b/en/guides/tools/tool-configuration/serper.md @@ -12,7 +12,7 @@ Please apply for an API Key on the [Serper platform](https://serper.dev/signup). In the Dify navigation page, click `Tools > Serper > Authorize` to fill in the API Key. -![](../../../.gitbook/assets/tool-serper.png) +![](https://assets-docs.dify.ai/img/en/tool-configuration/e4f9d3a9dda467a905e7887d0e2c514b.webp) ## 3. Using the tool diff --git a/en/guides/tools/tool-configuration/siliconflow.md b/en/guides/tools/tool-configuration/siliconflow.md index d43da3367..24737eb46 100644 --- a/en/guides/tools/tool-configuration/siliconflow.md +++ b/en/guides/tools/tool-configuration/siliconflow.md @@ -12,7 +12,7 @@ Create a new API Key on the [SiliconCloud API management page](https://cloud.sil In the Dify tool page, click on `SiliconCloud > To Authorize` and fill in the API Key. -
+
## 3. Using the Tool @@ -20,12 +20,12 @@ In the Dify tool page, click on `SiliconCloud > To Authorize` and fill in the AP Chatflow and Workflow applications both support adding `SiliconFlow` tool nodes. You can pass user input content to the SiliconFlow tool node's "prompt" and "negative prompt" boxes through [variables](https://docs.dify.ai/v/zh-hans/guides/workflow/variables), adjust the built-in parameters as needed, and finally select the output content (text, images, etc.) of the SiliconFlow tool node in the "end" node's reply box. -
+
* **Agent Application** In the Agent application, add the `Stable Diffusion` or `Flux` tool, and then send a picture description in the conversation box to call the tool to generate images. -
+
-
+
diff --git a/en/guides/workflow/README.md b/en/guides/workflow/README.md index b5ea838d3..0b4920f37 100644 --- a/en/guides/workflow/README.md +++ b/en/guides/workflow/README.md @@ -9,7 +9,7 @@ Dify workflows are divided into two types: * **Chatflow**: Designed for conversational scenarios, including customer service, semantic search, and other conversational applications that require multi-step logic in response construction. * **Workflow**: Geared towards automation and batch processing scenarios, suitable for high-quality translation, data analysis, content generation, email automation, and more. -
+
To address the complexity of user intent recognition in natural language input, Chatflow provides question understanding nodes. Compared to Workflow, it adds support for Chatbot features such as conversation history (Memory), annotated replies, and Answer nodes. diff --git a/en/guides/workflow/additional-features.md b/en/guides/workflow/additional-features.md index bd0657fac..8c01e60d6 100644 --- a/en/guides/workflow/additional-features.md +++ b/en/guides/workflow/additional-features.md @@ -55,7 +55,7 @@ This section will mainly introduce the specific usage of the **File Upload** fea **For application users:** Chatflow applications with file upload enabled will display a "paperclip" icon on the right side of the dialogue box. Click it to upload files and interact with the LLM. -

Upload file

+

Upload file

**For application developers:** @@ -84,7 +84,7 @@ The orchestration steps are as follows: 2. Add an LLM node, enable the VISION feature, and select the `sys.files` variable. 3. Add a "Answer" node at the end, filling in the output variable of the LLM node. -

Enable vision

+

Enable vision

* **Mixed File Types** @@ -97,7 +97,7 @@ If you want the application to have the ability to process both document files a After the application user uploads both document files and images, document files are automatically diverted to the document extractor node, and image files are automatically diverted to the LLM node to achieve joint processing of files. -

Mixed File Types

+

Mixed File Types

* **Audio and Video Files** diff --git a/en/guides/workflow/bulletin.md b/en/guides/workflow/bulletin.md index 2ae823dbe..f52932a7c 100644 --- a/en/guides/workflow/bulletin.md +++ b/en/guides/workflow/bulletin.md @@ -4,11 +4,11 @@ The image upload feature has been integrated into the more comprehensive [File U * The image upload option in Chatflow’s “Features” has been removed and replaced by the new “File Upload” feature. Within the “File Upload” feature, you can select the image file type. Additionally, the image upload icon in the application dialog has been replaced with a file upload icon. -
+
* The image upload option in Workflow’s “Features” and the `sys.files` [variable](variables.md) will be deprecated in the future. Both have been marked as `LEGACY`, and developers are encouraged to use custom file variables to add file upload functionality to Workflow applications. -
+
### Why Replace the “Image Upload” Feature? @@ -25,7 +25,7 @@ To enhance the information processing capabilities of your applications, we have * The file upload feature allows files to be uploaded, parsed, referenced, and downloaded as file variables within Workflow applications. * Developers can now easily build applications capable of understanding and processing complex tasks involving images, audio, and video. -
+
We no longer recommend using the standalone “Image Upload” feature and instead suggest transitioning to the more comprehensive “File Upload” feature to improve the application experience. @@ -38,11 +38,11 @@ We no longer recommend using the standalone “Image Upload” feature and inste If you have already created Chatflow applications with the “Image Upload” feature enabled and activated the Vision feature in the LLM node, the system will automatically switch the feature, and it will not affect the application’s image upload capability. If you need to update and republish the application, select the file variable in the Vision variable selection box of the LLM node, clear the item from the checklist, and republish the application.\ -
+
If you wish to add the “Image Upload” feature to a Chatflow application, enable “File Upload” in the features and select only the “image” file type. Then enable the Vision feature in the LLM node and specify the sys.files variable. The upload entry will appear as a “paperclip” icon. For detailed instructions, refer to [Additional Features](additional-features.md). -
+
* **Workflow Applications** diff --git a/en/guides/workflow/debug-and-preview/checklist.md b/en/guides/workflow/debug-and-preview/checklist.md index c5039ffe3..2a757ed2b 100644 --- a/en/guides/workflow/debug-and-preview/checklist.md +++ b/en/guides/workflow/debug-and-preview/checklist.md @@ -2,4 +2,4 @@ Before publishing the App, you can check the checklist to see if there are any nodes with incomplete configurations or that have not been connected. -
+
diff --git a/en/guides/workflow/debug-and-preview/history.md b/en/guides/workflow/debug-and-preview/history.md index 7bd9a8273..a06a4c602 100644 --- a/en/guides/workflow/debug-and-preview/history.md +++ b/en/guides/workflow/debug-and-preview/history.md @@ -2,4 +2,4 @@ In the "Run History," you can view the run results and log information from the historical debugging of the current workflow. -
+
diff --git a/en/guides/workflow/debug-and-preview/log.md b/en/guides/workflow/debug-and-preview/log.md index e98aa849a..202a98fb8 100644 --- a/en/guides/workflow/debug-and-preview/log.md +++ b/en/guides/workflow/debug-and-preview/log.md @@ -4,4 +4,4 @@ Clicking **"Run History - View Log — Details"** allows you to see a comprehens This detailed information enables you to review various aspects of each node throughout the complete execution process of the workflow. You can examine inputs and outputs, analyze token consumption, evaluate runtime duration, and assess other pertinent metrics. -
+
diff --git a/en/guides/workflow/debug-and-preview/step-run.md b/en/guides/workflow/debug-and-preview/step-run.md index a6fc85079..b9e9e2d5e 100644 --- a/en/guides/workflow/debug-and-preview/step-run.md +++ b/en/guides/workflow/debug-and-preview/step-run.md @@ -2,8 +2,8 @@ Workflow supports step-by-step debugging of nodes, where you can repetitively test whether the execution of the current node meets expectations. -
+
After running a step test, you can review the execution status, input/output, and metadata information. -
+
diff --git a/en/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md b/en/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md index 0a210aded..479c8481e 100644 --- a/en/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md +++ b/en/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md @@ -2,10 +2,10 @@ Dify Workflow offers a comprehensive set of execution and debugging features. In conversational applications, clicking "Preview" enters debugging mode. -
+
In workflow applications, clicking "Run" enters debugging mode. -
+
Once in debugging mode, you can debug the configured workflow using the interface on the right side of the screen. diff --git a/en/guides/workflow/file-upload.md b/en/guides/workflow/file-upload.md index 649282382..9b261922a 100644 --- a/en/guides/workflow/file-upload.md +++ b/en/guides/workflow/file-upload.md @@ -68,7 +68,7 @@ Some LLMs, such as [Claude 3.5 Sonnet](https://docs.anthropic.com/en/docs/build- 1. Click the **"Features"** button in the upper right corner of the Chatflow application to add more functionality to the application. After enabling this feature, application users can upload and update files at any time during the application dialogue. A maximum of 10 files can be uploaded simultaneously, with a size limit of 15MB per file. -

file upload

+

file upload

Enabling this feature does not grant LLMs the ability to directly read files. A **Document Extractor** is still needed to parse documents into text for LLM comprehension. @@ -79,11 +79,11 @@ Enabling this feature does not grant LLMs the ability to directly read files. A 3. Add an LLM node and select the output variable of the Document Extractor node in the system prompt. 4. Add an "Answer" node at the end, filling in the output variable of the LLM node. -
+
Once enabled, users can upload files and engage in conversations in the dialogue box. However, with this method, the LLM application does not have the ability to remember file contents, and files need to be uploaded for each conversation. -
+
If you want the LLM to remember file contents during conversations, please refer to Method 3. @@ -125,11 +125,11 @@ After uploading, files are stored in single file variables, which LLMs cannot di Use the file variable from the "Start" node as the input variable for the **"Document Extractor"** node. -

Document Extractor

+

Document Extractor

Fill in the output variable of the "Document Extractor" node in the system prompt of the LLM node. -
+
After completing these settings, application users can paste file URLs or upload local files in the WebApp, then interact with the LLM about the document content. Users can replace files at any time during the conversation, and the LLM will obtain the latest file content. @@ -143,7 +143,7 @@ For certain file types (such as images), file variables can be directly used wit Below is an example configuration: -

Using file variables directly in LLM node

+

Using file variables directly in LLM node

It's important to note that when directly using file variables in LLM node, the developers need to ensure that the file variable contains only image files; otherwise, errors may occur. If users might upload different types of files, we need to use list operator node for filtering files. @@ -151,7 +151,7 @@ It's important to note that when directly using file variables in LLM node, the Placing file variables in answer nodes or end nodes will provide a file download card in the conversation box when the application reaches that node. Clicking the card allows for file download. -

file download

+

file download

## Advanced Usage diff --git a/en/guides/workflow/node/agent.md b/en/guides/workflow/node/agent.md index f0a91ddd1..74067114c 100644 --- a/en/guides/workflow/node/agent.md +++ b/en/guides/workflow/node/agent.md @@ -10,17 +10,17 @@ An Agent Node is a component in Dify Chatflow/Workflow that enables autonomous t In the Dify Chatflow/Workflow editor, drag the Agent node from the components panel onto the canvas. -
+
### Select an Agent Strategy In the node configuration panel, click Agent Strategy. -
+
From the dropdown menu, select the desired Agent reasoning strategy. Dify provides two built-in strategies, **Function Calling and ReAct**, which can be installed from the **Marketplace → Agent Strategies category**. -
+
#### 1. Function Calling @@ -34,7 +34,7 @@ Pros: **• Structured output:** The model outputs structured information about function calls, facilitating processing by downstream nodes. -
+
#### 2. ReAct (Reason + Act) @@ -48,7 +48,7 @@ Pros: **• Wide applicability:** Suitable for scenarios that require external knowledge or need to perform specific actions, such as Q\&A, information retrieval, and task execution. -
+
Developers can contribute Agent strategy plugins to the public [repository](https://github.com/langgenius/dify-plugins). After review, these plugins will be listed in the Marketplace for others to install. @@ -66,10 +66,10 @@ After choosing the Agent strategy, the configuration panel will display the rele 5. **Maximum Iterations:** Set the maximum number of execution steps for the Agent. 6. **Output Variables:** Indicates the data structure output by the node. -
+
## Logs During execution, the Agent node generates detailed logs. You can see overall node execution information—including inputs and outputs, token usage, time spent, and status. Click Details to view the output from each round of Agent strategy execution. -
+
diff --git a/en/guides/workflow/node/answer.md b/en/guides/workflow/node/answer.md index d0c545e74..0c3f5b573 100644 --- a/en/guides/workflow/node/answer.md +++ b/en/guides/workflow/node/answer.md @@ -10,10 +10,10 @@ Answer node can be seamlessly integrated at any point to dynamically deliver con Example 1: Output plain text. -
+
Example 2: Output image and LLM reply. -
+
-
+
diff --git a/en/guides/workflow/node/code.md b/en/guides/workflow/node/code.md index dd48fc01e..868f03d57 100644 --- a/en/guides/workflow/node/code.md +++ b/en/guides/workflow/node/code.md @@ -13,7 +13,7 @@ The code node supports running Python/NodeJS code to perform data transformation This node significantly enhances the flexibility for developers, allowing them to embed custom Python or JavaScript scripts within the workflow and manipulate variables in ways that preset nodes cannot achieve. Through configuration options, you can specify the required input and output variables and write the corresponding execution code: -
+
## Configuration diff --git a/en/guides/workflow/node/doc-extractor.md b/en/guides/workflow/node/doc-extractor.md index f934365d3..40971c3e8 100644 --- a/en/guides/workflow/node/doc-extractor.md +++ b/en/guides/workflow/node/doc-extractor.md @@ -13,7 +13,7 @@ LLMs cannot directly read or interpret document contents. Therefore, it's necess The document extractor node can be understood as an information processing center. It recognizes and reads files in the input variables, extracts information, and converts it into string-type output variables for downstream nodes to call. -

doc extractor

+

doc extractor

The document extractor node structure is divided into input variables and output variables. @@ -41,7 +41,7 @@ In a typical file interaction Q\&A scenario, the document extractor can serve as This section will introduce the usage of the document extractor node through a typical ChatPDF example workflow template. -

Chatpdf workflow

+

Chatpdf workflow

**Configuration Process:** @@ -49,11 +49,11 @@ This section will introduce the usage of the document extractor node through a t 2. Add a document extractor node and select the `pdf` variable in the input variables. 3. Add an LLM node and select the output variable of the document extractor node in the system prompt. The LLM can read the contents of the file through this output variable. -
+
Configure the end node by selecting the output variable of the LLM node in the end node. -

chat with pdf

+

chat with pdf

After configuration, the application will have file upload functionality, allowing users to upload PDF files and engage in conversation. diff --git a/en/guides/workflow/node/end.md b/en/guides/workflow/node/end.md index ff2750853..d027b329c 100644 --- a/en/guides/workflow/node/end.md +++ b/en/guides/workflow/node/end.md @@ -18,12 +18,12 @@ End nodes are not supported within Chatflow. In the following [long story generation workflow](iteration.md#example-2-long-article-iterative-generation-another-scheduling-method), the variable `Output` declared by the end node is the output of the upstream code node. This means the workflow will end after the Code node completes execution and will output the execution result of Code. -

End Node - Long Story Generation Example

+

End Node - Long Story Generation Example

**Single Path Execution Example:** -
+
**Multi-Path Execution Example:** -
+
diff --git a/en/guides/workflow/node/http-request.md b/en/guides/workflow/node/http-request.md index 16f07f053..0078edc7c 100644 --- a/en/guides/workflow/node/http-request.md +++ b/en/guides/workflow/node/http-request.md @@ -15,7 +15,7 @@ This node supports common HTTP request methods: You can configure various aspects of the HTTP request, including URL, request headers, query parameters, request body content, and authentication information. -

HTTP Request Configuration

+

HTTP Request Configuration

*** @@ -25,7 +25,7 @@ You can configure various aspects of the HTTP request, including URL, request he One practical feature of this node is the ability to dynamically insert variables into different parts of the request based on the scenario. For example, when handling customer feedback requests, you can embed variables such as username or customer ID, feedback content, etc., into the request to customize automated reply messages or fetch specific customer information and send related resources to a designated server. -

Customer Feedback Classification

+

Customer Feedback Classification

The return values of an HTTP request include the response body, status code, response headers, and files. Notably, if the response contains a file, this node can automatically save the file for use in subsequent steps of the workflow. This design not only improves processing efficiency but also makes handling responses with files straightforward and direct. @@ -37,7 +37,7 @@ Example: Suppose you are developing a document management application and need t Here is a configuration example: -

http-node-send-file

+

http-node-send-file

### Advanced Features diff --git a/en/guides/workflow/node/ifelse.md b/en/guides/workflow/node/ifelse.md index bca4a2dd3..3b9e6f206 100644 --- a/en/guides/workflow/node/ifelse.md +++ b/en/guides/workflow/node/ifelse.md @@ -27,7 +27,7 @@ A conditional branching node has three parts: ### Scenario -
+
Taking the above **Text Summary Workflow** as an example: @@ -41,4 +41,4 @@ Taking the above **Text Summary Workflow** as an example: For complex condition judgments, you can set multiple condition judgments and configure **AND** or **OR** between conditions to take the **intersection** or **union** of the conditions, respectively. -

Multiple Condition Judgments

+

Multiple Condition Judgments

diff --git a/en/guides/workflow/node/iteration.md b/en/guides/workflow/node/iteration.md index 522985cb1..7ace31051 100644 --- a/en/guides/workflow/node/iteration.md +++ b/en/guides/workflow/node/iteration.md @@ -26,7 +26,7 @@ An iteration node consists of three core components: **Input Variables**, **Iter #### **Example 1: Long Article Iteration Generator** -

Long Story Generator

+

Long Story Generator

1. Enter the story title and outline in the **Start Node**. 2. Use a **Generate Subtitles and Outlines Node** to use LLM to generate the complete content from user input. @@ -38,15 +38,15 @@ An iteration node consists of three core components: **Input Variables**, **Iter 1. Configure the story title (title) and outline (outline) in the **Start Node**. -

Start Node Configuration

+

Start Node Configuration

2. Use a **Generate Subtitles and Outlines Node** to convert the story title and outline into complete text. -

Template Node

+

Template Node

3. Use a **Extract Subtitles and Outlines Node** to convert the story text into an array (Array) structure. The parameter to extract is `sections`, and the parameter type is `Array[Object]`. -

Parameter Extraction

+

Parameter Extraction

{% hint style="info" %} The effectiveness of parameter extraction is influenced by the model's inference capability and the instructions given. Using a model with stronger inference capabilities and adding examples in the **instructions** can improve the parameter extraction results. @@ -54,11 +54,11 @@ The effectiveness of parameter extraction is influenced by the model's inference 4. Use the array-formatted story outline as the input for the iteration node and process it within the iteration node using an **LLM Node**. -

Configure Iteration Node

+

Configure Iteration Node

Configure the input variables `GenerateOverallOutline/output` and `Iteration/item` in the LLM Node. -

Configure LLM Node

+

Configure LLM Node

{% hint style="info" %} Built-in variables for iteration: `items[object]` and `index[number]`. @@ -70,15 +70,15 @@ Built-in variables for iteration: `items[object]` and `index[number]`. 5. Configure a **Direct Reply Node** inside the iteration node to achieve streaming output after each iteration. -

Configure Answer Node

+

Configure Answer Node

6. Complete debugging and preview. -

Generate by Iterating Through Story Chapters

+

Generate by Iterating Through Story Chapters

#### **Example 2: Long Article Iteration Generator (Another Arrangement)** -
+
* Enter the story title and outline in the **Start Node**. * Use an **LLM Node** to generate subheadings and corresponding content for the article. @@ -135,11 +135,11 @@ Array variables can be generated via the following nodes as iteration node input * [Code Node](code.md) -

Parameter Extraction

+

Parameter Extraction

* [Parameter Extraction](parameter-extractor.md) -

Parameter Extraction

+

Parameter Extraction

* [Knowledge Base Retrieval](knowledge-retrieval.md) * [Iteration](iteration.md) @@ -154,7 +154,7 @@ The output variable of the iteration node is in array format and cannot be direc **Convert Using a Code Node** -

Code Node Conversion

+

Code Node Conversion

CODE Example: @@ -168,7 +168,7 @@ def main(articleSections: list): **Convert Using a Template Node** -

Template Node Conversion

+

Template Node Conversion

CODE Example: diff --git a/en/guides/workflow/node/knowledge-retrieval.md b/en/guides/workflow/node/knowledge-retrieval.md index 81f895770..66ac76fcc 100644 --- a/en/guides/workflow/node/knowledge-retrieval.md +++ b/en/guides/workflow/node/knowledge-retrieval.md @@ -2,7 +2,7 @@ The Knowledge Base Retrieval Node is designed to query text content related to user questions from the Dify Knowledge Base, which can then be used as context for subsequent answers by the Large Language Model (LLM). -
+
Configuring the Knowledge Base Retrieval Node involves three main steps: @@ -22,8 +22,8 @@ Within the knowledge base retrieval node, you can add an existing knowledge base It's possible to modify the indexing strategy and retrieval mode for an individual knowledge base within the node. For a detailed explanation of these settings, refer to the knowledge base [help documentation](https://docs.dify.ai/guides/knowledge-base/retrieval-test-and-citation). -
+
Dify offers two recall strategies for different knowledge base retrieval scenarios: "N-to-1 Recall" and "Multi-way Recall". In the N-to-1 mode, knowledge base queries are executed through function calling, requiring the selection of a system reasoning model. In the multi-way recall mode, a Rerank model needs to be configured for result re-ranking. For a detailed explanation of these two recall strategies, refer to the retrieval mode explanation in the [help documentation](https://docs.dify.ai/guides/knowledge-base/create-knowledge-and-upload-documents#id-5-indexing-methods). -
+
diff --git a/en/guides/workflow/node/list-operator.md b/en/guides/workflow/node/list-operator.md index 6784d0ad6..eef8c9bc5 100644 --- a/en/guides/workflow/node/list-operator.md +++ b/en/guides/workflow/node/list-operator.md @@ -10,11 +10,11 @@ The list operator can filter and extract attributes such as file format type, fi For example, in an application that allows users to upload both document files and image files simultaneously, different files need to be sorted through the **list operation node**, with different files being handled by different processes. -
+
List operation nodes are generally used to extract information from array variables, converting them into variable types that can be accepted by downstream nodes through setting conditions. Its structure is divided into input variables, filter conditions, sorting, taking the first N items, and output variables. -
+
**Input Variables** @@ -72,6 +72,6 @@ In file interaction Q\&A scenarios, application users may upload document files 3. Extract document file variables and pass them to the "Doc Extractor" node; extract image file variables and pass them to the "LLM" node. 4. Add a "Answer" node at the end, filling in the output variable of the LLM node. -
+
After the application user uploads both document files and images, document files are automatically diverted to the doc extractor node, and image files are automatically diverted to the LLM node to achieve joint processing of mixed files. diff --git a/en/guides/workflow/node/llm.md b/en/guides/workflow/node/llm.md index c5b6c69d8..ad9fb3bf4 100644 --- a/en/guides/workflow/node/llm.md +++ b/en/guides/workflow/node/llm.md @@ -4,7 +4,7 @@ Invokes the capabilities of large language models to process information input by users in the "Start" node (natural language, uploaded files, or images) and provide effective response information. -

LLM Node

+

LLM Node

*** @@ -27,7 +27,7 @@ By selecting the appropriate model and writing prompts, you can build powerful a ### How to Configure -

LLM Node Configuration - Model Selection

+

LLM Node Configuration - Model Selection

**Configuration Steps:** @@ -48,11 +48,11 @@ In the LLM node, you can customize the model input prompts. If you select a chat If you're struggling to come up with effective system prompts (System), you can use the Prompt Generator to quickly create prompts suitable for your specific business scenarios, leveraging AI capabilities. -
+
In the prompt editor, you can call out the **variable insertion menu** by typing `/` or `{` to insert **special variable blocks** or **upstream node variables** into the prompt as context content. -

Calling Out the Variable Insertion Menu

+

Calling Out the Variable Insertion Menu

*** @@ -62,7 +62,7 @@ In the prompt editor, you can call out the **variable insertion menu** by typing Context variables are a special type of variable defined within the LLM node, used to insert externally retrieved text content into the prompt. -

Context Variables

+

Context Variables

In common knowledge base Q\&A applications, the downstream node of knowledge retrieval is typically the LLM node. The **output variable** `result` of knowledge retrieval needs to be configured in the **context variable** within the LLM node for association and assignment. After association, inserting the **context variable** at the appropriate position in the prompt can incorporate the externally retrieved knowledge into the prompt. @@ -88,13 +88,13 @@ To achieve conversational memory in text completion models (e.g., gpt-3.5-turbo- The conversation history variable is not widely used and can only be inserted when selecting text completion models in Chatflow. {% endhint %} -

Inserting Conversation History Variable

+

Inserting Conversation History Variable

**Model Parameters** The parameters of the model affect the output of the model. Different models have different parameters. The following figure shows the parameter list for `gpt-4`. -
+
The main parameter terms are explained as follows: @@ -108,7 +108,7 @@ The main parameter terms are explained as follows: If you do not understand what these parameters are, you can choose to load presets and select from the three presets: Creative, Balanced, and Precise. -
+
*** @@ -143,7 +143,7 @@ To enable workflow applications to read "[Knowledge Base](../../knowledge-base/) 2. Fill in the **output variable** `result` of the knowledge retrieval node into the **context variable** of the LLM node; 3. Insert the **context variable** into the application prompt to give the LLM the ability to read text within the knowledge base. -
+
The `result` variable output by the Knowledge Retrieval Node also includes segmented reference information. You can view the source of information through the **Citation and Attribution** feature. @@ -161,7 +161,7 @@ To enable workflow applications to read document contents, such as building a Ch For more information, please refer to [File Upload](../file-upload.md). -

input system prompts

+

input system prompts

* **Error Handling** diff --git a/en/guides/workflow/node/parameter-extractor.md b/en/guides/workflow/node/parameter-extractor.md index 3d7030b49..4f9e753d0 100644 --- a/en/guides/workflow/node/parameter-extractor.md +++ b/en/guides/workflow/node/parameter-extractor.md @@ -16,11 +16,11 @@ Some nodes within the workflow require specific data formats as inputs, such as In this example: The Arxiv paper retrieval tool requires **paper author** or **paper ID** as input parameters. The parameter extractor extracts the paper ID **2405.10739** from the query "What is the content of this paper: 2405.10739" and uses it as the tool parameter for precise querying. -

Arxiv Paper Retrieval Tool

+

Arxiv Paper Retrieval Tool

2. **Converting text to structured data**, such as in the long story iteration generation application, where it serves as a pre-step for the [iteration node](iteration.md), converting chapter content in text format to an array format, facilitating multi-round generation processing by the iteration node. -
+
1. **Extracting structured data and using the** [**HTTP Request**](https://docs.dify.ai/guides/workflow/node/http-request), which can request any accessible URL, suitable for obtaining external retrieval results, webhooks, generating images, and other scenarios. diff --git a/en/guides/workflow/node/question-classifier.md b/en/guides/workflow/node/question-classifier.md index 67168e2e8..614fae1f3 100644 --- a/en/guides/workflow/node/question-classifier.md +++ b/en/guides/workflow/node/question-classifier.md @@ -14,7 +14,7 @@ In a typical product customer service Q\&A scenario, the issue classifier can se The following diagram is an example workflow template for a product customer service scenario: -
+
In this scenario, we set up three classification labels/descriptions: @@ -32,7 +32,7 @@ When users input different questions, the issue classifier will automatically cl ### 3. How to Configure -
+
**Configuration Steps:** diff --git a/en/guides/workflow/node/start.md b/en/guides/workflow/node/start.md index 775c8db81..924771164 100644 --- a/en/guides/workflow/node/start.md +++ b/en/guides/workflow/node/start.md @@ -8,7 +8,7 @@ The **“Start”** node is a critical preset node in the Chatflow / Workflow ap On the Start node's settings page, you'll find two sections: **"Input Fields"** and preset **System Variables**. -

Chatflow and Workflow

+

Chatflow and Workflow

#### Input Field diff --git a/en/guides/workflow/node/template.md b/en/guides/workflow/node/template.md index 1f1d1bd4a..233e50873 100644 --- a/en/guides/workflow/node/template.md +++ b/en/guides/workflow/node/template.md @@ -2,7 +2,7 @@ Template lets you dynamically format and combine variables from previous nodes into a single text-based output using Jinja2, a powerful templating syntax for Python. It's useful for combining data from multiple sources into a specific structure required by subsequent nodes. The simple example below shows how to assemble an article by piecing together various previous outputs: -
+
Beyond naive use cases, you can create more complex templates as per Jinja's [documentation](https://jinja.palletsprojects.com/en/3.1.x/templates/) for a variety of tasks. Here's one template that structures retrieved chunks and their relevant metadata from a knowledge retrieval node into a formatted markdown: @@ -22,7 +22,7 @@ Beyond naive use cases, you can create more complex templates as per Jinja's [do {% endraw %} ``` -
+
This template node can then be used within a Chatflow to return intermediate outputs to the end user, before a LLM response is initiated. diff --git a/en/guides/workflow/node/tools.md b/en/guides/workflow/node/tools.md index 720511337..5bea4a345 100644 --- a/en/guides/workflow/node/tools.md +++ b/en/guides/workflow/node/tools.md @@ -14,9 +14,9 @@ If built-in tools do not meet your needs, you can create custom tools in the **D You can also orchestrate a more complex workflow and publish it as a tool. -

Tool Selection

+

Tool Selection

-

Configuring Google Search Tool to Retrieve External Knowledge

+

Configuring Google Search Tool to Retrieve External Knowledge

Configuring a tool node generally involves two steps: diff --git a/en/guides/workflow/node/variable-aggregator.md b/en/guides/workflow/node/variable-aggregator.md index f5538ee3b..f2400b1c3 100644 --- a/en/guides/workflow/node/variable-aggregator.md +++ b/en/guides/workflow/node/variable-aggregator.md @@ -16,15 +16,15 @@ Through variable aggregation, you can aggregate multiple outputs, such as from i Without variable aggregation, the branches of Classification 1 and Classification 2, after different knowledge base retrievals, would require repeated definitions for downstream LLM and direct response nodes. -

Issue Classification (without Variable Aggregation)

+

Issue Classification (without Variable Aggregation)

By adding variable aggregation, the outputs of the two knowledge retrieval nodes can be aggregated into a single variable. -

Multi-Branch Aggregation after Issue Classification

+

Multi-Branch Aggregation after Issue Classification

**Multi-Branch Aggregation after IF/ELSE Conditional Branching** -

Multi-Branch Aggregation after Conditional Branching

+

Multi-Branch Aggregation after Conditional Branching

### 3 Format Requirements diff --git a/en/guides/workflow/node/variable-assigner.md b/en/guides/workflow/node/variable-assigner.md index a1ab23795..40e5544c8 100644 --- a/en/guides/workflow/node/variable-assigner.md +++ b/en/guides/workflow/node/variable-assigner.md @@ -22,7 +22,7 @@ Using the variable assigner node, you can write context from the conversation pr Example: After the conversation starts, LLM will automatically determine whether the user's input contains facts, preferences, or chat history that need to be remembered. If it has, LLM will first extract and store those information, then use it as context to respond. If there is no new information to remember, LLM will directly use the previously relevant memories to answer questions. -![](../../../.gitbook/assets/conversation-variables-scenario-1.png) +![](https://assets-docs.dify.ai/img/en/node/1f41330dd5e9569b8e2b745daa0ed686.webp) **Configuration process:** @@ -108,7 +108,7 @@ def main(arg1: list) -> str: Example: Before the chatting, the user specifies "English" in the `language` input box. This language will be written to the conversation variable, and the LLM will reference this information when responding, continuing to use "English" in subsequent conversations. -
+
**Configuration Guide:** @@ -124,7 +124,7 @@ Example: Before the chatting, the user specifies "English" in the `language` inp Example: After starting the conversation, the LLM will ask the user to input items related to the Checklist in the chatting box. Once the user mentions content from the Checklist, it will be updated and stored in the Conversation Variable. The LLM will remind the user to continue supplementing missing items after each round of dialogue. -
+
**Configuration Process:** diff --git a/en/guides/workflow/publish.md b/en/guides/workflow/publish.md index 575905946..bbdaa47f7 100644 --- a/en/guides/workflow/publish.md +++ b/en/guides/workflow/publish.md @@ -2,7 +2,7 @@ After completing debugging, clicking "Publish" in the upper right corner allows you to save and quickly release the workflow as different types of applications. -
+
Conversational applications can be published as: diff --git a/en/guides/workflow/variables.md b/en/guides/workflow/variables.md index 1b06937e3..6768eb832 100644 --- a/en/guides/workflow/variables.md +++ b/en/guides/workflow/variables.md @@ -18,7 +18,7 @@ Workflow type application provides the system variables below:
Variables nameData TypeDescriptionRemark

sys.files

[LEGACY]

Array[File]File Parameter: Stores images uploaded by usersThe image upload function needs to be enabled in the 'Features' section in the upper right corner of the application orchestration page
sys.user_idStringUser ID: A unique identifier automatically assigned by the system to each user when they use a workflow application. It is used to distinguish different users
sys.app_idStringApp ID: A unique identifier automatically assigned by the system to each App. This parameter is used to record the basic information of the current application. This parameter is used to differentiate and locate distinct Workflow applications for users with development capabilities
sys.workflow_idStringWorkflow ID: This parameter records information about all nodes information in the current Workflow application.This parameter can be used by users with development capabilities to track and record information about the nodes contained within a Workflow
sys.workflow_run_idStringWorkflow Run ID: Used to record the runtime status and execution logs of a Workflow application.This parameter can be used by users with development capabilities to track the application's historical execution records
-

Workflow App System Variables

+

Workflow App System Variables

#### Chatflow @@ -26,13 +26,13 @@ Chatflow type application provides the following system variables:
Variables nameData TypeDescriptionRemark
sys.queryStringContent entered by the user in the chatting box.
sys.filesArray[File]File Parameter: Stores images uploaded by usersThe image upload function needs to be enabled in the 'Features' section in the upper right corner of the application orchestration page
sys.dialogue_countNumber

The number of conversations turns during the user's interaction with a Chatflow application. The count automatically increases by one after each chat round and can be combined with if-else nodes to create rich branching logic.

For example, LLM will review the conversation history at the X conversation turn and automatically provide an analysis.

sys.conversation_idStringA unique ID for the chatting box interaction session, grouping all related messages into the same conversation, ensuring that the LLM continues the chatting on the same topic and context.
sys.user_idStringA unique ID is assigned for each application user to distinguish different conversation users.
sys.workflow_idStringWorkflow ID: This parameter records information about all nodes information in the current Workflow application.This parameter can be used by users with development capabilities to track and record information about the nodes contained within a Workflow
sys.workflow_run_idStringWorkflow Run ID: Used to record the runtime status and execution logs of a Workflow application.This parameter can be used by users with development capabilities to track the application's historical execution records
-
chatflow app system variables

Chatflow App System Variables

+
chatflow app system variables

Chatflow App System Variables

### Environment Variables **Environment variables are used to protect sensitive information involved in workflows**, such as API keys and database passwords used when running workflows. They are stored in the workflow rather than in the code, allowing them to be shared across different environments. -
Environment Variables

Environment Variables

+
Environment Variables

Environment Variables

Supports the following 3 data types: @@ -56,7 +56,7 @@ Environmental variables have the following characteristics: For example, you can store the language preference input by the user in the first round of chatting in a conversation variable. The LLM will refer to the information in the conversation variable when answering and use the specified language to reply to the user in subsequent chats. -

Conversation Variable

+

Conversation Variable

**Conversation variables** support the following six data types: diff --git a/en/guides/workspace/app.md b/en/guides/workspace/app.md index aa216bf42..d9a785d96 100644 --- a/en/guides/workspace/app.md +++ b/en/guides/workspace/app.md @@ -4,11 +4,11 @@ In the **Discover** section, several commonly used template applications are provided. These applications cover areas such as human resources, assistants, translation, programming, and writing. -
+
To use a template application, click the "Add to Workspace" button on the template. You can then use the application in the workspace on the left side. -
+
To modify a template and create a new application, click the "Customize" button on the template. diff --git a/en/guides/workspace/app/README.md b/en/guides/workspace/app/README.md index 778d8e6ad..08f2adc99 100644 --- a/en/guides/workspace/app/README.md +++ b/en/guides/workspace/app/README.md @@ -4,11 +4,11 @@ In the **Discover** section, several commonly used template applications are provided. These applications cover areas such as human resources, assistants, translation, programming, and writing. -
+
To use a template application, click the "Add to Workspace" button on the template. You can then use the application in the workspace on the left side. -
+
To modify a template and create a new application, click the "Customize" button on the template. diff --git a/en/learn-more/extended-reading/how-to-use-json-schema-in-dify.md b/en/learn-more/extended-reading/how-to-use-json-schema-in-dify.md index 06bbf8bbc..0067fb0df 100644 --- a/en/learn-more/extended-reading/how-to-use-json-schema-in-dify.md +++ b/en/learn-more/extended-reading/how-to-use-json-schema-in-dify.md @@ -18,7 +18,7 @@ JSON Schema is a specification for describing JSON data structures. Developers c Switch the LLM in your application to one of the models supporting JSON Schema output mentioned above. Then, in the settings form, enable `JSON Schema` and fill in the JSON Schema template. Simultaneously, enable the `response_format` column and switch it to the `json_schema` format. -![](../../.gitbook/assets/learn-more-json-schema.png) +![](https://assets-docs.dify.ai/img/en/extended-reading/73e1801819f7ef73cced141459bcac62.webp) The content generated by the LLM supports output in the following format: @@ -205,7 +205,7 @@ You are a UI generator AI. Convert the user input into a UI. **Example Output:** -![](../../.gitbook/assets/best-practice-json-schema-ui-example.png) +![](https://assets-docs.dify.ai/img/en/extended-reading/724fa883c1c229e74898b2b3bb8e40b3.webp) ## Tips diff --git a/en/learn-more/extended-reading/retrieval-augment/README.md b/en/learn-more/extended-reading/retrieval-augment/README.md index cf62dd19f..4468b4078 100644 --- a/en/learn-more/extended-reading/retrieval-augment/README.md +++ b/en/learn-more/extended-reading/retrieval-augment/README.md @@ -8,7 +8,7 @@ Developers can use this technology to build AI-powered customer service, enterpr In the diagram below, when a user asks, "Who is the President of the United States?", the system does not directly pass the question to the large model for an answer. Instead, it first performs a vector search in a knowledge base (such as Wikipedia shown in the diagram) to find relevant content through semantic similarity matching (e.g., "Joe Biden is the 46th and current president of the United States..."). Then, the system provides the user's question along with the retrieved relevant knowledge to the large model, allowing it to obtain sufficient information to answer the question reliably. -

Basic RAG Architecture

+

Basic RAG Architecture

**Why is this necessary?** diff --git a/en/learn-more/extended-reading/retrieval-augment/hybrid-search.md b/en/learn-more/extended-reading/retrieval-augment/hybrid-search.md index 6e8122a13..5c398e425 100644 --- a/en/learn-more/extended-reading/retrieval-augment/hybrid-search.md +++ b/en/learn-more/extended-reading/retrieval-augment/hybrid-search.md @@ -29,7 +29,7 @@ For most text search scenarios, the primary goal is to ensure that the most rele In hybrid search, you need to establish vector indexes and keyword indexes in the database in advance. When a user query is input, the most relevant texts are retrieved from the documents using both retrieval methods. -

Hybrid Search

+

Hybrid Search

"Hybrid search" does not have a precise definition. This article uses the combination of vector search and keyword search as an example. If we use other combinations of search algorithms, it can also be called "hybrid search." For instance, we can combine knowledge graph techniques for retrieving entity relationships with vector search techniques. @@ -39,7 +39,7 @@ Different retrieval systems excel at finding various subtle relationships betwee Definition: Generating query embeddings and querying the text segments most similar to their vector representations. -

Vector Search Settings

+

Vector Search Settings

**TopK:** Used to filter the text fragments most similar to the user's query. The system will dynamically adjust the number of fragments based on the context window size of the selected model. The default value is 3. @@ -51,7 +51,7 @@ Definition: Generating query embeddings and querying the text segments most simi Definition: Indexing all words in the document, allowing users to query any word and return text fragments containing those words. -

Full-Text Search Settings

+

Full-Text Search Settings

**TopK:** Used to filter the text fragments most similar to the user's query. The system will dynamically adjust the number of fragments based on the context window size of the selected model. The default value is 3. @@ -61,7 +61,7 @@ Definition: Indexing all words in the document, allowing users to query any word Simultaneously performs full-text search and vector search, applying a re-ranking step to select the best results matching the user's query from both types of query results. Requires configuring the Rerank model API. -

Hybrid Search Settings

+

Hybrid Search Settings

**TopK:** Used to filter the text fragments most similar to the user's query. The system will dynamically adjust the number of fragments based on the context window size of the selected model. The default value is 3. @@ -71,16 +71,16 @@ Simultaneously performs full-text search and vector search, applying a re-rankin Set different retrieval modes by entering the "Dataset -> Create Dataset" page and configuring the retrieval settings. -

Setting Retrieval Mode When Creating a Dataset

+

Setting Retrieval Mode When Creating a Dataset

### Modifying Retrieval Mode in Dataset Settings Modify the retrieval mode of an existing dataset by entering the "Dataset -> Select Dataset -> Settings" page. -

Modifying Retrieval Mode in Dataset Settings

+

Modifying Retrieval Mode in Dataset Settings

### Modifying Retrieval Mode in Prompt Arrangement Modify the retrieval mode when creating an application by entering the "Prompt Arrangement -> Context -> Select Dataset -> Settings" page. -

Modifying Retrieval Mode in Prompt Arrangement

+

Modifying Retrieval Mode in Prompt Arrangement

diff --git a/en/learn-more/extended-reading/retrieval-augment/rerank.md b/en/learn-more/extended-reading/retrieval-augment/rerank.md index 8e4081c06..87b120065 100644 --- a/en/learn-more/extended-reading/retrieval-augment/rerank.md +++ b/en/learn-more/extended-reading/retrieval-augment/rerank.md @@ -6,7 +6,7 @@ Hybrid search can leverage the strengths of different retrieval technologies to **The re-rank model calculates the semantic match between the list of candidate documents and the user query, reordering them based on semantic match to improve the results of semantic sorting.** The principle is to compute a relevance score between the user query and each candidate document and return a list of documents sorted by relevance from high to low. Common re-rank models include Cohere rerank, bge-reranker, etc. -

Hybrid Search + Re-ranking

+

Hybrid Search + Re-ranking

In most cases, there is a preliminary retrieval before re-ranking because calculating the relevance score between a query and millions of documents would be highly inefficient. Therefore, **re-ranking is typically placed at the final stage of the search process and is ideal for merging and sorting results from different retrieval systems.** @@ -24,7 +24,7 @@ For example, with Cohere Rerank, you only need to register an account and apply Dify currently supports the Cohere Rerank model. You can enter the "Model Providers -> Cohere" page and fill in the API key for the Re-rank model: -

Configure Cohere Rerank Model in Model Providers

+

Configure Cohere Rerank Model in Model Providers

### How to Obtain the Cohere Rerank Model? @@ -34,7 +34,7 @@ Visit: [https://cohere.com/rerank](https://cohere.com/rerank), register on the p Enter the "Dataset -> Create Dataset -> Retrieval Settings" page to add the Re-rank settings. Besides setting the Re-rank model when creating a dataset, you can also change the Re-rank configuration in the settings of an existing dataset and in the dataset recall mode settings in application orchestration. -

Setting the Re-rank Model in Dataset Retrieval Mode

+

Setting the Re-rank Model in Dataset Retrieval Mode

**TopK:** Used to set the number of relevant documents returned after re-ranking. @@ -46,4 +46,4 @@ Enter the "Prompt Arrangement -> Context -> Settings" page to enable the Re-rank Explanation about multi-path recall mode: 🔗Please check the section [Multi-path Retrieval](https://docs.dify.ai/guides/knowledge-base/integrate-knowledge-within-application#multi-path-retrieval-recommended) -

Setting the Re-rank Model in Multi-Path Recall Mode for Datasets

+

Setting the Re-rank Model in Multi-Path Recall Mode for Datasets

diff --git a/en/learn-more/extended-reading/retrieval-augment/retrieval.md b/en/learn-more/extended-reading/retrieval-augment/retrieval.md index d823f021e..a3024cf8c 100644 --- a/en/learn-more/extended-reading/retrieval-augment/retrieval.md +++ b/en/learn-more/extended-reading/retrieval-augment/retrieval.md @@ -2,7 +2,7 @@ When users build AI applications with multiple knowledge bases, Dify's retrieval strategy will determine which content will be retrieved. -

retrieval Mode Settings

+

retrieval Mode Settings

### Retrieval Setting @@ -12,6 +12,6 @@ In multi-path retrieval mode, it's recommended that the Rerank model be configur Below is the technical flowchart for the multi-path retrieval mode: -

Multi-Path retrieval

+

Multi-Path retrieval

Since multi-path retrieval mode does not rely on the model's inference capability or dataset descriptions, it can achieve higher-quality retrieval results when retrieving across multiple datasets. Additionally, incorporating a re-ranking step can effectively improve document retrieval effectiveness. Therefore, when creating knowledge base Q\&A applications associated with multiple datasets, we recommend configuring the retrieval mode as multi-path retrieval. diff --git a/en/learn-more/use-cases/build-an-notion-ai-assistant.md b/en/learn-more/use-cases/build-an-notion-ai-assistant.md index acd23ccde..2c74e7fb6 100644 --- a/en/learn-more/use-cases/build-an-notion-ai-assistant.md +++ b/en/learn-more/use-cases/build-an-notion-ai-assistant.md @@ -36,39 +36,39 @@ Click [here](https://dify.ai/) to login to Dify. You can conveniently log in usi Click the `Knowledge` button on the top side bar, followed by the `Create Knowledge` button. -![login-2](../../.gitbook/assets/login-2.png) +![login-2](https://assets-docs.dify.ai/img/en/use-cases/c4de5b68a5947be2c7dbd3e34df7e934.webp) #### 3. Connect with Notion and Your Knowledge[​](https://wsyfin.com/notion-dify#3-connect-with-notion-and-datasets) Select "Sync from Notion" and then click the "Connect" button.. -![connect-with-notion-1](../../.gitbook/assets/connect-with-notion-1.png) +![connect-with-notion-1](https://assets-docs.dify.ai/img/en/use-cases/9c6c3802821855c738b4d6c1d656e0d6.webp) Afterward, you'll be redirected to the Notion login page. Log in with your Notion account. -
+
Check the permissions needed by Dify, and then click the "Select pages" button. -
+
Select the pages you want to synchronize with Dify, and press the "Allow access" button. -
+
#### 4. Start training[​](https://wsyfin.com/notion-dify#4-start-training) Specifying the pages for AI need to study, enabling it to comprehend the content within this section of Notion. Then click the "next" button. -![train-1](../../.gitbook/assets/train-1.png) +![train-1](https://assets-docs.dify.ai/img/en/use-cases/0da5f9c0f8a0cda2b5fa3ad5caf8cab1.webp) We suggest selecting the "Automatic" and "High Quality" options to train your AI assistant. Then click the "Save & Process" button. -![train-2](../../.gitbook/assets/train-2.png) +![train-2](https://assets-docs.dify.ai/img/en/use-cases/90c24b4e5992bb31c871dc77c2388301.webp) Enjoy your coffee while waiting for the training process to complete. -![train-3](../../.gitbook/assets/train-3.png) +![train-3](https://assets-docs.dify.ai/img/en/use-cases/d00483ee6a02df60ddede2eabf0d3ff8.webp) #### 5. Create Your AI application[​](https://wsyfin.com/notion-dify#5-create-your-ai-application) @@ -76,11 +76,11 @@ You must create an AI application and link it with the knowledge you've recently Return to the dashboard, and click the "Create new APP" button. It's recommended to use the Chat App directly. -![create-app-1](../../.gitbook/assets/create-app-1.png) +![create-app-1](https://assets-docs.dify.ai/img/en/use-cases/da13b8d66c07a44629287f4ebea7dbc4.webp) Select the "Prompt Eng." and link your notion datasets in the "context". -![create-app-2](../../.gitbook/assets/create-app-2.png) +![create-app-2](https://assets-docs.dify.ai/img/en/use-cases/0cb8fd5d885db5e2b15f0c4b3f4788b8.webp) I recommend adding a 'Pre Prompt' to your AI application. Just like spells are essential to Harry Potter, similarly, certain tools or features can greatly enhance the ability of AI application. @@ -88,15 +88,15 @@ For example, if your Notion notes focus on problem-solving in software developme _I want you to act as an IT Expert in my Notion workspace, using your knowledge of computer science, network infrastructure, Notion notes, and IT security to solve the problems_. -
+
It's recommended to initially enable the AI to actively furnish the users with a starter sentence, providing a clue as to what they can ask. Furthermore, activating the 'Speech to Text' feature can allow users to interact with your AI assistant using their voice. -
+
Finally, Click the "Publish" button on the top right of the page. Now you can click the public URL in the "Monitoring" section to converse with your personalized AI assistant! -![create-app-4](../../.gitbook/assets/app-url.png) +![create-app-4](https://assets-docs.dify.ai/img/en/use-cases/cd2684da1b63cdada7a164cd2b213319.webp) ### Utilizing API to Integrate With Your Project @@ -106,19 +106,19 @@ With effortless API integration, you can conveniently invoke your Notion AI appl Click the "API Reference" button on the page of Overview page. You can refer to it as your App's API document. -![using-api-1](../../.gitbook/assets/api-reference.png) +![using-api-1](https://assets-docs.dify.ai/img/en/use-cases/d876936fd581c613fae00c7d161f0031.webp) #### 1. Generate API Secret Key[​](https://wsyfin.com/notion-dify#1-generate-api-secret-key) For security reasons, it's recommended to create a new API secret key to access your AI application. -![using-api-2](../../.gitbook/assets/using-api-2.png) +![using-api-2](https://assets-docs.dify.ai/img/en/use-cases/8cc7752448c70e80bc4238b711918cd5.webp) #### 2. Retrieve Conversation ID[​](https://wsyfin.com/notion-dify#2-retrieve-conversation-id) After chatting with your AI application, you can retrieve the session ID from the "Logs & Ann." pages. -![using-api-3](../../.gitbook/assets/using-api-3.png) +![using-api-3](https://assets-docs.dify.ai/img/en/use-cases/be21e544b69951cfe74849a5d06c6aa6.webp) #### 3. Invoke API[​](https://wsyfin.com/notion-dify#3-invoke-api) @@ -143,19 +143,19 @@ curl --location --request POST 'https://api.dify.ai/v1/chat-messages' \ Sending request in terminal and you will get a successful response. -![using-api-4](../../.gitbook/assets/using-api-4.png) +![using-api-4](https://assets-docs.dify.ai/img/en/use-cases/f8a6925b11642a5c18bea92148d24a75.webp) If you want to continue this chat, go to replace the `conversation_id` of the request code to the `conversation_id` you get from the response. And you can check all the conversation history on the "Logs & Ann." page. -![using-api-5](../../.gitbook/assets/using-api-5.png) +![using-api-5](https://assets-docs.dify.ai/img/en/use-cases/5581ed9646bc62e744f3863c34dbd66a.webp) ### Sync with notion periodically[​](https://wsyfin.com/notion-dify#sync-with-notion-periodically) If your Notion's pages have updated, you can sync with Dify periodically to keep your AI assistant up-to-date. Your AI assistant will learn from the new content. -![create-app-5](../../.gitbook/assets/create-app-5.png) +![create-app-5](https://assets-docs.dify.ai/img/en/use-cases/02c7dd094e892bb2616665fe92c3ddbd.webp) ### Summary[​](https://wsyfin.com/notion-dify#summary) diff --git a/en/learn-more/use-cases/create-a-midjourney-prompt-bot-with-dify.md b/en/learn-more/use-cases/create-a-midjourney-prompt-bot-with-dify.md index 4a3d7ec71..442437be3 100644 --- a/en/learn-more/use-cases/create-a-midjourney-prompt-bot-with-dify.md +++ b/en/learn-more/use-cases/create-a-midjourney-prompt-bot-with-dify.md @@ -10,48 +10,48 @@ Dify offers two types of applications: conversational applications similar to Ch You can access Dify here: https://dify.ai/ -
+
Once you've created your application, the dashboard page will display some data monitoring and application settings. Click on "Prompt Engineering" on the left, which is the main working page. -
+
On this page, the left side is for prompt settings and other functions, while the right side provides real-time previews and usage of your created content. The prefix prompts are the triggers that the user inputs after each content, and they instruct the GPT model how to process the user's input information. -
+
Take a look at my prefix prompt structure: the first part instructs GPT to output a description of a photo in the following structure. The second structure serves as the template for generating the prompt, mainly consisting of elements like 'Color photo of the theme,' 'Intricate patterns,' 'Stark contrasts,' 'Environmental description,' 'Camera model,' 'Lens focal length description related to the input content,' 'Composition description relative to the input content,' and 'The names of four master photographers.' This constitutes the main content of the prompt. In theory, you can now save this to the preview area on the right, input the theme you want to generate, and the corresponding prompt will be generated. -
+
You may have noticed the "\{{proportion\}}" and "\{{version\}}" at the end. These are variables used to pass user-selected information. On the right side, users are required to choose image proportions and model versions, and these two variables help carry that information to the end of the prompt. Let's see how to set them up. -
+
Our goal is to fill in the user's selected information at the end of the prompt, making it easy for users to copy without having to rewrite or memorize these commands. For this, we use the variable function. Variables allow us to dynamically incorporate the user's form-filled or selected content into the prompt. For example, I've created two variables: one represents the image proportion, and the other represents the model version. Click the "Add" button to create the variables. -
+
After creation, you'll need to fill in the variable key and field name. The variable key should be in English. The optional setting means the field will be non-mandatory when the user fills it. Next, click "Settings" in the action bar to set the variable content. -
+
Variables can be of two types: text variables, where users manually input content, and select options where users select from given choices. Since we want to avoid manual commands, we'll choose the dropdown option and add the required choices. -
+
Now, let's use the variables. We need to enclose the variable key within double curly brackets {} and add it to the prefix prompt. Since we want the GPT to output the user-selected content as is, we'll include the phrase "Producing the following English photo description based on user input" in the prompt. -
+
However, there's still a chance that GPT might modify our variable content. To address this, we can lower the diversity in the model selection on the right, reducing the temperature and making it less likely to alter our variable content. You can check the tooltips for other parameters' meanings. -
+
With these steps, your application is now complete. After testing and ensuring there are no issues with the output, click the "Publish" button in the upper right corner to release your application. You and users can access your application through the publicly available URL. You can also customize the application name, introduction, icon, and other details in the settings. -
+
That's how you create a simple AI application using Dify. You can also deploy your application on other platforms or modify its UI using the generated API. Additionally, Dify supports uploading your own data, such as building a customer service bot to assist with product-related queries. This concludes the tutorial, and a special thanks to @goocarlos for creating such a fantastic product. diff --git a/en/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md b/en/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md index 05c7792ad..2cd345189 100644 --- a/en/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md +++ b/en/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md @@ -21,7 +21,7 @@ If you want to build an AI Chatbot based on the company's existing knowledge bas 3. select the cleaning method 4. Click \[Save and Process], and it will take only a few seconds to complete the processing. -![](../../.gitbook/assets/ai-chatbot-knowledge-base.png) +![](https://assets-docs.dify.ai/img/en/use-cases/2e4d197eb000916f7df8c79b49b1aa71.webp) ### Create an AI application and give it instructions @@ -39,19 +39,19 @@ In this case, we assign a role to the AI: > Opening remarks:Hey \{{User\_name\}}, I'm Bob☀️, the first AI member of Dify. You can discuss with me any questions related to Dify products, team, and even LLMOps. -
+
### Debug the performance of AI Chatbot and publish. After completing the setup, you can send messages to it on the right side of the current page to debug whether its performance meets expectations. Then click "Publish". And then you get an AI chatbot. -
+
### Embed AI Chatbot application into your front-end page. This step is to embed the prepared AI chatbot into your official website . Click \[Overview] -> \[Embedded], select the script tag method, and copy the script code into the \ or \ tag of your website. If you are not a technical person, you can ask the developer responsible for the official website to paste and update the page. -
+
1. Paste the copied code into the target location on your website. 2. Update your official website and you can get an AI intelligent customer service with your business data. Try it out to see the effect. diff --git a/en/learn-more/use-cases/how-to-connect-aws-bedrock.md b/en/learn-more/use-cases/how-to-connect-aws-bedrock.md index 1cd691517..26485608b 100644 --- a/en/learn-more/use-cases/how-to-connect-aws-bedrock.md +++ b/en/learn-more/use-cases/how-to-connect-aws-bedrock.md @@ -12,13 +12,13 @@ This article will briefly introduce how to connect the Dify platform with the AW Visit [AWS Bedrock](https://aws.amazon.com/bedrock/) and create the Knowledge Base service. -

Create AWS Bedrock Knowledge Base

+

Create AWS Bedrock Knowledge Base

### 2. Build the Backend API Service The Dify platform cannot directly connect to AWS Bedrock Knowledge Base. The developer needs to refer to Dify's [API definition](../../guides/knowledge-base/external-knowledge-api-documentation.md) on external knowledge base connection, manually create the backend API service, and establish a connection with AWS Bedrock. Please refer to the specific architecture diagram: -

Build the backend API service

+

Build the backend API service

You can refer to the following 2 demo code. @@ -117,7 +117,7 @@ During the process, you can construct the API endpoint address and the API Key f After log in to the AWS Bedrock Knowledge backend and get the ID of the created Knowledge Base, you can use this parameter to connect to the Dify platform in the subsequent steps. -

Get the AWS Bedrock Knowledge Base ID

+

Get the AWS Bedrock Knowledge Base ID

### 4. Associate the External Knowledge API @@ -129,13 +129,13 @@ Follow the prompts on the page and fill in the following information: * API endpoint address, the connection address of the external knowledge base, which can be customized in [Step 2](how-to-connect-aws-bedrock.md#id-2.build-the-backend-api-service). Example: `api-endpoint/retrieval`; * API Key, the external knowledge base connection key, which can be customized in [Step 2](how-to-connect-aws-bedrock.md#id-2.build-the-backend-api-service). -
+
### 5. Connect to External Knowledge Base Go to the **“Knowledge** page, click **“Connect to an External Knowledge Base”** below the add knowledge base card to jump to the parameter configuration page. -
+
Fill in the following parameters: @@ -152,7 +152,7 @@ Fill in the AWS Bedrock knowledge base ID obtained in Step 3. **Score threshold:** The similarity threshold for text chunk filtering. Only text chunks with a score exceeding the set score will be recalled. The default value is 0.5. The higher the value, the higher the similarity required between the text and the question, the smaller the number of texts expected to be recalled, and the more accurate the result will be. -
+
After the settings are completed, you can establish a connection with the external knowledge base API. @@ -160,8 +160,8 @@ After the settings are completed, you can establish a connection with the extern After establishing a connection with an external knowledge base, developers can simulate possible user's question keywords in **"Retrieval Test"** and preview the text chunks retrieval from the AWS Bedrock Knowledge Base. -

Test the connection and retrieval of the external knowledge base

+

Test the connection and retrieval of the external knowledge base

If you are not satisfied with the retrieval results, you can try to modify the retrieval parameters or adjust the retrieval settings of AWS Bedrock Knowledge Base. -

Adjust the text chunking parameters of AWS Bedrock Knowledge Base

+

Adjust the text chunking parameters of AWS Bedrock Knowledge Base

diff --git a/en/learn-more/use-cases/how-to-creat-dify-schedule.md b/en/learn-more/use-cases/how-to-creat-dify-schedule.md index 01b5164e7..5f6959f01 100644 --- a/en/learn-more/use-cases/how-to-creat-dify-schedule.md +++ b/en/learn-more/use-cases/how-to-creat-dify-schedule.md @@ -59,7 +59,7 @@ Let's get your automated workflows up and running in just a few steps! | WeChat Notification | Email Notification | |:------------------:|:------------------:| -| ![WeChat](../../.gitbook/assets/schedule-chat.png) | ![Email](../../.gitbook/assets/schedule-chat2.png) | +| ![WeChat](https://assets-docs.dify.ai/img/en/use-cases/4f7db02df53a3c81dcb67f1dc3813fc5.webp) | ![Email](https://assets-docs.dify.ai/img/en/use-cases/d2a7c64d6d1ec9291ccacafb7f8ed082.webp) | ## ❓ FAQ @@ -72,8 +72,8 @@ Let's get your automated workflows up and running in just a few steps! > 💡 Note: Only workflow applications are supported! -![Token Step 1](../../.gitbook/assets/schedule-dify1.png) -![Token Step 2](../../.gitbook/assets/schedule-dify2.png) +![Token Step 1](https://assets-docs.dify.ai/img/en/use-cases/16ab8ca2a4a80f53d4d1bae8df376d25.webp) +![Token Step 2](https://assets-docs.dify.ai/img/en/use-cases/50f03811380b3eef5976a698ad2e23f6.webp) ### 🚫 Connection Issues? diff --git a/en/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md b/en/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md index acd7fbe7f..c608e0a13 100644 --- a/en/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md +++ b/en/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md @@ -15,10 +15,10 @@ Assuming you've already created a [Dify AI application](https://docs.dify.ai/gui 3. Click the "Publish" button in the upper right corner 4. On the publish page, choose the "Embed Into Site" option - ![Embed Into Site Option](../../.gitbook/assets/best-practice-wix-2.png) + ![Embed Into Site Option](https://assets-docs.dify.ai/img/en/use-cases/69e32259e16113a85efb36a55ff103e9.webp) 5. Select an appropriate style and copy the displayed iFrame code. For example: - ![iFrame Code Example](../../.gitbook/assets/best-practice-wix-3.png) + ![iFrame Code Example](https://assets-docs.dify.ai/img/en/use-cases/6de46e88bcfe958365970e58c91e4bdd.webp) ## 2. Embedding the iFrame Code Snippet in Your Wix Site @@ -26,7 +26,7 @@ Assuming you've already created a [Dify AI application](https://docs.dify.ai/gui 2. Click the blue `+` (Add Elements) button on the left side of the page 3. Select **Embed Code**, then click **Embed HTML** to add an HTML iFrame element to the page - ![Add HTML iFrame](../../.gitbook/assets/best-practice-add-html-iframe.png) + ![Add HTML iFrame](https://assets-docs.dify.ai/img/en/use-cases/f8e96ede33b585b00d0be569e13dee1f.webp) 4. In the `HTML Settings` box, select the `Code` option 5. Paste the iFrame code snippet you obtained from your Dify application 6. Click the **Update** button to save and preview your changes @@ -37,7 +37,7 @@ Here's an example of an iFrame code snippet for embedding a Dify Chatbot: ``` -![Insert Dify iFrame Code](../../.gitbook/assets/best-practice-insert-dify-iframe-code.png) +![Insert Dify iFrame Code](https://assets-docs.dify.ai/img/en/use-cases/f89b4bd5893e1d522e5a8bd896bee11f.webp) > ⚠️ Ensure the address in the iFrame code begins with HTTPS. HTTP addresses will not display correctly. diff --git a/en/workshop/basic/build-ai-image-generation-app.md b/en/workshop/basic/build-ai-image-generation-app.md index 788f0589e..c6d373322 100644 --- a/en/workshop/basic/build-ai-image-generation-app.md +++ b/en/workshop/basic/build-ai-image-generation-app.md @@ -6,7 +6,7 @@ With the rise of image generation, many excellent image generation products have In this article, you will learn how to develop an AI image generation app using Dify. -![](../../.gitbook/assets/build-ai-image-generation-app-12-en.png) +![](https://assets-docs.dify.ai/img/en/basic/fd446c9062b3aaa962d4f6535c60d12f.webp) ## You Will Learn @@ -24,7 +24,7 @@ If you haven't registered yet, you will be asked to register before entering the After entering the management page, click `copy` to copy the key. -![](../../.gitbook/assets/build-ai-image-generation-app-1.png) +![](https://assets-docs.dify.ai/img/en/basic/68007f69cdf208ccdb4130a5176b4984.webp) Next, you need to fill in the key in [Dify - Tools - Stability](https://cloud.dify.ai/tools) by following these steps: @@ -33,7 +33,7 @@ Next, you need to fill in the key in [Dify - Tools - Stability](https://cloud.di * Select Stability * Click `Authorize` -![](../../.gitbook/assets/build-ai-image-generation-app-2-en.png) +![](https://assets-docs.dify.ai/img/en/basic/096a6de7c057b04e799446ec491899fc.webp) * Fill in the key and save @@ -47,7 +47,7 @@ If the message credits are insufficient, you can customize other model providers Click **Your Avatar - Settings - Model Provider** -
+
If you haven't found a suitable model provider, the groq platform provides free call credits for LLMs like Llama. @@ -57,17 +57,17 @@ Click **Create API Key**, set a desired name, and copy the API Key. Back to **Dify - Model Providers**, select **groqcloud**, and click **Setup**. -![](../../.gitbook/assets/build-ai-image-generation-app-4-en.png) +![](https://assets-docs.dify.ai/img/en/basic/daba9ae3c1a9179490dc0c3ba127bc45.webp) Paste the API Key and save. -![](../../.gitbook/assets/build-ai-image-generation-app-5-en.png) +![](https://assets-docs.dify.ai/img/en/basic/9f4d86396b83179c521cd60e717c0a42.webp) ## 3. Build an Agent Back to **Dify - Studio**, select **Create from Blank**. -![](../../.gitbook/assets/build-ai-image-generation-app-6-en.png) +![](https://assets-docs.dify.ai/img/en/basic/b81842a1376c219767b3bd9699e6d5d7.webp) In this experiment, we only need to understand the basic usage of Agent. @@ -79,21 +79,21 @@ An Agent is an AI system that simulates human behavior and capabilities. It inte Select **Agent**, fill in the name. -![](../../.gitbook/assets/build-ai-image-generation-app-7-en.png) +![](https://assets-docs.dify.ai/img/en/basic/309aa808354a326a0fc5b873878bb32c.webp) Next, you will enter the Agent orchestration interface as shown below. -![](../../.gitbook/assets/build-ai-image-generation-app-8-en.png) +![](https://assets-docs.dify.ai/img/en/basic/492a3f517dffcc8d08940baab0167e99.webp) Select the LLM. Here we use Llama-3.1-70B provided by groq as an example: -![](../../.gitbook/assets/build-ai-image-generation-app-9-en.png) +![](https://assets-docs.dify.ai/img/en/basic/758709593a19635fa48772900dfb235c.webp) Select Stability in **Tools**: -![](../../.gitbook/assets/build-ai-image-generation-app-10-en.png) +![](https://assets-docs.dify.ai/img/en/basic/51f63fa4e2f25a605cad065076367ee9.webp) -![](../../.gitbook/assets/build-ai-image-generation-app-11-en.png) +![](https://assets-docs.dify.ai/img/en/basic/d28376231bfcad199cbd0371ff3e4c8a.webp) ### Write Prompts @@ -113,17 +113,17 @@ Each time the user inputs a command, the Agent will know this system-level instr For example: Draw a girl holding an open book. -![](../../.gitbook/assets/build-ai-image-generation-app-12-en.png) +![](https://assets-docs.dify.ai/img/en/basic/fd446c9062b3aaa962d4f6535c60d12f.webp) ### Don't want to write prompts? Of course you can! Click **Generate** in the upper right corner of Instructions. -![](../../.gitbook/assets/prompt-gen-1-en.png) +![](https://assets-docs.dify.ai/img/en/basic/fd3a734ef5f8f5d85ce0416fab792e6d.webp) Enter your requirements in the **Instructions** and click **Generate**. The generated prompts on the right will show AI-generated prompts. -![](../../.gitbook/assets/prompt-gen-2-en.png) +![](https://assets-docs.dify.ai/img/en/basic/ae5ce947982f500b8dd924c605f297c7.webp) However, to develop a good understanding of prompts, we should not rely on this feature in the early stages. @@ -131,7 +131,7 @@ However, to develop a good understanding of prompts, we should not rely on this Click the publish button in the upper right corner, and after publishing, select **Run App** to get a web page for an online running Agent. -![](../../.gitbook/assets/build-ai-image-generation-app-13-en.png) +![](https://assets-docs.dify.ai/img/en/basic/3d529a876afa11b800bc8260de33e3e6.webp) Copy the URL of this web page to share with other friends. @@ -139,7 +139,7 @@ Copy the URL of this web page to share with other friends. We can add style instructions in the user's input command, for example: Anime style, draw a girl holding an open book. -![](../../.gitbook/assets/build-ai-image-generation-app-14-en.png) +![](https://assets-docs.dify.ai/img/en/basic/5b77b0b3c3f11d5736208a1d313536c1.webp) But if we want set the default style to anime style, we can add it to the system prompt because we previously learned that the system prompt is known each time the user command is executed and has a higher priority. @@ -165,10 +165,10 @@ If the user requests content unrelated to drawing, reply: "Sorry, I don't unders For example, let's ask: What's for dinner tonight? -
+
In some more formal business scenarios, we can call a sensitive word library to refuse user requests. Add the keyword "dinner" in **Add Feature - Content Moderation**. When the user inputs the keyword, the Agent app outputs "Sorry, I don't understand what you're saying." -![](../../.gitbook/assets/build-ai-image-generation-app-16-en.png) +![](https://assets-docs.dify.ai/img/en/basic/a082bf01b81bca0a8e1ae6cb0838f02f.webp) diff --git a/en/workshop/intermediate/article-reader.md b/en/workshop/intermediate/article-reader.md index fa561da56..e1faa1334 100644 --- a/en/workshop/intermediate/article-reader.md +++ b/en/workshop/intermediate/article-reader.md @@ -54,7 +54,7 @@ Please choose the appropriate file upload method according to your business scen Thus, Dify introduced the **doc extractor**, which can extract text from the file variable and output it as a text variable. -
+
### **LLM** @@ -123,11 +123,11 @@ To handle multiple uploaded files, an iterative node is needed. The iterative node is similar to the while loop in many programming languages, except that Dify has no conditional restrictions, and the **input variable can only be of type `array` (list)**. The reason is that Dify will execute all the content in the list until it is done. -
+
Therefore, you need to adjust the file variable in the start node to an `array` type, i.e., a file list. -
+
## **Question 2: Handling Specific Files from a File List** @@ -137,4 +137,4 @@ For example, limit the analysis to only document-type files and sort the files t Before the iterative node, add a list operation, adjust the **filter condiftion** and **order by**, then change the input of the iterative node to the output of the list operation node. -
+
diff --git a/en/workshop/intermediate/customer-service-bot.md b/en/workshop/intermediate/customer-service-bot.md index e4da8f4c4..99315efe1 100644 --- a/en/workshop/intermediate/customer-service-bot.md +++ b/en/workshop/intermediate/customer-service-bot.md @@ -26,13 +26,13 @@ Before starting the experiment, remember that the core of the knowledge base is In Dify, select **Create from Blank - Chatflow.** -
+
#### Add a Model Provider This experiment involves using embedding models. Currently, supported embedding model providers include OpenAI and Cohere. In Dify's model providers, those with the `TEXT EMBEDDING` label are supported. Ensure you have added at least one and have sufficient balance. -
+
> **What is embedding?** > @@ -58,7 +58,7 @@ We will start with a uploading local document as an example. After uploading the document, you will enter the following page: -
+
You can see a segmentation preview on the right. The default selection is automatic segmentation and cleaning. Dify will automatically divide the article into many paragraphs based on the content. You can also set other segmentation rules in the custom settings. @@ -80,11 +80,11 @@ Dify provides three retrieval functions: vector retrieval, full-text retrieval, In hybrid retrieval, you can set weights or use a reranking model. When setting weights, you can set whether the retrieval should focus more on semantics or keywords. For example, in the image below, semantics account for 70% of the weight, and keywords account for 30%. -
+
Clicking **Save and Process** will process the document. After processing, the document can be used in the application. -
+
#### Syncing from a Website @@ -92,7 +92,7 @@ In many cases, we need to build a smart customer service bot based on help docum Currently, Dify supports processing up to 50 pages. Please pay attention to the quantity limit. If exceeded, you can create a new knowledge base. -
+
#### Adjusting Knowledge Base Content @@ -127,7 +127,7 @@ Here is a reference classification: * User requests explanation of technical terms * User asks about joining the community -
+
#### Direct Reply Node @@ -161,7 +161,7 @@ Context: You need to use the output of the knowledge retrieval node as the conte System prompt: Based on \{{context\}}, answer \{{user question\}} -
+
You can use `/` or `{` to reference variables in the prompt writing area. In variables, variables starting with `sys.` are system variables. Please refer to the help documentation for details. @@ -171,7 +171,7 @@ In addition, you can enable LLM memory to make the user's conversation experienc In the knowledge base function, you can connect external knowledge bases through external knowledge base APIs, such as the AWS Bedrock knowledge base. -
+
For best practices on AWS Bedrock knowledge bases, please read: [how-to-connect-aws-bedrock.md](../../learn-more/use-cases/how-to-connect-aws-bedrock.md "mention") @@ -179,7 +179,7 @@ For best practices on AWS Bedrock knowledge bases, please read: [how-to-connect- In both the community edition and SaaS version of Dify, you can add, delete, and query the status of knowledge bases through the knowledge base API. -
+
In the instance with the knowledge base deployed, go to **Knowledge Base -> API** and create an API key. Please keep the API key safe. diff --git a/en/workshop/intermediate/twitter-chatflow.md b/en/workshop/intermediate/twitter-chatflow.md index f9c4b0664..8e26d23a6 100644 --- a/en/workshop/intermediate/twitter-chatflow.md +++ b/en/workshop/intermediate/twitter-chatflow.md @@ -59,7 +59,7 @@ docker compose up -d Configure Model Provider in account setting: -
+
## Create a chatflow @@ -67,15 +67,15 @@ Now, let's get started on the chatflow. Click on `Create from Blank` to start: -
+
The initialized chatflow should be like: -
+
## Add nodes to chatflow -

The final chatflow looks like this

+

The final chatflow looks like this

### Start node @@ -83,7 +83,7 @@ In start node, we can add some system variables at the beginning of a chat. In t Click on Start node and add a new variable: -
+
### Code node @@ -100,27 +100,27 @@ def main(id: str) -> dict: Add a code node and select python, and set input and output variable names: -
+
### HTTP request node Based on the [Crawlbase docs](https://crawlbase.com/docs/crawling-api/scrapers/#twitter-profile), to scrape a Twitter user’s profile in http format, we need to complete HTTP request node in the following format: -
+
Importantly, it is best not to directly enter the token value as plain text for security reasons, as this is not a good practice. Actually, in the latest version of Dify, we can set token values in **`Environment Variables`**. Click `env` - `Add Variable` to set the token value, so plain text will not appear in the node. Check [https://crawlbase.com/dashboard/account/docs](https://crawlbase.com/dashboard/account/docs) for your crawlbase API Key. -
+
By typing `/` , you can easily insert the API Key as a variable. -
+
Tap the start button of this node to check whether it works correctly: -
+
### LLM node @@ -130,17 +130,17 @@ The value `context` should be `body` from HTTP Request node. The following is a sample system prompt. -
+
## Test run Click `Preview` to start a test run and input twitter user id in `id` -
+
For example, I want to analyze Elon Musk's tweets and write a tweet about global warming in his tone. -
+
Does this sound like Elon? lol diff --git a/jp/community/docs-contribution.md b/jp/community/docs-contribution.md index 0b06506e1..2e01eb44f 100644 --- a/jp/community/docs-contribution.md +++ b/jp/community/docs-contribution.md @@ -13,7 +13,7 @@ Dify のヘルプドキュメントは、[オープンソースプロジェク ドキュメントを読んでいる際に内容の誤りを見つけたり、一部を修正したい場合は、文書ページの右側にある目次内の **“Github に編集”** ボタンをクリックしてください。これにより、GitHub のオンラインエディターを使用してファイルを修正できます。その後、修正内容を簡潔に説明した pull request を作成してください。タイトルは `Fix: Update xxx` の形式を使用してください。リクエストを受け取った後、レビューを行い、問題がなければ修正をマージします。 -![](../.gitbook/assets/jp-docs-contribution.png) +![](https://assets-docs.dify.ai/img/jp/community/62fe833fb2c2e81341219877e07a17bb.webp) もちろん、[Issues ページ](https://github.com/langgenius/dify-docs/issues)にドキュメントのリンクを貼り付け、修正が必要な内容を簡単に説明していただくことも可能です。フィードバックを受け取った後、迅速に対応いたします。 diff --git a/jp/development/models-integration/gpustack.md b/jp/development/models-integration/gpustack.md index 78c079f15..78b0c827b 100644 --- a/jp/development/models-integration/gpustack.md +++ b/jp/development/models-integration/gpustack.md @@ -36,7 +36,7 @@ GPUStackにホストされたLLMを使用する方法の例です: 3. モデルを展開するために「Save」をクリックします。 -![gpustack-deploy-llm](../../../en/.gitbook/assets/gpustack-deploy-llm.png) +![gpustack-deploy-llm](https://assets-docs.dify.ai/img/jp/models-integration/9ba129b9bae6e6698217b9207c4ec911.webp) ## APIキーの作成方法 @@ -60,6 +60,6 @@ GPUStackにホストされたLLMを使用する方法の例です: モデルをアプリケーションで使用するために、「Save」をクリックしてください。 -![add-gpustack-llm](../../../en/.gitbook/assets/add-gpustack-llm.png) +![add-gpustack-llm](https://assets-docs.dify.ai/img/jp/models-integration/ef6f8cfd721943783d1a3b6122256624.webp) GPUStackに関する詳細情報は、[Github Repo](https://github.com/gpustack/gpustack)を参照してください。 \ No newline at end of file diff --git a/jp/development/models-integration/hugging-face.md b/jp/development/models-integration/hugging-face.md index b3e778547..396e0faec 100644 --- a/jp/development/models-integration/hugging-face.md +++ b/jp/development/models-integration/hugging-face.md @@ -11,7 +11,7 @@ Difyはテキスト生成(Text-Generation)と埋め込み(Embeddings)を 2. Hugging FaceのAPIキーを設定します([取得はこちら](https://huggingface.co/settings/tokens))。 3. [Hugging Faceのモデル一覧ページ](https://huggingface.co/models)にアクセスし、対応するモデルの種類を選択します。 -
+
DifyはHugging Face上のモデルを次の2つの方法で接続できます: @@ -24,17 +24,17 @@ DifyはHugging Face上のモデルを次の2つの方法で接続できます: モデルの詳細ページの右側にHosted Inference APIのセクションがあるモデルのみがHosted Inference APIをサポートしています。以下の図のように表示されます: -
+
モデルの詳細ページで、モデルの名前を取得できます。 -
+
#### 2 Difyで接続モデルを使用する `設定 > モデルプロバイダー > Hugging Face > モデルタイプ`のエンドポイントタイプでHosted Inference APIを選択します。以下の図のように設定します: -
+
APIトークンは記事の冒頭で設定したAPIキーです。モデル名は前のステップで取得したモデル名を入力します。 @@ -44,26 +44,26 @@ APIトークンは記事の冒頭で設定したAPIキーです。モデル名 モデルの詳細ページの右側にある`Deploy`ボタンの下にInference EndpointsオプションがあるモデルのみがInference Endpointをサポートしています。以下の図のように表示されます: -
+
#### 2 モデルをデプロイ モデルのデプロイボタンをクリックし、Inference Endpointオプションを選択します。以前にクレジットカードを登録していない場合は、カードの登録が必要です。手順に従って進めてください。カードを登録した後、以下の画面が表示されます:必要に応じて設定を変更し、左下のCreate EndpointボタンをクリックしてInference Endpointを作成します。 -
+
モデルがデプロイされると、エンドポイントURLが表示されます。 -
+
#### 3 Difyで接続モデルを使用する `設定 > モデルプロバイダー > Hugging Face > モデルタイプ`のエンドポイントタイプでInference Endpointsを選択します。以下の図のように設定します: -
+
APIトークンは記事の冒頭で設定したAPIキーです。`テキスト生成モデルの名前は任意に設定可能ですが、埋め込みモデルの名前はHugging Faceの名前と一致する必要があります。`エンドポイントURLは前のステップでデプロイしたモデルのエンドポイントURLを入力します。 -
+
> 注意点:埋め込みの「ユーザー名 / 組織名」は、Hugging Faceの[Inference Endpoints](https://huggingface.co/docs/inference-endpoints/guides/access)のデプロイ方法に基づいて、「[ユーザー名](https://huggingface.co/settings/account)」または「[組織名](https://ui.endpoints.huggingface.co/)」を入力する必要があります。 diff --git a/jp/development/models-integration/litellm.md b/jp/development/models-integration/litellm.md index fe434ae6a..41177448e 100644 --- a/jp/development/models-integration/litellm.md +++ b/jp/development/models-integration/litellm.md @@ -51,7 +51,7 @@ docker run \ `設定 > モデルプロバイダー > OpenAI-API互換` で、以下を入力してください: -
+
- モデル名: `gpt-4` - ベースURL: `http://localhost:4000` diff --git a/jp/development/models-integration/replicate.md b/jp/development/models-integration/replicate.md index fcaf186d3..a07615e0a 100644 --- a/jp/development/models-integration/replicate.md +++ b/jp/development/models-integration/replicate.md @@ -9,8 +9,8 @@ DifyはReplicate上の[言語モデル](https://replicate.com/collections/langua 3. モデルを選択します。[言語モデル](https://replicate.com/collections/language-models)と[埋め込みモデル](https://replicate.com/collections/embedding-models)からモデルを選びます。 4. Difyの`設定 > モデルプロバイダ > Replicate`にてモデルを追加します。 -
+
APIキーは第2ステップで設定したAPIキーです。モデル名とモデルバージョンはモデルの詳細ページで見つけることができます: -
+
diff --git a/jp/development/models-integration/xinference.md b/jp/development/models-integration/xinference.md index 932f03da0..4b73f976c 100644 --- a/jp/development/models-integration/xinference.md +++ b/jp/development/models-integration/xinference.md @@ -29,7 +29,7 @@ Xinferenceのデプロイ方法は、[ローカルデプロイ](https://github.c `http://127.0.0.1:9997`にアクセスし、デプロイするモデルとその仕様を選択します。以下の図を参照してください: -
+
モデルによっては異なるハードウェアプラットフォームでの互換性が異なるため、[Xinference内蔵モデル](https://inference.readthedocs.io/en/latest/models/builtin/index.html)を確認して、作成するモデルが現在のハードウェアプラットフォームでサポートされているかどうかを確認してください。 4. モデルUIDの取得 diff --git a/jp/features/datasets/maintain-dataset-via-api.md b/jp/features/datasets/maintain-dataset-via-api.md index 5d190dd3a..abf9fdebf 100644 --- a/jp/features/datasets/maintain-dataset-via-api.md +++ b/jp/features/datasets/maintain-dataset-via-api.md @@ -12,7 +12,7 @@ ナレッジページに移動し、左側のナビゲーションでAPIページに切り替えます。このページでは、difyが提供するAPIドキュメントを表示し、ナレッジAPIにアクセスするための認証情報を管理できます。 -

ナレッジAPIドキュメント

+

ナレッジAPIドキュメント

## **空のナレッジを作成する** diff --git a/jp/getting-started/install-self-hosted/zeabur.md b/jp/getting-started/install-self-hosted/zeabur.md index 64947e810..c7be2e313 100644 --- a/jp/getting-started/install-self-hosted/zeabur.md +++ b/jp/getting-started/install-self-hosted/zeabur.md @@ -17,15 +17,15 @@ Zeabur チームはワンクリックデプロイテンプレートを用意し ボタンをクリックすると、Zeabur 上のテンプレートページに移動し、デプロイの詳細情報と説明を確認できます。 -
Zeabur テンプレート概要
+
Zeabur テンプレート概要
デプロイボタンをクリックした後、生成されたドメイン名を入力し、そのドメイン名を Dify インスタンスにバインドし、他のサービスに環境変数として注入します。 次に、お好みのリージョンを選択し、デプロイボタンをクリックすると、数分以内に Dify インスタンスがデプロイされます。 -
リージョンを選択
+
リージョンを選択
デプロイが完了すると、Zeabur コンソール上にプロジェクトページが表示されます。以下の図のように、デプロイ中に入力したドメイン名が自動的に NGINX サービスにバインドされ、そのドメイン名を使用して Dify インスタンスにアクセスできます。 -
Zeabur プロジェクト概要
+
Zeabur プロジェクト概要
また、NGINX サービスページのネットワーキングタブでドメイン名を変更することもできます。詳細については [Zeabur ドキュメント](https://zeabur.com/docs/deploy/domain-binding) を参照してください。 \ No newline at end of file diff --git a/jp/guides/annotation/annotation-reply.md b/jp/guides/annotation/annotation-reply.md index a7b1913ba..681876488 100644 --- a/jp/guides/annotation/annotation-reply.md +++ b/jp/guides/annotation/annotation-reply.md @@ -17,13 +17,13 @@ 4. マッチング項目が見つからなかった場合、質問は通常プロセスを継続します(LLMやRAGに渡されます)。 5. アノテーションリプライ機能をオフにすると、システムはアノテーションからのマッチングリプライを継続して行いません。 -

アノテーションリプライの流れ

+

アノテーションリプライの流れ

### 提示詞編成でアノテーションリプライを有効にする 「アプリケーション構築->機能追加」からアノテーションリプライのスイッチを有効にします: -

提示詞編成でアノテーションリプライを有効にする

+

提示詞編成でアノテーションリプライを有効にする

有効にする際には、まずアノテーションリプライのパラメータを設定する必要があります。設定可能なパラメータには次のものがあります:スコア閾値と埋め込みモデル @@ -33,27 +33,27 @@ 保存して有効にすると、この設定は直ちに有効となり、システムはすべての保存されたアノテーションに対して埋め込みモデルを利用して埋め込みを生成し保存します。 -

アノテーションリプライのパラメータ設定

+

アノテーションリプライのパラメータ設定

### 会話デバッグページでアノテーションを追加する デバッグおよびプレビューページでモデルのリプライ情報に直接アノテーションを追加または編集できます。 -

アノテーションリプライを追加する

+

アノテーションリプライを追加する

必要な高品質リプライに編集して保存します。 -

アノテーションリプライを編集する

+

アノテーションリプライを編集する

同じユーザー質問を再度入力すると、システムは既に保存されたアノテーションを使用してユーザー質問に直接リプライします。 -

保存されたアノテーションを通じてユーザー質問にリプライする

+

保存されたアノテーションを通じてユーザー質問にリプライする

### ログとアノテーションでアノテーションリプライを有効にする 「アプリケーション構築->ログとアノテーション->アノテーション」からアノテーションリプライのスイッチを有効にします: -

ログとアノテーションでアノテーションリプライを有効にする

+

ログとアノテーションでアノテーションリプライを有効にする

### アノテーションバックエンドでアノテーションリプライのパラメータを設定する @@ -63,22 +63,22 @@ **埋め込みモデル**:アノテーションテキストをベクトル化するために使用され、モデルの切り替え時には再度埋め込みが生成されます。 -

アノテーションリプライのパラメータを設定する

+

アノテーションリプライのパラメータを設定する

### アノテーションQ&Aペアを一括インポートする 一括インポート機能内で、アノテーションインポートテンプレートをダウンロードし、テンプレート形式に従ってアノテーションQ&Aペアを編集します。編集が完了したら、一括インポートします。 -

アノテーションQ&Aペアを一括インポートする

+

アノテーションQ&Aペアを一括インポートする

### アノテーションQ&Aペアを一括エクスポートする アノテーション一括エクスポート機能を通じて、システム内に保存されたすべてのアノテーションQ&Aペアを一度にエクスポートできます。 -

アノテーションQ&Aペアを一括エクスポートする

+

アノテーションQ&Aペアを一括エクスポートする

### アノテーションリプライのヒット履歴を確認する アノテーションヒット履歴機能内で、すべてのヒットしたアノテーションの編集履歴、ヒットしたユーザー質問、リプライ回答、ヒットソース、マッチング類似度スコア、ヒット時間などの情報を確認できます。これらのシステム情報に基づいて、アノテーション内容を継続的に改善することができます。 -

アノテーションリプライのヒット履歴を確認する

\ No newline at end of file +

アノテーションリプライのヒット履歴を確認する

\ No newline at end of file diff --git a/jp/guides/annotation/logs.md b/jp/guides/annotation/logs.md index 995366745..1a09f98c0 100644 --- a/jp/guides/annotation/logs.md +++ b/jp/guides/annotation/logs.md @@ -24,7 +24,7 @@ これらのマークは、Dify の後続バージョンでモデルの微調整(モデルの微調整)に使用され、モデルの正確性と返信スタイルを向上させることを目的としています。現在のプレビュー版では、マークのみがサポートされています。 {% endhint %} -

ログをマークして改良

+

ログをマークして改良

ログをクリックすると、画面の右側にログ詳細パネルが開き、このパネルで運用担当者はインタラクションに対してマークを追加できます: diff --git a/jp/guides/application-orchestrate/agent.md b/jp/guides/application-orchestrate/agent.md index 6077f7087..843a61d85 100644 --- a/jp/guides/application-orchestrate/agent.md +++ b/jp/guides/application-orchestrate/agent.md @@ -8,15 +8,15 @@ 迅速に使い始めるために、「探索」でエージェントアシスタントのアプリケーションテンプレートを見つけて自分のワークスペースに追加するか、それを基にカスタマイズすることができます。新しいDifyスタジオでは、ゼロから自分専用のエージェントアシスタントを編成し、財務報告書の分析、レポートの作成、ロゴデザイン、旅行計画などのタスクを完了する手助けをすることができます。 -

探索 - エージェントアシスタントアプリケーションテンプレート

+

探索 - エージェントアシスタントアプリケーションテンプレート

エージェントアシスタントの推論モデルを選択します。エージェントアシスタントのタスク完了能力はモデルの推論能力に依存しますので、より強力な推論能力を持つモデルシリーズ、例えばgpt-4を選択することをお勧めします。これにより、より安定したタスク完了効果が得られます。 -

エージェントアシスタントの推論モデルを選択

+

エージェントアシスタントの推論モデルを選択

「プロンプト」でエージェントアシスタントの指示を作成できます。より良い結果を得るために、指示の中でタスクの目標、ワークフロー、リソース、制約などを明確にすることが重要です。 -

エージェントアシスタントの指示プロンプトを編成

+

エージェントアシスタントの指示プロンプトを編成

### アシスタントに必要なツールを追加 @@ -26,13 +26,13 @@ Difyエコシステムが提供するファーストパーティ内蔵ツールを直接使用するか、カスタムAPIツール(現在はOpenAPI / SwaggerおよびOpenAIプラグイン規格をサポート)を簡単にインポートすることができます。 -

アシスタントに必要なツールを追加

+

アシスタントに必要なツールを追加

**ツール** 機能を使用すると、Dify でより強力な AIアプリを作成できます。たとえば、エージェントアシスタントに適したツールを編成して、推論、ステップ分解、ツール呼び出しを通じて複雑なタスクを完了できるようにすることができます。 さらに、このツールにより、アプリと他のシステムやサービスの統合が簡素化され、コードの実行や独自の情報ソースへのアクセスなど、外部環境とのやり取りが可能になります。チャット ボックスで呼び出したいツールの名前を言うだけで、自動的にアクティブ化されます。 -![](../../.gitbook/assets/agent-dalle3.png) +![](https://assets-docs.dify.ai/img/jp/application-orchestrate/ba7d5da39f6d9de497fa75e72381b3a8.webp) ### エージェントの設定 @@ -40,15 +40,15 @@ DifyではエージェントアシスタントにFunction Calling(関数呼び エージェント設定では、アシスタントのイテレーション制限を変更できます。 -

Function Calling モード

+

Function Calling モード

-

ReAct モード

+

ReAct モード

### 会話のオープニング設定 エージェントアシスタントの会話オープニングとオープニング質問を設定できます。設定された会話オープニングは、ユーザーが初めて対話を開始する際に、アシスタントが完了できるタスクや提案される質問の例を表示します。 -

会話のオープニングとオープニング質問を設定

+

会話のオープニングとオープニング質問を設定

### ファイルのアップロード @@ -62,8 +62,8 @@ Claude 3.5 Sonnet (https://docs.anthropic.com/en/docs/build-with-claude/pdf-supp エージェントアシスタントの編成が完了したら、アプリとして公開する前にデバッグとプレビューを行い、アシスタントのタスク完了効果を確認できます。 -

デバッグとプレビュー

+

デバッグとプレビュー

### アプリの公開 -

アプリをWebアプリとして公開

+

アプリをWebアプリとして公開

diff --git a/jp/guides/application-orchestrate/app-toolkits/README.md b/jp/guides/application-orchestrate/app-toolkits/README.md index ad76768b4..ba8c999bb 100644 --- a/jp/guides/application-orchestrate/app-toolkits/README.md +++ b/jp/guides/application-orchestrate/app-toolkits/README.md @@ -4,33 +4,33 @@ アプリケーションツールボックスは、Difyの[アプリケーション](../#application\_type)に対して様々な付加機能を提供します。 -

アプリケーションツールボックスはチャットの場いに

+

アプリケーションツールボックスはチャットの場いに

-

アプリケーションツールボックスはワックフローの場いに

+

アプリケーションツールボックスはワックフローの場いに

### 会話のオープニング 対話型アプリケーションでは、AIが最初の発言や質問を行います。開場のメッセージや質問を編集することで、ユーザーに質問を促し、アプリの背景を説明し、対話のハードルを下げることができます。 -

会話のオープニング

+

会話のオープニング

### 次の質問の提案 次の質問の提案を設定すると、AIが前回の対話内容に基づいて3つの質問を生成し、次の対話を誘導します。 -
+
### テキストから音声への変換 この機能をオンにすると、AIの返信内容を自然な音声に変換できます。 アプリケーションツールボックスに「テキストから音声へ」のボタンを押すと、この機能を使えます。 -
+
### 音声からテキストへの変換 この機能をオンにすると、アプリ内で録音し、その音声を自動的にテキストに変換できます。 アプリケーションツールボックスに「音声からテキストへ」のボタンを押すと、この機能を使えます。 -
+
### 引用と帰属 diff --git a/jp/guides/application-orchestrate/app-toolkits/moderation-tool.md b/jp/guides/application-orchestrate/app-toolkits/moderation-tool.md index a0549cba2..5af340999 100644 --- a/jp/guides/application-orchestrate/app-toolkits/moderation-tool.md +++ b/jp/guides/application-orchestrate/app-toolkits/moderation-tool.md @@ -2,26 +2,26 @@ AIアプリケーションと対話する際、コンテンツの安全性、ユーザーエクスペリエンス、法律と規制など多方面で厳しい要件が求められます。このような場合、エンドユーザーにより良いインタラクティブ環境を提供するために「敏感語審査」機能が必要です。プロンプト編成ページで「機能を追加」をクリックし、下部のツールボックス「コンテンツ監査」を見つけます: -

コンテンツ監査

+

コンテンツ監査

### 機能一:OpenAI モデレーション API の呼び出し OpenAI やほとんどの大規模言語モデル (LLM) 会社が提供するモデルには、暴力、性、違法行為などの議論を含むコンテンツを出力しないようにするためのコンテンツ審査機能が備わっています。OpenAI はこのコンテンツ審査機能を公開しており、詳細は [platform.openai.com](https://platform.openai.com/docs/guides/moderation/overview) を参照してください。今では Dify でも直接 OpenAI モデレーション API を呼び出すことができます。入力内容や出力内容を監査するには、対応する「プリセット応答」を入力するだけです。 -

OpenAI モデレーション API

+

OpenAI モデレーション API

### 機能二:カスタムキーワード 開発者は監査が必要な敏感語をカスタムキーワードとして設定できます。例えば「kill」をキーワードとして設定し、ユーザーが入力した際に監査動作を行い、プリセット応答内容として「The content is violating usage policies.」と設定します。予測される結果として、ユーザーが「kill」を含むテキストを入力すると、敏感語審査ツールが作動し、プリセット応答内容が返されます。 -

キーワード

+

キーワード

### 機能三:敏感語審査 モデレーション拡張 企業内部では異なる敏感語審査のメカニズムが存在することが多いです。企業が企業内ナレッジベースチャットボットなどのAIアプリケーションを開発する際、社員が入力したクエリ内容を敏感語審査する必要があります。このため、開発者は自社の敏感語審査メカニズムに基づいて API 拡張を作成することができます。詳細は [moderation.md](../../extension/api-based-extension/moderation.md "mention") を参照してください。これにより、Dify 上で呼び出し、高度なカスタマイズとプライバシー保護を実現することができます。 -

モデレーション設定

+

モデレーション設定

例えば、私たちのローカルサービスで、`ドナルド・ジョン・トランプ`という敏感語審査ルールをカスタマイズします。ユーザーが`query`変数に「トランプ」と入力すると、対話時に "貴社のご使用ポリシーに反するコンテンツとなっております。" という応答が返されます。テスト結果は以下の通りです: -

モデレーションテスト

+

モデレーションテスト

diff --git a/jp/guides/application-orchestrate/chatbot-application.md b/jp/guides/application-orchestrate/chatbot-application.md index 2dd3580be..409763e5d 100644 --- a/jp/guides/application-orchestrate/chatbot-application.md +++ b/jp/guides/application-orchestrate/chatbot-application.md @@ -16,13 +16,13 @@ ホームページで「最初から作成」をクリックしてアプリを作成します。アプリ名を入力し、アプリタイプは**チャットボット**を選択します。 -

チャットボットの作成

+

チャットボットの作成

#### アプリの編成 アプリを作成すると、自動的にアプリの概要ページに移動します。左側のメニューから編成をクリックしてアプリを編成します。 -

アプリの編成

+

アプリの編成

**プロンプトの記入** @@ -38,17 +38,17 @@ オープニングダイアログを追加する方法は、底の「機能を追加」ボタンをクリックして、「会話の開始」機能を開きます: -
+
オープニングステートメントを編集する際に、いくつかのオープニング質問を追加することもできます: -![](../../.gitbook/assets/jp-conversation-options.png) +![](https://assets-docs.dify.ai/img/jp/application-orchestrate/47692893b656f29e1f2b7b72ac644870.webp) #### コンテキストの追加 AIの対話範囲を[ナレッジベース](../knowledge-base/)内に制限したい場合、企業内のカスタマーサービス用語規準などを「コンテキスト」で参照することができます。 -![](../../.gitbook/assets/jp-context.png) +![](https://assets-docs.dify.ai/img/jp/application-orchestrate/3f135004de6416229d71ea8d68955554.webp) ### ファイルのアップロード @@ -62,11 +62,11 @@ AIの対話範囲を[ナレッジベース](../knowledge-base/)内に制限し 右側にユーザー入力項目を入力し、内容を入力してデバッグします。 -![](../../.gitbook/assets/jp-conversation-debug.png) +![](https://assets-docs.dify.ai/img/jp/application-orchestrate/9e1f448224130626ae1b7b5acf0f8622.webp) 回答結果が望ましくない場合は、プロンプトやモデルを調整することができます。また、複数のモデルを同期してデバッグすることもでき、適切な構成を組み合わせることができます。 -![](../../.gitbook/assets/jp-modify-model.png) +![](https://assets-docs.dify.ai/img/jp/application-orchestrate/5738f1cdddd5ce3e003c3d683d88ecfb.webp) 単一モデルでのデバッグが効率的ではない場合、[**「複数のモデルでのデバッグ」**](./multiple-llms-debugging.md)機能を使用して、複数のモデルの回答効果を一括確認することもできます。 diff --git a/jp/guides/application-orchestrate/creating-an-application.md b/jp/guides/application-orchestrate/creating-an-application.md index d1bdd3cc7..1df45f129 100644 --- a/jp/guides/application-orchestrate/creating-an-application.md +++ b/jp/guides/application-orchestrate/creating-an-application.md @@ -12,7 +12,7 @@ Difyを初めて使う場合、アプリケーション制作に不慣れなこ ナビゲーションメニューより「スタジオ」を選んだ後、「テンプレートから作成」をアプリケーションリストから選択してください。 -

テンプレートからアプリケーションを作成

+

テンプレートからアプリケーションを作成

好みのテンプレートを選択し、**このテンプレートを使用する**ボタンをクリックします。 @@ -20,7 +20,7 @@ Difyを初めて使う場合、アプリケーション制作に不慣れなこ Difyで最初からアプリケーションを作成する場合、ナビゲーションメニューから「スタジオ」を選び、「最初から作成」をアプリケーションリストで選択します。 -
+
Difyは、チャットボイス、テキストジェネレータ、エージェント、ワークフロー、チャットフローとい5つの異なる種類のアプリケーションがあります。 @@ -38,7 +38,7 @@ Dify DSLは、Dify.AIが定めるAIアプリケーション開発のための標 コミュニティや他者から提供されたDSLファイル(テンプレート)を持っている場合は、「DSLファイルをインポート」をスタジオから選択してください。インポート後、元のアプリケーションの設定が直接読み込まれます。 -

DSLファイルをインポートしてアプリケーションを作成

+

DSLファイルをインポートしてアプリケーションを作成

#### URLを通じてDSLファイルをインポート @@ -48,6 +48,6 @@ Dify DSLは、Dify.AIが定めるAIアプリケーション開発のための標 https://example.com/your_dsl.yml ``` -

URL経由でDSLファイルをインポート

+

URL経由でDSLファイルをインポート

> DSLファイルを取り込む際には、バージョンが自動で確認されます。バージョン間に大きな違いがあると、互換性に問題が生じる恐れがあります。この件につきましては、[アプリケーション管理:インポート](https://docs.dify.ai/guides/management/app-management#importing-application)セクションで詳細をご覧いただけます。 diff --git a/jp/guides/application-publishing/launch-your-webapp-quickly/README.md b/jp/guides/application-publishing/launch-your-webapp-quickly/README.md index 468e29f46..e2effd307 100644 --- a/jp/guides/application-publishing/launch-your-webapp-quickly/README.md +++ b/jp/guides/application-publishing/launch-your-webapp-quickly/README.md @@ -11,7 +11,7 @@ Difyを使ってAIアプリを作成するメリットの一つは、数分で アプリ概要ページで、AIサイト(Webアプリ)に関するカードを見つけることができます。Webアプリのアクセスをオンにするだけで、ユーザーと共有できるリンクが得られます。 -
+
以下の2種類のアプリには、きれいなWebアプリのインターフェースを提供しています: @@ -49,8 +49,8 @@ Difyは、あなたのAIアプリをビジネスWebサイトに埋め込むこ scriptコードを、あなたのWebサイトの``または``タグにコピーします。 -
+
例えば、scriptコードを公式サイトの``に貼り付けると、公式サイトのAIロボットが得られます: -
\ No newline at end of file +
\ No newline at end of file diff --git a/jp/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md b/jp/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md index 093603806..1a4293933 100644 --- a/jp/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md +++ b/jp/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md @@ -13,29 +13,29 @@ アプリケーションの設定時に変数入力を求める設定をしている場合、会話を始める前に指示に従って情報を入力する必要があります: -
+
必要な内容を入力し、「会話を開始」ボタンをクリックしてチャットを始めます。AIの回答に移動して、会話の内容をコピーしたり、回答に「いいね」や「悪いね」を付けたりできます。 -
+
### 会話の作成、ピン留め、削除 「新しい会話」ボタンをクリックして新しい会話を開始します。会話に移動して、会話を「ピン留め」または「削除」することができます。 -
+
### 会話のオープニング アプリケーションの設定時に「会話のオープニング」機能が有効になっている場合、新しい会話を作成するとAIアプリケーションが自動的に最初の会話を開始します: -
+
### 次のステップの質問の提案 アプリケーションの設定時に「次のステップの質問の提案」機能が有効になっている場合、会話後にシステムが自動的に3つの関連する質問を提案します: -
+
### 音声認識 @@ -43,7 +43,7 @@ _使用するデバイス環境がマイクロフォンの使用を許可していることを確認してください。_ -
+
### 引用と帰属 diff --git a/jp/guides/application-publishing/launch-your-webapp-quickly/text-generator.md b/jp/guides/application-publishing/launch-your-webapp-quickly/text-generator.md index b22f7468a..fac88cba7 100644 --- a/jp/guides/application-publishing/launch-your-webapp-quickly/text-generator.md +++ b/jp/guides/application-publishing/launch-your-webapp-quickly/text-generator.md @@ -15,7 +15,7 @@ クエリ内容を入力し、実行ボタンをクリックすると、右側に結果が生成されます。以下の図のように: -
+
生成された結果部分では、「コピー」ボタンをクリックすると内容をクリップボードにコピーできます。「保存」ボタンをクリックすると内容を保存できます。「保存済み」タブで保存した内容を見ることができます。また、生成された内容には「いいね」や「バッド」をつけることもできます。 @@ -29,17 +29,17 @@ 「バッチ実行」タブをクリックすると、バッチ実行ページに入ります。 -
+
#### 第2歩 テンプレートをダウンロードして内容を入力する 「テンプレートダウンロード」ボタンをクリックし、テンプレートをダウンロードします。テンプレートを編集し、内容を入力して `.csv` 形式のファイルとして保存します。 -
+
#### 第3歩 ファイルをアップロードして実行 -
+
生成された内容をエクスポートする必要がある場合は、右上の「ダウンロードボタン」をクリックして `csv` ファイルとしてエクスポートできます。 @@ -49,10 +49,10 @@ 生成結果の下にある「保存」ボタンをクリックすると、実行結果を保存できます。「保存済み」タブで、すべての保存された内容を見ることができます。 -
+
### より多くの類似結果の生成 アプリケーションのオーケストレーションで「より類似した」機能を有効にしている場合、Webアプリケーションで「より類似した」ボタンをクリックすると、現在の結果と似た内容を生成できます。以下の図の通りです: -
\ No newline at end of file +
\ No newline at end of file diff --git a/jp/guides/extension/api-based-extension/README.md b/jp/guides/extension/api-based-extension/README.md index 75c912003..16af70d3f 100644 --- a/jp/guides/extension/api-based-extension/README.md +++ b/jp/guides/extension/api-based-extension/README.md @@ -9,7 +9,7 @@ 対応するモジュール機能を開発するだけでなく、DifyがAPIを正しく呼び出せるよう、以下の仕様にも従う必要があります。 -

APIに基づくエクステンション

+

APIに基づくエクステンション

### API仕様 @@ -194,11 +194,11 @@ Authorization: Bearer 123456 4. DifyにこのAPIを設定します。 -

APIの設定

+

APIの設定

5. アプリでこのAPIエクステンションを選択します。 -

エクステンションの選択

+

エクステンションの選択

アプリのデバッグ時、Difyは設定されたAPIにリクエストを送り、以下の内容(例)を送信します: @@ -230,7 +230,7 @@ Difyクラウド版は内網APIサービスにアクセスできないため、 1. [https://ngrok.com](https://ngrok.com)の公式サイトにアクセスし、登録してNgrokファイルをダウンロードします。 -

ダウンロード

+

ダウンロード

2. ダウンロードが完了したら、ダウンロードディレクトリに移動し、以下の説明に従って圧縮ファイルを解凍し、初期化スクリプトを実行します。 * ```Shell $ unzip /path/to/ngrok.zip @@ -238,7 +238,7 @@ Difyクラウド版は内網APIサービスにアクセスできないため、 ``` 3. ローカルAPIサービスのポートを確認します: -

ポートの確認

+

ポートの確認

次に以下のコマンドを実行して開始します: @@ -248,7 +248,7 @@ Difyクラウド版は内網APIサービスにアクセスできないため、 成功例は以下の通りです: -

Ngrokの起動

+

Ngrokの起動

4. Forwardingで示されるように、上の図では`https://177e-159-223-41-52.ngrok-free.app`(これは例のドメインです。自分のドメインに置き換えてください)がパブリックドメインとなります。 diff --git a/jp/guides/extension/api-based-extension/cloudflare-workers.md b/jp/guides/extension/api-based-extension/cloudflare-workers.md index d43f38824..e873c7830 100644 --- a/jp/guides/extension/api-based-extension/cloudflare-workers.md +++ b/jp/guides/extension/api-based-extension/cloudflare-workers.md @@ -43,9 +43,9 @@ npm run deploy デプロイが成功すると、公開アドレスが得られます。このアドレスを Dify に API エンドポイントとして追加できます。`endpoint` パスを忘れないようにしてください。 -

Dify に API エンドポイントを追加する

+

Dify に API エンドポイントを追加する

-

アプリ編集ページに API ツールを追加する

+

アプリ編集ページに API ツールを追加する

## その他のロジック TL;DR diff --git a/jp/guides/knowledge-base/connect-external-knowledge-base.md b/jp/guides/knowledge-base/connect-external-knowledge-base.md index b425e9648..af96dec68 100644 --- a/jp/guides/knowledge-base/connect-external-knowledge-base.md +++ b/jp/guides/knowledge-base/connect-external-knowledge-base.md @@ -15,7 +15,7 @@ * Difyプラットフォームは、クラウドサービスプロバイダーがホストするナレッジベース内のテキストコンテンツを直接取得できます。そのため、開発者はDify内のナレッジベースにコンテンツを再度移動させる必要がありません。 * Difyプラットフォームは、独自に構築したナレッジベース内でアルゴリズムによって処理されたテキストコンテンツを直接取得できます。これにより、開発者は自らのナレッジベースの情報検索メカニズムに注力し、情報のリコール精度を継続的に最適化・向上させることができます。 -

外部ナレッジベースとの接続の原理

+

外部ナレッジベースとの接続の原理

以下は、外部ナレッジに接続するための詳細な手順です: @@ -33,13 +33,13 @@ APIサービスの設定の前に、適合した外部ナレッジベースAPI * API Endpoint、[外部ナレッジベースAPI](external-knowledge-api-documentation.md)エンドポイントのURL、例:api-endpoint/retrieval;詳しい指示については外部ナレッジAPIを参照してください; * APIキー、外部ナレッジへの接続キー、詳しい指示については[外部ナレッジベースAPI](external-knowledge-api-documentation.md)を参照してください。 -

外部ナレッジAPIの関連付け

+

外部ナレッジAPIの関連付け

## 3. 外部ナレッジベースの接続 **「ナレッジベース」**ページに移動し、**「外部ナレッジベースの接続」**をクリックして、パラメータ設定ページに進みます。 -

外部ナレッジベースの接続

+

外部ナレッジベースの接続

以下のパラメータを入力してください: @@ -56,13 +56,13 @@ APIサービスの設定の前に、適合した外部ナレッジベースAPI **Score 閾値:** テキストセグメントの選択における類似性の閾値を設定します。このスコアを超えるテキストセグメントのみが取得されます。デフォルト値は0.5で、数値が高いほどテキストと問いの類似性が強く、取得されるテキストの数は少なくなります。 -
+
## 4. 外部ナレッジベースのテストと検索結果 外部ナレッジベースとの接続が確立された後、ユーザーは **「検索結果」**で可能なキーワードをシミュレーションし、取得されるテキストセグメントをプレビューできます。リコール結果に満足できない場合は、リコールパラメータを調整したり、**外部ナレッジベースの検索設定**を見直したりすることができます。 -

外部ナレッジベースのテストと検索結果

+

外部ナレッジベースのテストと検索結果

## 5. アプリ内で外部ナレッジベースを統合する @@ -70,13 +70,13 @@ APIサービスの設定の前に、適合した外部ナレッジベースAPI 構成ページで外部ナレッジベースを関連付けます -

チャットボット/エージェント

+

チャットボット/エージェント

* **チャットフロー/ワークフロー**タイプのアプリ **「ナレッジ検索」**ノードを追加し、外部ナレッジベースを選択します -

チャットフロー/ワークフロー

+

チャットフロー/ワークフロー

## 6. 外部ナレッジベースの管理 @@ -94,7 +94,7 @@ APIサービスの設定の前に、適合した外部ナレッジベースAPI 外部ナレッジベースが関連付けられた **「外部ナレッジベースAPI」** と **「外部ナレッジベースID」** は変更できません。変更が必要な場合は、新しい **「外部ナレッジベースAPI」** を関連付けて再接続してください。 -

ナレッジベースの設置

+

ナレッジベースの設置

### 接続示例 diff --git a/jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-online-datasource/sync-from-notion.md b/jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-online-datasource/sync-from-notion.md index 78cd488cf..c3570468e 100644 --- a/jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-online-datasource/sync-from-notion.md +++ b/jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-online-datasource/sync-from-notion.md @@ -41,11 +41,11 @@ Notionの統合は、**インターナル統合**(internal integration)と** **New integration**ボタンをクリックし、タイプはデフォルトで**インターナル**(変更不可)です。関連付けるスペースを選択し、統合名を入力しロゴをアップロードした後、**Submit**をクリックして統合を作成します。 -
+
統合を作成したら、必要に応じてCapabilitiesタブで設定を更新し、Secretsタブで**Show**ボタンをクリックしてSecretsをコピーします。 -
+
コピーした後、Difyのソースコードに戻り、**.env**ファイルに関連する環境変数を設定します。環境変数は以下の通りです: @@ -57,11 +57,11 @@ Notionの統合は、**インターナル統合**(internal integration)と** **インターナル統合をパブリック統合にアップグレードする必要があります**。統合の配布ページに移動し、スイッチを切り替えて統合を公開します。スイッチをパブリック設定に切り替えるには、以下の組織情報フォームに会社名、Webサイト、リダイレクトURLなどの情報を入力し、**Submit**ボタンをクリックします。 -
+
統合の設定ページで公開に成功すると、密鍵タブで統合の密鍵にアクセスできるようになります: -
+
Difyのソースコードに戻り、**.env**ファイルに関連する環境変数を設定します。環境変数は以下の通りです: diff --git a/jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-online-datasource/sync-from-website.md b/jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-online-datasource/sync-from-website.md index de9356d2a..9542a23e2 100644 --- a/jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-online-datasource/sync-from-website.md +++ b/jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-online-datasource/sync-from-website.md @@ -40,7 +40,7 @@ Dify のナレッジベースでは、[Jina Reader](https://jina.ai/reader)や[F [Jina Readerの公式サイト](https://jina.ai/reader) にログインして登録を完了し、APIキーを取得してから入力し、保存します。 -
+
### Jina Reader を使用してWebコンテンツをクロールする diff --git a/jp/guides/knowledge-base/external-data-tool.md b/jp/guides/knowledge-base/external-data-tool.md index a2481ad7f..0425ffad3 100644 --- a/jp/guides/knowledge-base/external-data-tool.md +++ b/jp/guides/knowledge-base/external-data-tool.md @@ -15,20 +15,20 @@ 1. 外部データツールを使用する前に、APIと認証用のAPIキーを準備してください。[external-data-tool.md](../extension/api-based-extension/external_data_tool.md "mention")を参照してください。 2. Difyは集中式のAPI管理を提供しており、設定画面でAPI拡張設定を統一して追加することで、Dify上の各種アプリケーションで直接使用できるようになります。 -

APIベースの拡張

+

APIベースの拡張

3. 例として「天気の問い合わせ」を取り上げ、「APIベースの拡張の追加」ダイアログに名前、APIエンドポイント、APIキーを入力します。保存後、APIを呼び出すことができます。 -

天気の問い合わせ

+

天気の問い合わせ

4. プロンプト編成ページで、「ツール」右側の「+追加」ボタンをクリックし、開いた「ツールの追加」ダイアログで名前と変数名(変数名はプロンプトに引用されるため、英語で記入してください)を記入し、ステップ2で追加したAPIベースの拡張を選択します。 -

外部データツール

+

外部データツール

5. これで、プロンプト編成フレームでクエリされた外部データをプロンプトに組み込むことができます。例えば、今日のロンドンの天気をクエリする場合、「location」変数を追加し、「London」を入力し、外部データツールの拡張変数名「weather_data」と組み合わせると、以下のようなデバッグ出力が得られます: -

天気検索ツール

+

天気検索ツール

対話ログでも、APIが返したリアルタイムデータを確認できます: -

プロンプトログ

\ No newline at end of file +

プロンプトログ

\ No newline at end of file diff --git a/jp/guides/knowledge-base/integrate-knowledge-within-application.md b/jp/guides/knowledge-base/integrate-knowledge-within-application.md index 32e0d9d7b..db087e357 100644 --- a/jp/guides/knowledge-base/integrate-knowledge-within-application.md +++ b/jp/guides/knowledge-base/integrate-knowledge-within-application.md @@ -23,11 +23,11 @@ 複数リコールモードでは、検索器はアプリに関連付けられたすべてのナレッジベースから、ユーザーの問題に関連するテキスト内容を検索します。そして、複数リコールの関連文書結果を統合します。以下は複数リコールモードの技術フローチャートです: -
+
ユーザーの意図に基づいて、すべての **「コンテキスト」** に追加されたナレッジベースを同時に検索し、関連するテキスト断片を複数のナレッジベースからクエリし、ユーザーの問題に最も一致する内容を選択します。最適なコンテンツをRerank戦略で見つけてユーザーに回答します。この方法はより科学的な検索原理です。 -
+
例:アプリAのコンテキストには、K1、K2、K3 の3つのナレッジベースが関連付けられています。ユーザーが問い合わせを入力すると、3つのナレッジベースで検索を行い、複数の内容をまとめます。最適な内容を見つけるためには、Rerank戦略を使用してユーザーの問題に最も関連する内容を特定し、結果をより正確で信頼性の高いものにします。 @@ -59,7 +59,7 @@ Rerankモデルは外部のスコアリングシステムで、ユーザーの Difyは現在、複数のRerankモデルをサポートしており、"モデルサプライヤー"ページでRerankモデル(例:Cohere、Jina AIなど)のAPIキーを入力することができます。 -

モデルサプライヤー内でRerankモデルを設定

+

モデルサプライヤー内でRerankモデルを設定

**調整可能なパラメータ** @@ -94,7 +94,7 @@ Difyは現在、複数のRerankモデルをサポートしており、"モデル 以下は、複数のリコール方法がナレッジベース検索に与える影響を示します: -
+
3. **複数のナレッジベースを引用する際、「重み設定」を調整できず、エラーが表示される場合はどう対処すれば良いですか?** diff --git a/jp/guides/knowledge-base/knowledge-and-documents-maintenance.md b/jp/guides/knowledge-base/knowledge-and-documents-maintenance.md index a0c5ec7cc..3f6c9852f 100644 --- a/jp/guides/knowledge-base/knowledge-and-documents-maintenance.md +++ b/jp/guides/knowledge-base/knowledge-and-documents-maintenance.md @@ -36,7 +36,7 @@ Difyチームのホームページで、「ナレッジベース」ボタンを Difyのナレッジベースは、標準APIの完全なセットを提供しています。開発者はAPI呼び出しを行うことで、ナレッジベース内のドキュメントやチャンクの追加、削除、変更、クエリなどの日常的な管理およびメンテナンス操作を実行できます。詳細については、[ナレッジベースAPIドキュメント](maintain-dataset-via-api.md)を参照してください。 -

ナレッジベースAPIの管理

+

ナレッジベースAPIの管理

*** diff --git a/jp/guides/knowledge-base/maintain-dataset-via-api.md b/jp/guides/knowledge-base/maintain-dataset-via-api.md index 2b4ed0972..e7f472d6f 100644 --- a/jp/guides/knowledge-base/maintain-dataset-via-api.md +++ b/jp/guides/knowledge-base/maintain-dataset-via-api.md @@ -17,7 +17,7 @@ APIを利用してナレッジベースを管理することで、データ処 ナレッジベースページにアクセスし、左側のナビゲーションで **API** ページに切り替えます。このページでは、Difyが提供するナレッジベースAPIドキュメントを確認し、 **APIキー** でナレッジベースAPIにアクセスするための資格情報を管理できます。 -

Knowledge API ドキュメント

+

Knowledge API ドキュメント

### API呼び出しの例 diff --git a/jp/guides/knowledge-base/retrieval-test-and-citation.md b/jp/guides/knowledge-base/retrieval-test-and-citation.md index 2d354f2ea..4c0a52078 100644 --- a/jp/guides/knowledge-base/retrieval-test-and-citation.md +++ b/jp/guides/knowledge-base/retrieval-test-and-citation.md @@ -60,8 +60,8 @@ Difyのナレッジベースでは、テキストによる検索テスト機能 アプリケーション内でナレッジベースの効果をテストする際、**スタジオ -- 機能追加 -- 引用と帰属**に進み、引用と帰属機能を有効にします。 -

引用と帰属機能を有効にする

+

引用と帰属機能を有効にする

機能を有効にすると、大規模言語モデルが質問に回答する際にナレッジベースからの内容を引用した場合、返信内容の下に具体的な引用段落情報を確認できます。これには**元のパラグラフテキスト、パラグラフ番号、マッチ度**などが含まれます。引用段落上部の**ナレッジベースにジャンプ**をクリックすると、開発者がデバッグ編集を行いやすいように、そのパラグラフが含まれるナレッジベースのパラグラフリストに簡単にアクセスできます。 -

返信内容の引用情報を確認する

+

返信内容の引用情報を確認する

diff --git a/jp/guides/management/app-management.md b/jp/guides/management/app-management.md index 34730efb3..9775d3b33 100644 --- a/jp/guides/management/app-management.md +++ b/jp/guides/management/app-management.md @@ -4,7 +4,7 @@ アプリを作成した後に、アプリ名や説明を変更したい場合は、アプリの左上隅にある「情報の編集」をクリックしてください。これにより、アプリのアイコン、名前、または説明を修正できます。 -

アプリ情報の編集

+

アプリ情報の編集

### アプリの複製 @@ -21,14 +21,14 @@ Difyで作成されたアプリはDSL形式でエクスポートをサポート * シナリオページ中のアプリカードの右下隅の"DSLをエクスポート"をクリックする。 * アプリ内のオーケストレートページに入れるあど、左上隅の"DSLをエクスポート"のボタンをクリックする。 -![](../../.gitbook/assets/export-dsl.png) +![](https://assets-docs.dify.ai/img/jp/management/457a66965cf27bf5960954bba25c96dc.webp) DSLファイルは以下の機密情報を含まれません: * APIキーなどの第三者ツールの認証情報 * 環境変数に`Secret`が含まれる場合、DSLをエクスポートするときに機密情報のエクスポートを許可するかどうかを尋ねるメッセージが表示されます。 -![](../../.gitbook/assets/export-dsl-secret.png) +![](https://assets-docs.dify.ai/img/jp/management/c3b27947ca294bf846af82df0f87ae31.webp) {% hint style="info" %} Dify DSLは、Dify.AIによってv0.6以降で定義されたAIアプリエンジニアリングファイル標準です。ファイル形式はYMLで、アプリの基本的な説明、モデルパラメータ、オーケストレーション構成などをカバーしています。 diff --git a/jp/guides/management/personal-account-management.md b/jp/guides/management/personal-account-management.md index 0c0910291..d319b4ad8 100644 --- a/jp/guides/management/personal-account-management.md +++ b/jp/guides/management/personal-account-management.md @@ -11,7 +11,7 @@ Difyのバージョンによってサポートされるログイン方法は以 > 注意点:Difyのクラウドサービスでは、GitHubやGoogleアカウントに紐づくメールアドレスが、認証コードでログインする際のメールアドレスと一致している場合、システムが自動的にそれらを同一のアカウントとみなして紐づけます。これにより、手動でのアカウント連携を省略し、重複したアカウント作成を防ぎます。 -![ログイン方法の図解](../../../en/.gitbook/assets/image.png) +![ログイン方法の図解](https://assets-docs.dify.ai/img/jp/management/26684180aaab9589d6d8707759356caf.webp) ## 個人情報の変更 @@ -28,7 +28,7 @@ Difyのバージョンによってサポートされるログイン方法は以 * メールアドレス * パスワード -
+
### ログイン方法 diff --git a/jp/guides/management/subscription-management.md b/jp/guides/management/subscription-management.md index 878a8dba8..57253d2a2 100644 --- a/jp/guides/management/subscription-management.md +++ b/jp/guides/management/subscription-management.md @@ -10,7 +10,7 @@ Difyの有料サービス(ProfessionalまたはTeamプラン)に加入後、 請求ページでは、さまざまなチームリソースの利用状況を確認できます。 -

チームの請求管理

+

チームの請求管理

### よくある質問 @@ -21,7 +21,7 @@ Difyの有料サービス(ProfessionalまたはTeamプラン)に加入後、 * ProfessionalプランからTeamプランにアップグレードする際は、当月の差額を支払う必要があり、すぐに適用されます。 * TeamプランからProfessionalプランにダウングレードする場合も、即座に適用されます。 -

有料プランの変更

+

有料プランの変更

サブスクリプションプランをキャンセルすると、**チームは現在の請求サイクルの終了時に自動的にサンドボックス/無料プランに移行**し、その後はサンドボックス/無料プランの制限に従った利用となります。 diff --git a/jp/guides/management/team-members-management.md b/jp/guides/management/team-members-management.md index 425c71de2..e8dcc45e5 100644 --- a/jp/guides/management/team-members-management.md +++ b/jp/guides/management/team-members-management.md @@ -14,14 +14,14 @@ メンバーを追加するには、チームの所有者や管理人は右上隅のアバターをクリックし、**"メンバー"** → **"追加"**を選択します。メールアドレスを入力し、メンバー権限を割り当ててプロセスを完了します。 -

チームメンバーへの権限の割り当て

+

チームメンバーへの権限の割り当て

> コミュニティエディションでメール機能を有効にするには、チームオーナーがシステムの[環境変数](../../getting-started/install-self-hosted/environments)を設定してメールサービスをオンにする必要があります。 - Difyに未登録の招待メンバーには、招待メールが送信されます。メール内のリンクをクリックすることで、登録を完了できます。 - すでにDifyに登録済みの招待メンバーには、権限が自動で付与され、**招待メールは送信されません**。招待されたメンバーは、右上のメニューから新しいワークスペースに切り替えることができます。 -![](../../../img/switch-workspace.png) +![](https://assets-docs.dify.ai/img/jp/management/127c49e4102f75e9acc5d1cf37a51f14.webp) ### メンバーの権限 @@ -48,7 +48,7 @@ メンバーを削除するには、Difyチームのホームページの右上隅のアバターをクリックし、**"設定"** → **"メンバー"**に移動し、削除するメンバーを選択して**"チームから削除"**をクリックします。 -

メンバーの削除

+

メンバーの削除

### よくある質問 diff --git a/jp/guides/model-configuration/README.md b/jp/guides/model-configuration/README.md index 5884cb261..026d70ac5 100644 --- a/jp/guides/model-configuration/README.md +++ b/jp/guides/model-configuration/README.md @@ -2,7 +2,7 @@ Difyは大規模言語モデルに基づいたAIアプリケーション開発プラットフォームです。初めて使用する際には、Difyの**設定 -- モデルプロバイダー**ページで必要なモデルを追加および設定してください。 -
+
Difyは現在、OpenAIのGPTシリーズやAnthropicのClaudeシリーズなど、主流のモデルプロバイダーをサポートしています。異なるモデルの能力やパラメータの種類が異なるため、アプリケーションのニーズに応じて適切なモデルプロバイダーを選択できます。**Difyで以下のモデル能力を使用する前に、各モデルプロバイダーの公式サイトでAPIキーを取得する必要があります。** @@ -35,7 +35,7 @@ Difyクラウドサービスのユーザーには、異なるモデルの試用 Difyは使用シーンに応じて設定されたデフォルトモデルを選択します。`設定 > モデルプロバイダー`でデフォルトモデルを設定します。 -
+
システム推論モデル:アプリケーションの作成に使用されるデフォルトの推論モデルを設定し、対話名の生成や次のステップの質問に関する提案などの機能も含まれます。 @@ -43,7 +43,7 @@ Difyは使用シーンに応じて設定されたデフォルトモデルを選 Difyの`設定 > モデルプロバイダー`で接続するモデルを設定します。 -
+
モデルプロバイダーは2種類に分かれます: @@ -75,4 +75,4 @@ Difyは[PKCS1\_OAEP](https://pycryptodome.readthedocs.io/en/latest/src/cipher/oa モデルの設定が完了したら、アプリケーションでこれらのモデルを使用できます: -
+
diff --git a/jp/guides/model-configuration/customizable-model.md b/jp/guides/model-configuration/customizable-model.md index 2f500d9b6..71ca5a670 100644 --- a/jp/guides/model-configuration/customizable-model.md +++ b/jp/guides/model-configuration/customizable-model.md @@ -8,7 +8,7 @@ 事前定義モデルとは異なり、カスタムベンダーのインテグレーション時には常に以下の2つのパラメータが存在し、ベンダー yaml に定義する必要はありません。 -
+
前述したように、ベンダーは`validate_provider_credential`を実装する必要はなく、Runtimeがユーザーが選択したモデルタイプとモデル名に基づいて、対応するモデル層の`validate_credentials`を呼び出して検証を行います。 diff --git a/jp/guides/model-configuration/load-balancing.md b/jp/guides/model-configuration/load-balancing.md index 6025bafbd..376f7dc07 100644 --- a/jp/guides/model-configuration/load-balancing.md +++ b/jp/guides/model-configuration/load-balancing.md @@ -6,7 +6,7 @@ **モデルプロバイダー -- モデルリスト -- 負荷分散の設定** でこの機能を有効にし、同じモデルに複数の資格情報(APIキー)を追加することができます。 -

モデルを負荷分散する

+

モデルを負荷分散する

{% hint style="info" %} モデル負荷分散は有料機能です。[SaaS有料サービスのサブスクリプション](../../getting-started/cloud.md#ding-yue-ji-hua)または企業版の購入を通じてこの機能を有効にすることができます。 @@ -14,17 +14,17 @@ デフォルト設定では、APIキーは初回設定時にモデルプロバイダーに追加された資格情報です。**設定の追加** をクリックして、同じモデルの異なるAPIキーを追加することで、負荷分散機能を正常に使用できます。 -

負荷分散の設定

+

負荷分散の設定

**少なくとも1つの追加モデル資格情報**を追加することで、保存し負荷分散を有効にできます。 既に設定されている資格情報を**一時的に無効化**または**削除**することも可能です。 -
+
設定完了後、モデルリスト内にすべての有効な負荷分散モデルが表示されます。 -

負荷分散の有効化

+

負荷分散の有効化

{% hint style="info" %} デフォルトでは、負荷分散はラウンドロビン戦略を使用します。レート制限を超えた場合、1分間のクールダウンタイムが適用されます。 @@ -32,4 +32,4 @@ **モデルの追加**からも負荷分散を設定することができ、設定手順は上記と同じです。 -

モデルの追加から負荷分散を設定

+

モデルの追加から負荷分散を設定

diff --git a/jp/guides/monitoring/README.md b/jp/guides/monitoring/README.md index f4ad7df12..483b04071 100644 --- a/jp/guides/monitoring/README.md +++ b/jp/guides/monitoring/README.md @@ -2,4 +2,4 @@ **概要** で本番環境におけるアプリケーションのパフォーマンスをモニタリングし、データ分析ダッシュボードで本番環境におけるアプリケーションの使用コスト、レイテンシ、ユーザーフィードバック、パフォーマンスなどの指標を分析します。継続デバッグおよびイテレーションを通じてアプリケーションを絶えず改善します。 -

概要

\ No newline at end of file +

概要

\ No newline at end of file diff --git a/jp/guides/monitoring/analysis.md b/jp/guides/monitoring/analysis.md index d14cfe8b5..5a3059261 100644 --- a/jp/guides/monitoring/analysis.md +++ b/jp/guides/monitoring/analysis.md @@ -2,7 +2,7 @@ **監視 — 分析** では、使用量、アクティブユーザー数、大規模言語モデル (LLM) のコール消費などを表示します。これにより、アプリケーションの運営効果、活性度、経済性を継続的に改善できます。さらに多くの有用な可視化能力を段階的に提供していきますので、ぜひご要望をお知らせください。 -

監視 — 分析

+

監視 — 分析

*** diff --git a/jp/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md b/jp/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md index 5e3e4098b..52087727b 100644 --- a/jp/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md +++ b/jp/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md @@ -16,35 +16,35 @@ Langfuseの公式サイト:[https://langfuse.com/](https://langfuse.com/) 2. Langfuseからプロジェクトを作成します ログイン後、ホームページの **New** をクリックし、新たな**プロジェクト**を作成します。このプロジェクトは、Dify内の**アプリ**と連動したデータモニタリングに使用されます。 -

新たなプロジェクトを作成します。

+

新たなプロジェクトを作成します。

プロジェクトの名前を付けます。 -

プロジェクトの名前を付けます。

+

プロジェクトの名前を付けます。

3. プロジェクト認証情報の作成のために、左のサイドバーでプロジェクト **設定** をクリックする。 -

左のサイドバーをクリックします

+

左のサイドバーをクリックします

**Create API Key**をクリックし,新たな認証情報を作ります。 -

プロジェクトのAPI Keyを作ります。

+

プロジェクトのAPI Keyを作ります。

**Secret Key** と **Public Key,Host** をコピーし、保存します。 -

APIキーの設定を取得する

+

APIキーの設定を取得する

4. Dify アプリの中に Langfuse を設定します。監視用のアプリのサイトメニューの**監視**ボタンをクリックし,**設定**をクリックします。 -

Langfuseを設定します

+

Langfuseを設定します

それから,Langfuse から作った **Secret Key, Public Key** と **Host** を**設定**の中に貼り付け、保存します。 -

Langfuseを設定します

+

Langfuseを設定します

保存に成功すると、現在のページで監視状態を見ることができます。 -

監視状態を見る

+

監視状態を見る

*** @@ -52,9 +52,9 @@ Langfuseの公式サイト:[https://langfuse.com/](https://langfuse.com/) 設定した後, Difyのアプリや生産データは Langfuse の中にチェクをできます。 -

Dify 内でのアプリの調整

+

Dify 内でのアプリの調整

-

Langfuseでアプリデータを見る

+

Langfuseでアプリデータを見る

*** diff --git a/jp/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md b/jp/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md index 5d431dbb4..cf1848ba8 100644 --- a/jp/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md +++ b/jp/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md @@ -18,39 +18,39 @@ LangSmithの公式サイト:[https://www.langchain.com/langsmith](https://www. ログイン後、ホームページの **New Project** をクリックし、新たな**プロジェクト**を作成します。このプロジェクトは、Dify内の**アプリ**と連動したデータモニタリングに使用されます。 -

新たなプロジェクトを作成します。

+

新たなプロジェクトを作成します。

作成する後、プロジェクトの中にチェクできます。 -

LangSmithの中にプロジェクトをチェクします。

+

LangSmithの中にプロジェクトをチェクします。

#### 3. プロジェクト認証情報の作成 左のサイドバーでプロジェクト **設定** を見つける。 -

プロジェクトを設定し

+

プロジェクトを設定し

**Create API Key**をクリックし,新たな認証情報を作ります。 -

プロジェクトのAPI Keyを作ります。

+

プロジェクトのAPI Keyを作ります。

**Personal Access Token** を選び,のちほとのAPI身分証明の時使えます。 -

Personal Access Tokenを選択します

+

Personal Access Tokenを選択します

新たなAPI keyをコピーし、保存します。 -

新たなAPI keyをコピーします

+

新たなAPI keyをコピーします

#### 4. Dify アプリの中に LangSmith を設定します 監視用のアプリのサイトメニューの**監視**ボタンをクリックし,**設定**をクリックします。 -

LangSmithを設定します

+

LangSmithを設定します

それから,LangSmith から作った **API Key** と**プロジェクト名**を**設定**の中に貼り付け、保存します。 -

LangSmithを設定します。

+

LangSmithを設定します。

{% hint style="info" %} 設定したプロジェクト名は LangSmith のいるプロジェクト名と必ず一致します。一致しない場合、データの同期時に LangSmith は自動的に新しいプロジェクトを作成します。 @@ -58,21 +58,21 @@ LangSmithの公式サイト:[https://www.langchain.com/langsmith](https://www. 保存に成功すると、現在のページで監視状態を見ることができます。 -

監視状態を見る

+

監視状態を見る

### LangSmithでのモニタリングデータの表示 Dify内のアプリケーションからデバッグや製品データを設定することで、LangSmithにてそのデータをモニタリングすることができます。 -

Difyにおけるアプリケーションのデバッグ

+

Difyにおけるアプリケーションのデバッグ

LangSmithに切り替えると、ダッシュボード上でDifyアプリケーションの詳細な操作ログを見ることができます。 -

LangSmithでのアプリケーションデータの表示

+

LangSmithでのアプリケーションデータの表示

LangSmithを通じて得られる詳細な大規模言語モデル(LLM)の操作ログは、Difyアプリケーションのパフォーマンスを最適化するために役立ちます。 -

LangSmithでのアプリケーションデータの表示

+

LangSmithでのアプリケーションデータの表示

### モニタリングデータリスト diff --git a/jp/guides/tools/README.md b/jp/guides/tools/README.md index 5f93da9a6..ca17e7a1b 100644 --- a/jp/guides/tools/README.md +++ b/jp/guides/tools/README.md @@ -13,7 +13,7 @@ Difyエコシステムが提供するファーストパーティツールを直 ### ファーストパーティツールの設定方法 -

ファーストパーティツールリスト

+

ファーストパーティツールリスト

Difyは現在、以下のツールをサポートしています: @@ -27,7 +27,7 @@ Difyに自分で開発したツールを貢献することを歓迎します。 Difyエコシステムが提供するファーストパーティ・ビルトインツールを直接使用する場合、使用前に適切な認証情報を設定する必要があります。 -

ファーストパーティツール認証情報の設定

+

ファーストパーティツール認証情報の設定

認証情報の検証が成功すると、ツールは「認証済み」の状態になります。認証情報が設定されると、ワークスペース内のすべてのメンバーがアプリケーションの編成時にこのツールを使用できます。 @@ -37,15 +37,15 @@ Difyエコシステムが提供するファーストパーティ・ビルトイ ツールは現在、2種類の認証方式をサポートしています:無認証とAPIキー。 -

カスタムツールの作成

+

カスタムツールの作成

スキーマ内容をインポートすると、システムはファイル内のパラメーターを自動的に解析し、ツールの具体的なパラメーター、方法、パスをプレビューできます。ここでツールのパラメーターをテストすることもできます。 -

カスタムツールのパラメータテスト

+

カスタムツールのパラメータテスト

カスタムツールの作成が完了すると、ワークスペース内のすべてのメンバーが「スタジオ」内でアプリケーションを編成する際にこのツールを使用できます。 -

カスタムツールが追加されました

+

カスタムツールが追加されました

#### Cloudflare Workers @@ -58,8 +58,8 @@ Difyエコシステムが提供するファーストパーティ・ビルトイ 現在、「スタジオ」で**エージェント型アプリケーション**を作成する際に、認証情報が設定されたツールを使用できます。 -

エージェント型アプリケーション作成時にツールを追加

+

エージェント型アプリケーション作成時にツールを追加

以下の図のように、財務分析アプリケーションにツールを追加すると、エージェントは必要に応じてツールを自動的に呼び出し、ツールから財務報告データを取得し、それを解析してユーザーとの対話を完了します。 -

エージェントが対話中にツールを呼び出して質問に回答

\ No newline at end of file +

エージェントが対話中にツールを呼び出して質問に回答

\ No newline at end of file diff --git a/jp/guides/tools/quick-tool-integration.md b/jp/guides/tools/quick-tool-integration.md index b2354771c..b6a7e52ab 100644 --- a/jp/guides/tools/quick-tool-integration.md +++ b/jp/guides/tools/quick-tool-integration.md @@ -275,4 +275,4 @@ class GoogleProvider(BuiltinToolProviderController): もちろん、google検索は資格情報を必要とするため、使用前にフロントエンドで資格情報を設定する必要があります。 -
+
diff --git a/jp/guides/tools/tool-configuration/Perplexity.md b/jp/guides/tools/tool-configuration/Perplexity.md index dd5ae9607..609e36c92 100644 --- a/jp/guides/tools/tool-configuration/Perplexity.md +++ b/jp/guides/tools/tool-configuration/Perplexity.md @@ -11,7 +11,7 @@ Perplexityは、複雑なクエリを理解し、正確で関連性の高いリ Difyのナビゲーションページで、`ツール > Perplexity > 認証する`の順にクリックし、APIキーを入力してください。 -![](../../../../img/tools-perplexity.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/001626f39cbf672dc4661ad24fedd122.webp) ## 3. ツールの使用方法 @@ -21,10 +21,10 @@ Difyのナビゲーションページで、`ツール > Perplexity > 認証す チャットフローとワークフローアプリで、Perplexityツールノードの追加がサポートされています。ユーザーの入力コンテンツは変数を介してPerplexityツールノードの「クエリ」ボックスに渡され、必要に応じてPerplexityツールの組み込みパラメータを調整します。最後に、「終了」ノードの応答ボックスでPerplexityツールノードの出力コンテンツを選択します。 -![](../../../../img/tools-chatflow-perplexity.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/e2f98fdd5be7103f5552eb41d0e62c8b.webp) - **エージェントアプリ** エージェントアプリに`Perplexity検索`ツールを追加し、関連するコマンドを入力してこのツールを呼び出します。 -![](../../../../img/tools-agent-perplexity.png) \ No newline at end of file +![](https://assets-docs.dify.ai/img/jp/tool-configuration/f7a8a875bedc13091ad297a2b91e3a2b.webp) \ No newline at end of file diff --git a/jp/guides/tools/tool-configuration/bing.md b/jp/guides/tools/tool-configuration/bing.md index 2b9adefc3..fb86fc717 100644 --- a/jp/guides/tools/tool-configuration/bing.md +++ b/jp/guides/tools/tool-configuration/bing.md @@ -12,7 +12,7 @@ Bing検索ツールは、LLM(大規模言語モデル)アプリを使用す Difyのナビゲーションページで、`ツール > Bing > 認証する`の順にクリックし、API キーを入力してください。 -![](../../../.gitbook/assets/tools-bing.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/6a4dfdcb1871100bc810ae5f4c05f808.webp) ## 3. ツールの使用方法 diff --git a/jp/guides/tools/tool-configuration/comfyui.md b/jp/guides/tools/tool-configuration/comfyui.md index fec04a268..3d580cc7a 100644 --- a/jp/guides/tools/tool-configuration/comfyui.md +++ b/jp/guides/tools/tool-configuration/comfyui.md @@ -9,10 +9,10 @@ ComfyUIが正常に動作し、画像が生成されることを確かめるた Difyを介してプロンプトを渡す必要がない場合は、この手順をスキップできます。プロンプトノードが ComfyUI の唯一の `KSampler` ノードに接続されている場合は、この手順もスキップできます。 それ以外の場合は、ポジティブなプロンプトの単語の内容を置き換えるには文字列 `{{positive_prompt}}` を使用し、ネガティヴなプロンプトの単語の内容を置き換えるには `{{negative_prompt}}` を使用してください。 -
+
## 3. ワークフローのAPIファイルをエクスポートします。 -
+
画像のように、「Save (API Format)」を選択してください。このオプションが表示されない場合は、設定で「Dev Mode」を有効にする必要があります。 ## 4. DifyにComfyUIを統合します。 diff --git a/jp/guides/tools/tool-configuration/dall-e.md b/jp/guides/tools/tool-configuration/dall-e.md index a11cf7dd2..fc3e57591 100644 --- a/jp/guides/tools/tool-configuration/dall-e.md +++ b/jp/guides/tools/tool-configuration/dall-e.md @@ -10,7 +10,7 @@ Difyのナビゲーションページで `ツール > DALL-E > 認証する` の順にクリックし、API キーを入力してください。 -![](../../../.gitbook/assets/tools-dalle.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/3fe0eb51cfc75f0b6facb518d5e789a5.webp) ## 3. ツールの使用方法 @@ -18,10 +18,10 @@ Difyのナビゲーションページで `ツール > DALL-E > 認証する` の チャットフローやワークフローアプリでは、`DALL-E 絵画` ツールノードを追加することができます。追加後、ノード内の "入力変数 → プロンプト" に、ユーザーの入力プロンプトや前のノードで生成されたコンテンツへの[変数](https://docs.dify.ai/v/ja-jp/guides/workflow/variables)を入力する必要があります。最後に、変数を使用して `DALL-E 絵画` の出力画像を "終了" ノードで参照します。 -![](../../../../img/dalle3-node.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/2c7bb68fe4a5b591f18b697696fdfee9.webp) * **エージェントアプリ** エージェントアプリ内で `DALL-E` ツールを追加し、ダイアログボックスに画像の説明を送信して、ツールを呼び出してAI画像を生成します。 -![](../../../.gitbook/assets/agent-dalle3.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/ba7d5da39f6d9de497fa75e72381b3a8.webp) diff --git a/jp/guides/tools/tool-configuration/google.md b/jp/guides/tools/tool-configuration/google.md index d0f0094c8..1421269ac 100644 --- a/jp/guides/tools/tool-configuration/google.md +++ b/jp/guides/tools/tool-configuration/google.md @@ -12,7 +12,7 @@ Google 検索ツールは、LMS アプリを用いてオンライン検索結果 Dify のナビゲーションページで、`ツール > Google > 認証する` の順にクリックし、API キーを入力してください。 -![](../../../.gitbook/assets/tools-google.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/f626c043fe814f971eaf630cf56442fa.webp) ## 3. ツールの使用方法 diff --git a/jp/guides/tools/tool-configuration/searchapi.md b/jp/guides/tools/tool-configuration/searchapi.md index 884d1afec..554863ea3 100644 --- a/jp/guides/tools/tool-configuration/searchapi.md +++ b/jp/guides/tools/tool-configuration/searchapi.md @@ -12,7 +12,7 @@ SearchApiは、Google検索、Google Jobs、YouTube、Googleニュースなど Difyのナビゲーションページから `ツール > SearchApi > 認証する`の順にクリックし、API キーを入力してください。 -![](../../../.gitbook/assets/tool-searchapi.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/368c00090eac4865d152f0fde2073789.webp) ## 3. ツールの使用方法 @@ -22,7 +22,7 @@ Difyのナビゲーションページから `ツール > SearchApi > 認証す チャットフローとワークフローアプリでは、`SearchApi`のツールノードを追加することで、Google Jobs API、Google News API、Google Search API、YouTube Data APIの4つの異なるツールを使用可能にします。 -![](../../../.gitbook/assets/tool-searchapi-flow.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/5c387872fdc5ab89d88d8b44a1bf6b31.webp) * **エージェントアプリ** diff --git a/jp/guides/tools/tool-configuration/serper.md b/jp/guides/tools/tool-configuration/serper.md index 26a816c78..20a0750e3 100644 --- a/jp/guides/tools/tool-configuration/serper.md +++ b/jp/guides/tools/tool-configuration/serper.md @@ -12,7 +12,7 @@ Serperは、Google検索エンジンから取得した構造化データを提 Difyのナビゲーションページから `ツール > Serper > 認証する` をタップし、APIキーを入力してください。 -![](../../../.gitbook/assets/tool-serper.png) +![](https://assets-docs.dify.ai/img/jp/tool-configuration/e4f9d3a9dda467a905e7887d0e2c514b.webp) ## 3. ツールの使用方法 diff --git a/jp/guides/tools/tool-configuration/siliconflow.md b/jp/guides/tools/tool-configuration/siliconflow.md index a606a5665..268f31944 100644 --- a/jp/guides/tools/tool-configuration/siliconflow.md +++ b/jp/guides/tools/tool-configuration/siliconflow.md @@ -12,7 +12,7 @@ SiliconFlowは、優れたオープンソースの基盤モデルをもとに、 Difyのツールページで、`SiliconCloud > To Authorize`をクリックし、APIキーを入力します。 -
+
## 3. ツールの使用 @@ -20,12 +20,12 @@ Difyのツールページで、`SiliconCloud > To Authorize`をクリックし ChatflowおよびWorkflowアプリケーションでは、`SiliconFlow`ツールノードを追加できます。ユーザーの入力内容を[変数](https://docs.dify.ai/v/ja-jp/guides/workflow/variables)を通じてSiliconFlowツールノードの「prompt」や「negative prompt」ボックスに渡し、必要に応じて内蔵パラメータを調整します。最後に、「end」ノードの返信ボックスでSiliconFlowツールノードの出力内容(テキスト、画像など)を選択します。 -
+
* **エージェントアプリ** エージェントアプリでは、`Stable Diffusion`または`Flux`ツールを追加し、対話ボックスで画像の説明を送信することで、そのツールを呼び出して画像を生成します。 -
+
-
+
diff --git a/jp/guides/workflow/README.md b/jp/guides/workflow/README.md index eebd93afe..55e284a2e 100644 --- a/jp/guides/workflow/README.md +++ b/jp/guides/workflow/README.md @@ -9,7 +9,7 @@ Difyワークフローには、以下の2種類があります: * **チャットフロー**:カスタマーサービス、セマンティック検索、その他の対話型アプリケーションの構築において、複数のステップを含む論理を必要とする対話型シナリオに対応します。 * **ワークフロー**:自動化とバッチ処理のシナリオに対応し、高品質な翻訳、データ分析、コンテンツ生成、メール自動化などのアプリケーションに適しています。 -
+
自然言語入力におけるユーザー意図認識の複雑さを解決するために、チャットフローは問題理解ノードを提供します。ワークフローに対してチャットボット特性のサポートを追加し、会話履歴(メモリ)、注釈付き返信、Answerノードなどを含みます。 diff --git a/jp/guides/workflow/additional-features.md b/jp/guides/workflow/additional-features.md index 22ec131e9..a51b2a68a 100644 --- a/jp/guides/workflow/additional-features.md +++ b/jp/guides/workflow/additional-features.md @@ -24,7 +24,7 @@ 最後に、ENDノードでLLMノードの出力変数を選択し、設定を完了させます。 -

視覚分析能力の有効化

+

視覚分析能力の有効化

### チャットフロー @@ -43,7 +43,7 @@ ドキュメント、画像、音声、ビデオ、その他のファイル形式をサポートしています。この機能を有効にすると、アプリの使用者は対話の過程でいつでもファイルをアップロードおよび更新できます。最大10個のファイルを同時にアップロードでき、各ファイルのサイズ上限は15MBです。 -

ファイルのアップロード機能

+

ファイルのアップロード機能

* **引用と帰属** [「知識検索」](node/knowledge-retrieval.md)ノードと組み合わせることで、LLMが応答した際の参照元ドキュメントと帰属部分を表示します。 @@ -59,7 +59,7 @@ **ユーザー向け:** ファイルのアップロード機能が有効化されたチャットフローアプリでは、対話ボックスの右側に「クリップ」アイコンが表示されます。このアイコンをクリックすることでファイルをアップロードし、LLMと対話できます。 -

ファイルのアップロードの使用

+

ファイルのアップロードの使用

**アプリ開発者向け:** diff --git a/jp/guides/workflow/bulletin.md b/jp/guides/workflow/bulletin.md index 9026addd8..6d60dbb1a 100644 --- a/jp/guides/workflow/bulletin.md +++ b/jp/guides/workflow/bulletin.md @@ -8,11 +8,11 @@ description: 作者:Evanchen , Allen. * チャットフローの「機能」から画像アップロードオプションを削除し、新たに「ファイルアップロード」機能を追加します。この機能は、画像ファイルタイプを選択できます。また、アプリのダイアログボックス内の画像アップロードアイコンもファイルアップロードアイコンに変更されました。 -
+
* **ワークフローの機能および`sys.files`[変数](./variables.md)にあった画像アップロードオプションは、将来的に廃止されます。** 両方とも`LEGACY`としてマークされ、開発者にはワークフローにファイルアップロード機能を追加するためにカスタムファイル変数の使用が推奨されています。 -
+
### 「画像アップロード」機能を統合する理由 @@ -27,7 +27,7 @@ description: 作者:Evanchen , Allen. * ファイルアップロード機能により、ファイルはワークフロー内でファイル変数としてアップロード、解析、参照、ダウンロードされます。 * 開発者は、画像、音声、映像を含む複雑なタスクの理解と処理が可能なアプリを簡単に構築できます。 -
+
単独の「画像アップロード」機能の使用を推奨せず、アプリ体験を向上させるために包括的な「ファイルアップロード」機能への移行をお勧めします。 @@ -39,11 +39,11 @@ description: 作者:Evanchen , Allen. すでに「画像アップロード」機能が有効になっているチャットフローを作成した場合、LLMノードでビジョン機能を有効にすると、システムは機能を自動的に切り替え、アプリの画像アップロード機能に影響を与えません。アプリを更新して再公開する必要がある場合は、LLMノードのビジョン変数選択ボックスでファイル変数を選択し、チェックリストからアイテムをクリアしてアプリを再公開してください。 -
+
チャットフローに「画像アップロード」機能を追加したい場合は、機能で「ファイルアップロード」を有効にし、「画像」ファイルタイプのみを選択してください。その後、LLMノードでビジョン機能を有効にし、sys.files変数を指定してください。アップロードエントリは「ペーパークリップ」アイコンとして表示されます。詳細な手順については、追加機能を参照してください。 -
+
* **ワークフロー** diff --git a/jp/guides/workflow/debug-and-preview/checklist.md b/jp/guides/workflow/debug-and-preview/checklist.md index 3618cc8a0..6de6d35fc 100644 --- a/jp/guides/workflow/debug-and-preview/checklist.md +++ b/jp/guides/workflow/debug-and-preview/checklist.md @@ -2,5 +2,5 @@ 調整動作に入る前に、未完了の設定や接続されていないノードがないかチェックリストで確認できます。 -
+
diff --git a/jp/guides/workflow/debug-and-preview/history.md b/jp/guides/workflow/debug-and-preview/history.md index 2865ca063..c3de607ca 100644 --- a/jp/guides/workflow/debug-and-preview/history.md +++ b/jp/guides/workflow/debug-and-preview/history.md @@ -2,4 +2,4 @@ 「実行履歴」では、現在のワークフローのデバッグ履歴の実行結果およびログ情報を確認できます。 -
\ No newline at end of file +
\ No newline at end of file diff --git a/jp/guides/workflow/debug-and-preview/log.md b/jp/guides/workflow/debug-and-preview/log.md index a8b11e182..ac5718ed3 100644 --- a/jp/guides/workflow/debug-and-preview/log.md +++ b/jp/guides/workflow/debug-and-preview/log.md @@ -2,8 +2,8 @@ 「ログを表示—詳細」をクリックすると、詳細情報、入力/出力、メタデータ情報などの実行概要を見ることができます。 -
+
「ログを表示-追跡」をクリックすると、ワークフローの各ノードの入力/出力、トークン消費、実行時間などの完全な実行過程を見ることができます。 -
\ No newline at end of file +
\ No newline at end of file diff --git a/jp/guides/workflow/debug-and-preview/step-run.md b/jp/guides/workflow/debug-and-preview/step-run.md index 3b3db48a8..5826738d3 100644 --- a/jp/guides/workflow/debug-and-preview/step-run.md +++ b/jp/guides/workflow/debug-and-preview/step-run.md @@ -2,8 +2,8 @@ ワークフローはノードのステップの実行をサポートしており、ステップを実行中に現在のノードの実行が期待通りかどうかを繰り返しテストすることができます。 -
+
ステップテスト実行後、実行ステータス、入力/出力、メタデータ情報を確認することができます。 -
\ No newline at end of file +
\ No newline at end of file diff --git a/jp/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md b/jp/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md index 69f08eb13..8069d5306 100644 --- a/jp/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md +++ b/jp/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md @@ -2,12 +2,12 @@ Difyワークフローでは、完全な実行とデバッグ機能を提供しています。対話型アプリケーションでは、クリック「プレビュー」でデバッグモードに入ります。 -
+
ワークフローアプリケーションでは、クリック「実行」でデバッグモードに入ります。 -
+
デバッグモードに入ると、インターフェースの右側で設定済みのワークフローをデバッグできます。 -
\ No newline at end of file +
\ No newline at end of file diff --git a/jp/guides/workflow/extract_import_template.md b/jp/guides/workflow/extract_import_template.md index 22017f575..ae0cee436 100644 --- a/jp/guides/workflow/extract_import_template.md +++ b/jp/guides/workflow/extract_import_template.md @@ -4,13 +4,13 @@ スタジオのアプリケーションリスト内でDSLファイルをインポートする方法: -
+
スタジオのアプリケーションリスト内でDSLファイルをエクスポートする方法: -
+
ワークフローオーケストレーションページでDSLファイルをエクスポートする方法: -
+
diff --git a/jp/guides/workflow/file-upload.md b/jp/guides/workflow/file-upload.md index a034e93e1..748bf3e68 100644 --- a/jp/guides/workflow/file-upload.md +++ b/jp/guides/workflow/file-upload.md @@ -68,7 +68,7 @@ Difyは、ファイルアップロードをサポートする[チャットフロ 1. チャットフローアプリの右上にある「機能」ボタンを押すと、新しい機能を追加できます。この機能を使うことで、ユーザーは会話中にファイルのアップロードや更新が可能になります。最大10ファイルまで一度にアップロードでき、一つのファイルは15MBまでのサイズ制限があります。 -

ファイルアップロード

+

ファイルアップロード

ただし、この機能をオンにしても、LLMがファイルを直接読むわけではありません。テキストに変換してLLMが理解できるようにするためには**テキスト抽出ツール**が必要です。 @@ -79,11 +79,11 @@ Difyは、ファイルアップロードをサポートする[チャットフロ 3. LLMノードを追加し、そのシステムプロンプトでテキスト抽出ツールからの出力変数を選びます。 4. 最後に、「回答」ノードを設置し、LLMノードからの出力変数を入力します。 -
+
機能を有効にした後は、ユーザーがファイルをアップロードし、ダイアログボックスを通じて会話に参加することが可能になります。ただし、この機能では、LLMアプリケーションがファイル内容を保持することができず、会話のたびにファイルの再アップロードが必要になります。 -
+
会話中にLLMがファイル内容を記録しておく機能を希望する場合は、別の方法として方法3を参照してください。 @@ -125,11 +125,11 @@ Difyは、ファイルアップロードをサポートする[チャットフロ 「開始」ノード内のファイル変数を **「テキスト抽出ツール」** ノードの入力変数として使用します。 -

入力変数の追加

+

入力変数の追加

「テキスト抽出ツール」ノードの出力変数をLLMノードのシステムプロンプトに貼り付けます。 -
+
これらの設定が完了すると、ユーザーはWebApp内でファイルのURLを貼り付けるか、ローカルファイルをアップロードでき、その後、ドキュメントの内容に基づいてLLMとの対話が可能になります。ユーザーは対話の過程でいつでもファイルを置き換えることができ、LLMは常に最新のファイル内容を取得します。 @@ -143,7 +143,7 @@ Difyは、ファイルアップロードをサポートする[チャットフロ 以下に設定例を示します: -

LLMノードを使用してファイル変数にアクセスする

+

LLMノードを使用してファイル変数にアクセスする

LLMノードを介してファイル変数を利用する際には、開発者がファイル変数に含まれるのが画像ファイルだけであることを確認する必要があります。そうでない場合、エラーが発生する可能性があります。異なるタイプのファイルがアップロードされる可能性がある場合は、ファイルを適切にフィルタリングするためにリストオペレーターノードの使用が必要です。 @@ -151,7 +151,7 @@ LLMノードを介してファイル変数を利用する際には、開発者 応答ノードや終了ノードにファイル変数を設定すると、そのノードがトリガされた際に会話ウィンドウにファイルダウンロードのカードが表示されます。カードをクリックすることで、ファイルをダウンロードできます。 -

ファイルのダウンロード

+

ファイルのダウンロード

### 上級者向けの使用方法 diff --git a/jp/guides/workflow/key-concept.md b/jp/guides/workflow/key-concept.md index 0013b4198..21ce3995f 100644 --- a/jp/guides/workflow/key-concept.md +++ b/jp/guides/workflow/key-concept.md @@ -22,7 +22,7 @@ 一般的なインタラクションパス: 指示を与える → コンテンツを生成する → コンテンツについて複数のディスカッションを行う → 結果を再生成する → 終了 -

チャットフロー入口

+

チャットフロー入口

### ワークフロー @@ -30,7 +30,7 @@ 一般的なインタラクションパス: 指示を与える → コンテンツを生成する → 終了 -

ワークフロー入口

+

ワークフロー入口

**利用可能なノードの違い** diff --git a/jp/guides/workflow/node/answer.md b/jp/guides/workflow/node/answer.md index a3268a021..14246a1f3 100644 --- a/jp/guides/workflow/node/answer.md +++ b/jp/guides/workflow/node/answer.md @@ -14,13 +14,13 @@ **例1:** 純テキストを出力 -
+
**例2:** 画像+LLMの返信を出力 -
+
-
+
{% hint style="info" %} 回答ノードは最終的な出力ノードとして使用しないこともでき、プロセスの中間ステップで結果をストリーミング形式で出力することができます。 diff --git a/jp/guides/workflow/node/code.md b/jp/guides/workflow/node/code.md index f2f6c6f9f..911286217 100644 --- a/jp/guides/workflow/node/code.md +++ b/jp/guides/workflow/node/code.md @@ -13,7 +13,7 @@ このノードは開発者の柔軟性を大幅に向上させ、ワークフロー内にカスタムPythonまたはJavascriptスクリプトを埋め込んで、事前設定されたノードでは達成できない方法で変数を操作することができます。設定オプションを使用して、必要な入力変数と出力変数を指定し、対応する実行コードを記述できます。 -
+
## 設定 diff --git a/jp/guides/workflow/node/end.md b/jp/guides/workflow/node/end.md index f9ec4e607..e5ff9e9d2 100644 --- a/jp/guides/workflow/node/end.md +++ b/jp/guides/workflow/node/end.md @@ -18,12 +18,12 @@ Chatflow の場いは終了ノードはサポートされていません 以下の[長編ストーリー生成ワークフロー](iteration.md#shi-li-2-chang-wen-zhang-die-dai-sheng-cheng-qi-ling-yi-zhong-bian-pai-fang-shi)では、終了ノードで宣言された変数 `Output` は上流のコードノードの出力です。つまり、このワークフローはCode3ノードが実行された後に終了し、Code3の実行結果を出力します。 -

終了ノード-長編ストーリー生成の例

+

終了ノード-長編ストーリー生成の例

**単一ルートの実行例:** -
+
**複数ルートの実行例:** -
+
diff --git a/jp/guides/workflow/node/http-request.md b/jp/guides/workflow/node/http-request.md index ea7abd98f..cb8a18367 100644 --- a/jp/guides/workflow/node/http-request.md +++ b/jp/guides/workflow/node/http-request.md @@ -15,7 +15,7 @@ HTTP プロトコルを介してサーバーにリクエストを送信するこ HTTPリクエストのURL、リクエストヘッダー、クエリパラメータ、リクエストボディの内容、および認証情報などを設定することができます。 -

HTTP リクエスト設定

+

HTTP リクエスト設定

*** @@ -25,7 +25,7 @@ HTTPリクエストのURL、リクエストヘッダー、クエリパラメー HTTPリクエストにおいて、ユーザー名や顧客ID、フィードバック内容など、様々な動的な変数を挿入することが可能です。たとえば、顧客のフィードバックを扱う際に、これらの変数を使用して自動返信メッセージをパーソナライズしたり、特定の顧客データを取得してそれに関連する情報を特定のサーバーに送信したりすることができます。 -

顧客のフィードバック分類

+

顧客のフィードバック分類

HTTPリクエストのレスポンスには、レスポンスボディ、ステータスコード、レスポンスヘッダー、そしてファイルが含まれることがあります。特にレスポンスにファイルが含まれる場合、この機能は自動的にファイルを保存し、後のプロセスステップでの利用を可能にします。これにより、処理効率が向上し、ファイルを含むレスポンスをより直接的かつ容易に扱えるようになります。 @@ -37,7 +37,7 @@ HTTP PUTリクエストを利用して、アプリケーション内のファイ 設定の一例は以下のとおりです: -

HTTP機能を使ってファイルを送信する方法

+

HTTP機能を使ってファイルを送信する方法

<最初の翻訳の問題点の改善ポイント> この再翻訳では、日本語の表現习慣に合わせ、より自然で明瞭な表現を心がけました。具体的な専門用語やプロセスの説明も、より分かりやすく説明するよう努めています。このように、原文の意味を正確に伝えつつ、読みやすさも重視した翻訳を目指しました。 diff --git a/jp/guides/workflow/node/ifelse.md b/jp/guides/workflow/node/ifelse.md index 41cf325e1..66f87f2ac 100644 --- a/jp/guides/workflow/node/ifelse.md +++ b/jp/guides/workflow/node/ifelse.md @@ -31,7 +31,7 @@ if/else 条件に基づいてチャットフローとワークフローを2つ ### シナリオ -
+
**テキスト要約ワークフロー**を例に、各条件を説明します。 @@ -45,4 +45,4 @@ if/else 条件に基づいてチャットフローとワークフローを2つ 複雑な条件判断が必要な場合、複数条件を設定し、条件間に **AND** または **OR** を設定することができます。これは条件間に**交集**または**并集**を取ることを意味します。 -

複数条件の判断

+

複数条件の判断

diff --git a/jp/guides/workflow/node/knowledge-retrieval.md b/jp/guides/workflow/node/knowledge-retrieval.md index 4d6f58705..c06d41a65 100644 --- a/jp/guides/workflow/node/knowledge-retrieval.md +++ b/jp/guides/workflow/node/knowledge-retrieval.md @@ -12,7 +12,7 @@ 下図は最も基本的なナレッジベース質問応答アプリケーションの例です。このプロセスの実行ロジックは、ユーザーの質問がLLMノードに渡される前に、ナレッジ検索ノードでユーザーの質問に最も関連するテキスト内容を検索し、召喚することです。その後、LLMノード内でユーザーの質問と検索されたコンテキストを一緒に入力し、LLMが検索内容に基づいて質問に答えるようにします。 -

ナレッジベース質問応答アプリケーションの例

+

ナレッジベース質問応答アプリケーションの例

*** @@ -25,11 +25,11 @@ 3. [リコールモード](../../../learn-more/extended-reading/retrieval-augment/retrieval.md)と[ナレッジベース設定](../../knowledge-base/knowledge-and-documents-maintenance.md#id-8-zhi-shi-ku-she-zhi)を設定します。 4. 下流ノードを接続し設定します。一般的にはLLMノードです。 -

ナレッジ検索の設定

+

ナレッジ検索の設定

**出力変数** -

出力変数

+

出力変数

ナレッジ検索の出力変数`result`は、ナレッジベースから検索された関連テキストセグメントです。この変数のデータ構造には、セグメント内容、タイトル、リンク、アイコン、メタデータ情報が含まれています。 @@ -43,6 +43,6 @@ ユーザーが質問すると、関連するテキストがナレッジ検索で召喚された場合、そのテキスト内容がコンテキスト変数の値としてプロンプトに挿入され、LLMが質問に答えます。関連するテキストが検索されなかった場合、コンテキスト変数の値は空となり、LLMは直接ユーザーの質問に答えます。 -

下流LLMノードの設定

+

下流LLMノードの設定

この変数は、LLMが質問に答える際のプロンプトコンテキストとして外部ナレッジの参照に使用されるだけでなく、そのデータ構造にセグメントの引用情報が含まれているため、アプリケーション側の[**引用と帰属**](../../knowledge-base/retrieval-test-and-citation.md#id-2-yin-yong-yu-gui-shu)機能もサポートします。 diff --git a/jp/guides/workflow/node/list-operator.md b/jp/guides/workflow/node/list-operator.md index ba7d224c8..3dd9335c0 100644 --- a/jp/guides/workflow/node/list-operator.md +++ b/jp/guides/workflow/node/list-operator.md @@ -10,11 +10,11 @@ 例えば、あるアプリでは、ユーザーが文書ファイルと画像ファイルの2種類の異なるファイルを同時にアップロードできる機能があります。その際、異なるファイルタイプを仕分けし、それぞれの処理フローに渡すためには**リスト操作ノード**を使用することが必要です。 -

異なるファイルタイプのフロー分岐

+

異なるファイルタイプのフロー分岐

リスト操作ノードは通常、配列変数から情報を抽出し、特定の条件を設定して、下流ノードで受け入れ可能な変数タイプに変換します。この構造は、入力変数、フィルタ条件、ソート(オプション)、先頭N項目の取得(オプション)、そして出力変数に分かれています。 -

リスト操作ノード

+

リスト操作ノード

#### 入力変数 @@ -82,6 +82,6 @@ 3. 文章変数を抽出し、「ドキュメントエクストラクタ」ノードに渡し、画像ファイル変数を抽出してLLMノードに渡します。 4. 最後に「回答」ノードを追加し、LLMノードの出力変数を記入します。 -
+
アプリの使用者が文章と画像ファイルを同時にアップロードした場合、文章は自動的にドキュメントエクストラクタノードに、画像ファイルは自動的にLLMノードに分流され、混合ファイルの共通処理が実現されます。 \ No newline at end of file diff --git a/jp/guides/workflow/node/parameter-extractor.md b/jp/guides/workflow/node/parameter-extractor.md index 59ef3d737..4d9fb6320 100644 --- a/jp/guides/workflow/node/parameter-extractor.md +++ b/jp/guides/workflow/node/parameter-extractor.md @@ -16,11 +16,11 @@ Difyワークフロー内には豊富な[ツール](../../tools.md)が用意さ この例では、Arxiv論文検索ツールの入力パラメータとして「論文の著者」または「論文番号」が要求されます。パラメータ抽出器は「この論文の内容は何ですか:2405.10739」という質問から論文番号**2405.10739**を抽出し、ツールのパラメータとして正確に検索します。 -

Arxiv論文検索ツール

+

Arxiv論文検索ツール

2. **テキストを構造化データに変換する**例として、長い物語のイテレーション生成アプリの前工程として、テキスト形式の章内容を配列形式に変換し、[イテレーションノード](iteration.md)でのマルチラウンド生成処理を容易にします。 -
+
3. **構造化データを抽出して**[**HTTPリクエスト**](https://docs.dify.ai/v/ja-jp/guides/workflow/node/http\_request)**を使用する**ことで、任意のアクセス可能なURLにリクエストを送信し、外部検索結果の取得やウェブフック、画像生成などのシナリオに適用できます。 @@ -28,7 +28,7 @@ Difyワークフロー内には豊富な[ツール](../../tools.md)が用意さ ### 設定方法 -
+
**設定手順** diff --git a/jp/guides/workflow/node/question-classifier.md b/jp/guides/workflow/node/question-classifier.md index d2e43e808..7bdadae96 100644 --- a/jp/guides/workflow/node/question-classifier.md +++ b/jp/guides/workflow/node/question-classifier.md @@ -14,7 +14,7 @@ 以下の図は製品カスタマーサービスシナリオのサンプルワークフローテンプレートです: -
+
このシナリオでは、3つの分類ラベル/説明を設定しています: @@ -32,7 +32,7 @@ ### 設定方法 -
+
**設定手順** diff --git a/jp/guides/workflow/node/start.md b/jp/guides/workflow/node/start.md index 219902b27..8aef8e1f4 100644 --- a/jp/guides/workflow/node/start.md +++ b/jp/guides/workflow/node/start.md @@ -8,7 +8,7 @@ 開始ノードの設定ページでは、**“入力フィールド”**とデフォルトの[**システム変数**](../variables.md#xi-tong-bian-liang)という二つの設定部分が見られます。 -

チャットフロー と ワークフロー

+

チャットフロー と ワークフロー

### 入力フィールド @@ -41,7 +41,7 @@ Difyに組み込まれているファイル抽出ノードは、特定のフォ 設定が完了した後、使用者はアプリを使用する前に、入力項目に従ってLLMに必要な情報を提供します。より多くの情報がLLMの質問応答効率を向上させるのに役立ちます。 -
+
### システム変数 diff --git a/jp/guides/workflow/node/template.md b/jp/guides/workflow/node/template.md index 4a2b6c1ac..616c10d91 100644 --- a/jp/guides/workflow/node/template.md +++ b/jp/guides/workflow/node/template.md @@ -18,7 +18,7 @@ Jinja2のPythonテンプレート言語を使って、データ変換やテキ **例1:**複数の入力(記事のタイトル、紹介、内容)を一つの完全なテキストに結合する -

テキストの結合

+

テキストの結合

**例2:** ナレッジリトリーバルノードで取得した情報およびその関連メタデータを、構造化されたMarkdown形式にまとめる diff --git a/jp/guides/workflow/node/variable-aggregator.md b/jp/guides/workflow/node/variable-aggregator.md index 4c8aff09c..70504e76a 100644 --- a/jp/guides/workflow/node/variable-aggregator.md +++ b/jp/guides/workflow/node/variable-aggregator.md @@ -16,15 +16,15 @@ 変数集約を追加しない場合、分類1と分類2のブランチは異なるナレッジベース検索を経て、ダウンストリームの大規模言語モデルおよび回答ノードを繰り返し定義する必要があります。 -

問題分類(変数集約なし)

+

問題分類(変数集約なし)

変数集約を追加することで、二つのナレッジベース検索ノードの出力を一つの変数に集約できます。 -

問題分類後のマルチ集約

+

問題分類後のマルチ集約

**IF/ELSE 条件ブランチ後のマルチ集約** -

IF/ELSE 問題分類後のマルチ集約

+

IF/ELSE 問題分類後のマルチ集約

### フォーマット要求 diff --git a/jp/guides/workflow/node/variable-assigner.md b/jp/guides/workflow/node/variable-assigner.md index 4fb768b9f..05daaaf22 100644 --- a/jp/guides/workflow/node/variable-assigner.md +++ b/jp/guides/workflow/node/variable-assigner.md @@ -22,7 +22,7 @@ 例えば:会話が始まると、LLMはユーザーの入力に必要な情報や好み、またはチャット履歴が含まれているかを自動的に判断します。情報が存在する場合、LLMはそれを先に抽出して保存し、コンテキストとして利用して応答します。もし新しい情報を覚える必要がない場合、LLMは以前の関連する記録を用いて個性化な応答を出します。 -
+
**設定手順:** @@ -107,7 +107,7 @@ def main(arg1: list) -> str: 例:ユーザーが会話を始める前に、`language`入力欄に「日本語」と指定した場合、その言語は会話変数に書き込まれ、LLMは後続の返信時に会話変数の情報を参照し、継続的に「日本語」を使用して返信します。 -
+
**設定手順:** @@ -123,7 +123,7 @@ def main(arg1: list) -> str: 例:会話を始める際、LLMはユーザーにチェックリストに関連するアイテムの入力を求めます。ユーザーがチェックリストの内容を一度述べると、その内容は会話変数に更新され、及び保存されます。LLMは各会話の後に、ユーザーに不足しているアイテムの追加を促します。 -
+
**配置流程:** diff --git a/jp/guides/workflow/orchestrate-node.md b/jp/guides/workflow/orchestrate-node.md index c4545611b..6842c884f 100644 --- a/jp/guides/workflow/orchestrate-node.md +++ b/jp/guides/workflow/orchestrate-node.md @@ -2,7 +2,7 @@ チャットフローおよびワークフローアプリケーションは、ビジュアルなドラッグアンドドロップ機能を通じてノードのオーケストレーションをサポートしており、シリアルおよびパラレルの2つのオーケストレーションデザインパターンがあります。 -![](../../.gitbook/assets/orchestrate-node.jpeg) +![](https://assets-docs.dify.ai/img/jp/workflow/a2cb01105b3524d13bed116c01638330.webp) ## シリアルノードのデザインパターン @@ -16,13 +16,13 @@ 2. ノードを順次リンクします。 3. すべてのパスを「終了」ノード(ワークフロー)/「直接回答」ノード(チャットフロー)に収束させて、ワークフローを最終承認します。 -![](../../.gitbook/assets/orchestrate-node-serial-design.png) +![](https://assets-docs.dify.ai/img/jp/workflow/7cfedf706536a5aa00d692d5f98d9a75.webp) ### シリアル構造のアプリのログをチェックする シリアル構造のアプリは、ログが順次ノードの操作を表示します。会話ボックスの右上にある "View Logs - Tracing" を順にクリックすると、各ノードの入力、出力、トークン消費、実行時間を含む完全なワークフロープロセスが表示されます。 -![](../../.gitbook/assets/viewing-serial-structure-app-logs.png) +![](https://assets-docs.dify.ai/img/jp/workflow/2eca3b1fc81157428f16a0cdcca95f8b.webp) ## パラレルノードのデザインパターン @@ -37,22 +37,22 @@ **方法1**\ ノードの上にカーソルを合わせると「+」ボタンが表示されます。クリックすると、複数のノードが追加され、自動的にパラレル構造が形成されます。 -![](../../.gitbook/assets/orchestrate-node-parallel-design-method-1.png) +![](https://assets-docs.dify.ai/img/jp/workflow/7543ad0e11fc976f5808e92525ce20cd.webp) **方法2**\ ノードから接続を延長するには、ノードの「+」ボタンをドラッグしてパラレル構造を作成します。 -![](../../.gitbook/assets/orchestrate-node-parallel-design-method-2.png) +![](https://assets-docs.dify.ai/img/jp/workflow/af889d5aeefa736b927bb4761c595f2a.webp) **方法3**\ キャンバス上に複数のノードがある場合は、ビジュアルにドラッグしてリンクし、パラレル構造を形成します。 -![](../../.gitbook/assets/orchestrate-node-parallel-design-method-3.png) +![](https://assets-docs.dify.ai/img/jp/workflow/49bf848694b29a718b54db4559c4fff2.webp) **方法4**\ キャンバスベースの方法に加えて、ノードの右側パネルの「Next Step」セクションからノードを追加することで、パラレル構造を生成することもできます。このアプローチにより、自動的にパラレル構成が作成されます。 -![](../../../img/orchestrate-node-parallel-design-method-4.png) +![](https://assets-docs.dify.ai/img/jp/workflow/9089ccb078c5a896929384725be2231c.webp) **注意:** @@ -61,7 +61,7 @@ * チャットフローアプリケーションでは複数の「answer」ノードがサポートされます。これらのアプリケーションの各パラレル構造は、適切なコンテンツの出力を確保するために「answer」ノードで終了する必要があります。 * すべてのパラレル構造は同時に実行されます。パラレル構造内のノードは、タスクを完了した後に結果を出力し、出力には順序関係がありません。パラレル構造が単純であればあるほど、結果の出力が速くなります。 -![](../../.gitbook/assets/orchestrate-node-chatflow-multi-answer.png) +![](https://assets-docs.dify.ai/img/jp/workflow/8e8f833a335b596056a0fef5f00b5924.webp) ### パラレル構造の作り方 @@ -73,7 +73,7 @@ パラレルブランチの上限は10です。 -![](../../.gitbook/assets/orchestrate-node-simple-parallel.png) +![](https://assets-docs.dify.ai/img/jp/workflow/34479cacfc98ded5a554b4ab89870b64.webp) #### 2. ネストされたパラレル @@ -81,22 +81,22 @@ ワークフローは、最大3層までのネスト関係をサポートします。 -![](../../.gitbook/assets/orchestrate-node-nested-parallel.png) +![](https://assets-docs.dify.ai/img/jp/workflow/a283772e65d5f5b60c7eb0fc3ace9a16.webp) #### 3. 条件分岐 + パラレル パラレル構造は条件分岐と組み合わせて使用することもできます。 -![](../../.gitbook/assets/orchestrate-node-conditional-branch-parallel.png) +![](https://assets-docs.dify.ai/img/jp/workflow/f6dff2851e1dbbce04d554a23e65d719.webp) #### 4. イテレーション + パラレル このパターンは、イテレーションとパラレル構造を組み合わせたものです。 -![](../../.gitbook/assets/orchestrate-node-iteration-parallel.png) +![](https://assets-docs.dify.ai/img/jp/workflow/72f8b4f07d58ecf283507d4839d68586.webp) ### パラレル構造のアプリのログをチェックする パラレル構造をもつアプリケーションは、ツリーのような形式でログを生成します。折りたたみ可能なパラレルノード グループにより、個々のノード ログを簡単に表示できます。 -![](../../.gitbook/assets/orchestrate-node-parallel-logs.png) +![](https://assets-docs.dify.ai/img/jp/workflow/65a9f4e9a03b31686993b0a701da4a34.webp) diff --git a/jp/guides/workflow/publish.md b/jp/guides/workflow/publish.md index b63dd631e..873ebcbc5 100644 --- a/jp/guides/workflow/publish.md +++ b/jp/guides/workflow/publish.md @@ -2,7 +2,7 @@ デバッグが完了したら、右上の「公開」をクリックして、このワークフローを保存し、さまざまなタイプのアプリとして素早く公開することができます。 -
+
対話型アプリは以下の形式で公開できます: diff --git a/jp/guides/workflow/variables.md b/jp/guides/workflow/variables.md index 2a53beff0..f9d1e5dba 100644 --- a/jp/guides/workflow/variables.md +++ b/jp/guides/workflow/variables.md @@ -60,7 +60,7 @@ -

ワークフロー内のシステム変数

+

ワークフロー内のシステム変数

#### チャットフロー @@ -127,13 +127,13 @@ -
chatflow app system variables

チャットフロー内のシステム変数

+
chatflow app system variables

チャットフロー内のシステム変数

### 環境変数 **環境変数は、APIキーやデータベースのパスワードといった機密性の高い情報を保護する際に、ワークフロー実行時に活用されます。** これらはコードに直接書き込むのではなく、ワークフローに設定され、異なる環境間での共有が可能になっています。 -
Environment Variables

環境変数

+
Environment Variables

環境変数

サポートされるデータ型には以下の3つがあります: @@ -155,7 +155,7 @@ **ユーザーは会話変数を使っで、チャットフローの会話内で一時的に特定の情報を保存し、同じワークフロー内の複数のチャットにわたってその情報を参照することができます。** 例えば、コンテキスト、チャットボックスにアップロードされたファイル(近々配布予定)、ユーザーが会話中に入力した設定などが含まれます。この機能は、LLM(大規模言語モデル)に「メモ」を提供するようなもので、メモリエラーによる情報のバイアスを回避できます。 -
+
以下の6種類のデータ型をサポートしています: diff --git a/jp/guides/workspace/app/README.md b/jp/guides/workspace/app/README.md index 14b3417a0..9c9d3358e 100644 --- a/jp/guides/workspace/app/README.md +++ b/jp/guides/workspace/app/README.md @@ -4,11 +4,11 @@ **発見**では、いくつかの一般的なテンプレートアプリを提供しています。これらのアプリは、人事、アシスタント、翻訳、プログラミング、ライティングをカバーしています。 -
+
特定のテンプレートアプリを使用する場合は、テンプレートの「ワークスペースに追加」ボタンをクリックします。左側のワークスペースでそのアプリを使用することができます。 -
+
新しいアプリを作成するためにテンプレートを変更したい場合は、テンプレートの「カスタマイズ」ボタンをクリックします。 @@ -16,6 +16,6 @@ ワークスペースはアプリのナビゲーションです。ワークスペース内のアプリをクリックすると、そのアプリを直接使用することができます。 -
+
ワークスペース内のアプリには、自分のアプリと他のチームメンバーがワークスペースに追加したアプリが含まれます。 \ No newline at end of file diff --git a/jp/learn-more/extended-reading/how-to-use-json-schema-in-dify.md b/jp/learn-more/extended-reading/how-to-use-json-schema-in-dify.md index da25be979..1371ca0bd 100644 --- a/jp/learn-more/extended-reading/how-to-use-json-schema-in-dify.md +++ b/jp/learn-more/extended-reading/how-to-use-json-schema-in-dify.md @@ -13,7 +13,7 @@ JSON Schemaは、JSONデータ構造を記述するための仕様です。開 アプリケーション内のLLMを、上記で言及したJSON Schema出力をサポートするモデルのいずれかに切り替えます。次に、設定フォームで`JSON Schema`を有効にし、JSON Schemaテンプレートを入力します。同時に、`response_format`列を有効にし、`json_schema`形式に切り替えます。 -![](../../.gitbook/assets/learn-more-json-schema.png) +![](https://assets-docs.dify.ai/img/jp/extended-reading/73e1801819f7ef73cced141459bcac62.webp) LLMによって生成されたコンテンツは、次の形式で出力をサポートします: @@ -198,7 +198,7 @@ LLMによって生成されたコンテンツは、次の形式で出力をサ **例の出力:** -![](../../.gitbook/assets/best-practice-json-schema-ui-example.png) +![](https://assets-docs.dify.ai/img/jp/extended-reading/724fa883c1c229e74898b2b3bb8e40b3.webp) ## ヒント diff --git a/jp/learn-more/extended-reading/retrieval-augment/README.md b/jp/learn-more/extended-reading/retrieval-augment/README.md index 8a0e93f72..4a63804d1 100644 --- a/jp/learn-more/extended-reading/retrieval-augment/README.md +++ b/jp/learn-more/extended-reading/retrieval-augment/README.md @@ -8,7 +8,7 @@ RAGアーキテクチャは、ベクトル検索を中核としで、大規模 次の図では、ユーザーが「アメリカ合衆国の大統領は誰ですか?」と尋ねた場合、システムはその質問を直接大規模モデルに渡して回答を得るのではなく、まずナレッジベース(図に示されているWikipediaなど)でベクトル検索を行います。意味的類似性マッチングを通じて関連コンテンツ(例:「ジョー・バイデンはアメリカ合衆国の第46代および現職大統領である…」)を見つけ出します。その後、システムはユーザーの質問と収集した関連知識を大規模モデルに提供し、十分な情報を基に信頼性のある回答を得ることができます。 -

基本的なRAGアーキテクチャ

+

基本的なRAGアーキテクチャ

**なぜこれが必要なのか?** diff --git a/jp/learn-more/extended-reading/retrieval-augment/hybrid-search.md b/jp/learn-more/extended-reading/retrieval-augment/hybrid-search.md index bea7d432d..847fdd140 100644 --- a/jp/learn-more/extended-reading/retrieval-augment/hybrid-search.md +++ b/jp/learn-more/extended-reading/retrieval-augment/hybrid-search.md @@ -29,7 +29,7 @@ RAG(Retrieval-Augmented Generation)の検索フェーズにおける主要 ハイブリッド検索では、データベースに事前にベクトルインデックスとキーワードインデックスを構築しておく必要があります。ユーザーのクエリが入力されると、両方の検索手法を使用して文書から最も関連性の高いテキストが取得されます。 -

ハイブリッド検索

+

ハイブリッド検索

"ハイブリッド検索"には厳密な定義が存在しません。本稿では、ベクトル検索とキーワード検索の組み合わせを例示しています。他の検索アルゴリズムの組み合わせもまた、"ハイブリッド検索"と呼ぶことができます。例えば、エンティティの関係性を検索する際に知識グラフ技術を組み合わせることが可能です。 @@ -39,7 +39,7 @@ RAG(Retrieval-Augmented Generation)の検索フェーズにおける主要 定義:クエリ埋め込みを生成し、そのベクトル表現に最も類似したテキストセグメントを取得します。 -

ベクトル検索の設定

+

ベクトル検索の設定

**TopK:** ユーザーのクエリに最も類似したテキストフラグメントを選定する際に使用されます。システムは、選択されたモデルのコンテキストウィンドウサイズに基づいて、フラグメントの数を動的に調整します。デフォルト値は3です。 diff --git a/jp/learn-more/extended-reading/retrieval-augment/rerank.md b/jp/learn-more/extended-reading/retrieval-augment/rerank.md index 9ee13f3bc..0fe23f303 100644 --- a/jp/learn-more/extended-reading/retrieval-augment/rerank.md +++ b/jp/learn-more/extended-reading/retrieval-augment/rerank.md @@ -6,7 +6,7 @@ **再順位付けモデルは、候補ドキュメントのリストとユーザーのクエリの意味的な一致度を計算し、その一致度に基づいて再並べ替えを行うことで、意味的な順位付け結果を向上させます**。その基本的な原理は、ユーザーのクエリと各候補ドキュメントとの関連スコアを算出し、関連性の高い順に並べ替えたドキュメントリストを返すことです。一般的な再順位付けモデルには、Cohere RerankやBGE Rerankerなどがあります。 -

混合検索と再順位付け

+

混合検索と再順位付け

ほとんどの場合、再順位付けの前にプリ検索が行われます。これは、数百万のドキュメントに対して関連性スコアを計算することが非常に非効率だからです。そのため、**再順位付けは通常、検索プロセスの最終段階に設けられ、異なる検索システムからの結果をマージおよびソートするのに非常に適しています**。 @@ -24,7 +24,7 @@ Cohere Rerankの例を挙げると、アカウントを登録し、APIを申請 Difyは現在、Cohere Rerankモデルをサポートしており、「モデルプロバイダー-> Cohere」ページに進んで、RerankモデルのAPIキーを入力してください。 -

Cohere Rerankモデルをモデルプロバイダー内に設定

+

Cohere Rerankモデルをモデルプロバイダー内に設定

### Cohere Rerank モデルの取得方法 @@ -34,7 +34,7 @@ Difyは現在、Cohere Rerankモデルをサポートしており、「モデル 「データセット->データセットの作成->検索設定」ページに進み、Rerank設定を追加してください。データセットの作成時だけでなく、既存のデータセットの設定内でもRerankの構成を変更し、適用されたデータセットのリコールモード設定でRerankの構成を調整することができます。 -

データセット検索モードでのRerankモデルの設定

+

データセット検索モードでのRerankモデルの設定

**TopK:** Rerank後に返される関連ドキュメントの数を設定します。 @@ -46,4 +46,4 @@ Difyは現在、Cohere Rerankモデルをサポートしており、「モデル 複数のリコールモードについての詳細は、[複数リコール](https://docs.dify.ai/v/ja-jp/guides/knowledge-base/integrate-knowledge-within-application#rikru)を参照してください。 -

データセットのマルチウェイリコールモードでRerankモデルを設定します

+

データセットのマルチウェイリコールモードでRerankモデルを設定します

diff --git a/jp/learn-more/extended-reading/retrieval-augment/retrieval.md b/jp/learn-more/extended-reading/retrieval-augment/retrieval.md index a6b8b6f0a..57ccb0451 100644 --- a/jp/learn-more/extended-reading/retrieval-augment/retrieval.md +++ b/jp/learn-more/extended-reading/retrieval-augment/retrieval.md @@ -2,7 +2,7 @@ ユーザーがナレッジベースのQ\&A用AIアプリケーションを構築する際に、Difyはアプリケーション内で複数のデータセットが関連付けられている場合に、検索時に2つの検索モードをサポートします:N-of-1検索モードとMulti-Path検索モードです。 -

検索モード設定

+

検索モード設定

### 検索設定 @@ -12,6 +12,6 @@ 以下は、マルチパス検索モードの技術フローチャートです: -

マルチパス検索

+

マルチパス検索

マルチパス検索モードは、モデルの推論能力やデータセットの説明に依存しないため、複数のデータセットを跨いで高品質な検索結果を得ることができます。さらに、Rerankを組み込むことで文書の検索効果を効果的に向上させることができます。したがって、複数のデータセットに関連付けられたナレッジベースのQ\&Aアプリを作成する際には、検索モードをマルチパス検索に設定することをお勧めします。 diff --git a/jp/learn-more/faq/llms-use-faq.md b/jp/learn-more/faq/llms-use-faq.md index ee3c81aa8..21718d9d1 100644 --- a/jp/learn-more/faq/llms-use-faq.md +++ b/jp/learn-more/faq/llms-use-faq.md @@ -121,7 +121,7 @@ Claudeは埋め込みモデルをサポートしていないため、埋め込 以下の表の例のように、2行目のヘッダだけを保持し、1行目(表1)は余分なヘッダのため削除します。 -
+
### 19. ChatGPT Plusを購入したのに、なぜdifyでGPT4を使用できないのですか? diff --git a/jp/learn-more/use-cases/build-an-notion-ai-assistant.md b/jp/learn-more/use-cases/build-an-notion-ai-assistant.md index 5cccba2f2..54fadef84 100644 --- a/jp/learn-more/use-cases/build-an-notion-ai-assistant.md +++ b/jp/learn-more/use-cases/build-an-notion-ai-assistant.md @@ -79,15 +79,15 @@ AIアプリケーションに「プリセットプロンプト」を追加する > 私のNotionワークスペース内でITの専門家として振る舞い、コンピュータサイエンス、ネットワークインフラ、Notionノート、ITセキュリティに関する知識を活用して問題を解決してほしい。 -
+
初期設定では、AIがユーザーに開始文を提供し、質問の手がかりを与えるようにすることをお勧めします。また、「音声からテキストへの変換」機能を有効にして、ユーザーがAIアシスタントと音声でやり取りできるようにします。 -
+
今や「概要」で公開URLをクリックして、自分のAIアシスタントとチャットできるようになりました! -
+
### APIを通じてプロジェクトに統合 diff --git a/jp/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code.md b/jp/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code.md index 0b6f2740a..c9e8deda2 100644 --- a/jp/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code.md +++ b/jp/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code.md @@ -10,48 +10,48 @@ Dify には、ChatGPT のような対話型アプリケーションと、ボタ Dify はこちらでアクセスできます:https://dify.ai/ -
+
名前を入力して作成が完了すると、ダッシュボードページが表示され、データモニタリングやアプリケーション設定が行えます。まずは左側のプロンプトオーケストレーションをクリックします。ここが主な作業ページです。 -
+
このページの左側にはプロンプト設定とその他の機能があり、右側では作成した内容をリアルタイムでプレビューおよび使用できます。プレフィックスプロンプトは、ユーザーが毎回入力する内容に応じてトリガーされるプロンプトです。これは、GPT が毎回プレフィックスプロンプトの内容に基づいてユーザー入力を処理するということです。 -
+
私のプレフィックスプロンプトの構造を見てみましょう。主に2つの部分から成り立っています。最初は、GPT に以下の英語の構造に従って写真の説明を出力するよう指示する部分です。英語の構造はプロンプトのテンプレートで、主に「テーマのカラフルな写真、複雑なパターン、鮮明なコントラスト、環境の説明、カメラモデル、入力内容に関連するレンズ焦点距離の説明、入力内容に関連する構図の説明、4人の写真家の名前」となります。これがプロンプトの主な内容です。理論的には、右側のプレビュー領域に保存して、生成したいテーマを入力すると、対応するプロンプトが生成されるはずです。 -
+
さて、後ろにある \{{proportion\}} と \{{version\}} は何でしょうか。右側を見ると、ユーザーが画像比率とモデルバージョンを選択する必要があります。これらの変数はユーザーの選択情報を伝達するためのものです。設定方法を見てみましょう。 -
+
私たちの機能は、ユーザーが選択した情報をプロンプトの最後に自動的に挿入し、ユーザーがコマンドを再入力する手間を省くことです。ここで変数機能を使用します。 変数の役割は、ユーザーがフォームに入力または選択した内容を動的にプロンプトに組み込むことです。例えば、ここでは画像比率を表す変数とモデルバージョンを表す変数を作成しました。追加ボタンをクリックして変数を作成します。 -
+
作成後、まず変数キーとフィールド名を入力する必要があります。変数キーは英語で入力します。オプションを有効にすると、このフィールドは選択必須ではなくなります。その後、操作バーの設定をクリックして変数内容を設定します。 -
+
変数には2種類あり、テキスト変数とドロップダウンオプションがあります。テキスト変数はユーザーが手動で入力するもので、ドロップダウンオプションは選択するものです。ここではユーザーにコマンドを手打ちさせたくないので、ドロップダウンオプションを選択します。必要なオプションを追加します。 -
+
次に変数を使用します。変数キーを二重の {} で囲んでプレフィックスプロンプトに入力します。ここでは、GPT にユーザーが選んだ内容をそのまま出力させたいので、「如実に変数内容を出力」というプロンプトを追加しました。 -
+
しかし、GPT が変数内容を変更してしまう可能性があります。その対策として、右側のモデル選択で多様性を低く設定します。これにより創造的な出力が減り、変数内容が変更されにくくなります。他のパラメータの意味は小さな感嘆符をクリックして確認できます。 -
+
これでアプリケーションが完成し、テスト出力に問題がなければ、右上の公開ボタンをクリックしてアプリケーションを公開します。公開アクセス URL からアプリケーションにアクセスできます。設定でアプリケーション名や概要、アイコンなどの内容を設定することもできます。 -
+
これが Dify を使ってシンプルな AI アプリケーションを作成する手順です。また、生成された API を使って他のプラットフォームにアプリケーションをデプロイしたり、UI を変更したりすることもできます。Dify は独自のデータをアップロードすることもサポートしており、例えば製品に関する質問に答えるカスタマーサポートロボットを作成することもできます。以上でチュートリアルは終了です。@goocarlos に感謝します。 diff --git a/jp/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md b/jp/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md index ebc24770e..b93e9b8e2 100644 --- a/jp/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md +++ b/jp/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md @@ -6,7 +6,7 @@ Difyは、オープンソースで非常に簡単に使えるLLMOpsプラットフォームであり、視覚的に迅速にAIアプリケーションを作成および運営するためのツールプラットフォームです。Difyは、視覚的なプロンプトの編成、運営、データセット管理などの機能を提供します。AIに関する技術的な研究や難解な概念の理解は不要です。Difyは、OpenAI、Azure OpenAI、Antropicなどの優れた大規模言語モデル提供者と連携しており、GPTシリーズ、Claudeシリーズのモデルを提供しています。将来的には優れたオープンソースモデルも接続される予定です。これらはすべて設定で切り替えて使用できます。これにより、アプリケーションを作成およびデバッグする際に、異なるモデルの効果を比較して、最適なモデルを選択できます。**Difyを基にすれば、AIインテリジェントカスタマーサービスを簡単に開発できるだけでなく、自分の使用習慣やニーズに合ったテキスト執筆アシスタント、バーチャルリクルートメントHRエキスパート、会議まとめアシスタント、翻訳アシスタントなどのさまざまなテキスト生成型アプリケーションも作成できます。** -
+
**前提条件** @@ -22,7 +22,7 @@ AIモデルのメッセージコールにはトークンが消費されます。 会社の既存のナレッジベースや製品ドキュメントに基づいてAIカスタマーサービスを構築し、ユーザーと交流したい場合、製品に関するドキュメントをできるだけ多くDifyのデータセットにアップロードする必要があります。Difyはデータの**セグメント処理とクレンジング**を行います。Difyデータセットは、高品質と経済的な二つのインデックスモードをサポートしており、高品質モードを使用することをお勧めします。トークンを消費しますが、より高い精度を提供します。操作手順: 【データセット】ページで新しいデータセットを作成し、ビジネスデータをアップロードします(複数のテキストの一括アップロードをサポート)。クレンジング方法を選択し、【保存して処理】をクリックするだけで、数秒で処理が完了します。 -
+
**AIアプリケーションを作成し、AIに指示を与える** @@ -40,28 +40,28 @@ AIモデルのメッセージコールにはトークンが消費されます。 > オープニング:こんにちは、私はBob☀️、Difyの最初のAIメンバーです。Dify製品、チーム、さらにはLLMOpsに関する質問について何でも話し合うことができます。 -
+
**AIインテリジェントカスタマーサービスのパフォーマンスをデバッグし、公開する** 以上の設定が完了したら、現在のページ右側でメッセージを送信してパフォーマンスが期待通りかどうかをデバッグできます。その後、【公開】をクリックします。この時点で、AIインテリジェントカスタマーサービスが完成しています。 -
+
**AIカスタマーサービスアプリケーションを前端ページに埋め込む** このステップでは、準備が整ったAIインテリジェントカスタマーサービスを公式サイトのページに埋め込みます。順に【概観】->【埋め込み】をクリックし、**scriptタグ方式を選択し、**scriptコードを公式サイトの``または``タグにコピーします。技術的な知識がない場合は、公式サイトの開発担当者にコードの貼り付けとページの更新を頼んでください。 -
+
1. コピーしたコードを公式サイトの目標位置に貼り付けます: -
+
1. 公式サイトを更新すると、ビジネスデータを持つ公式サイトのAIインテリジェントカスタマーサービスが完成します。効果を試してみてください: -
+
以上は、Dify公式サイトのAIカスタマーサービスBobの例を通じて、Difyアプリケーションを公式サイトに埋め込む具体的な手順を示しました。もちろん、Difyが提供するさらに多くの機能を使用してAIカスタマーサービスのパフォーマンスを向上させることも可能です。たとえば、変数設定を追加して、ユーザーがインタラクションを開始する前に名前や使用している具体的な製品などの必要な情報を入力させることができます。ぜひ一緒に探求し、企業のAIインテリジェントカスタマーサービスをカスタマイズしてみてください。 -
\ No newline at end of file +
\ No newline at end of file diff --git a/jp/learn-more/use-cases/dify-on-whatsapp.md b/jp/learn-more/use-cases/dify-on-whatsapp.md index 65ae325e2..360d3f307 100644 --- a/jp/learn-more/use-cases/dify-on-whatsapp.md +++ b/jp/learn-more/use-cases/dify-on-whatsapp.md @@ -23,7 +23,7 @@ Localtunnelを使用して、FastAPIのローカルホストをインターネ まず、[Dify公式アプリケーションプラットフォーム](https://cloud.dify.ai/signin)にログインします。GithubまたはGoogleのアカウントでログインすることができます。また、Dify公式チュートリアル[Docker Composeによるデプロイ | 日本語 | Dify](https://docs.dify.ai/v/ja-jp/getting-started/install-self-hosted/docker-compose)を参照して、プライベートデプロイを行うことも可能です。Difyはオープンソースプロジェクトであり、プライベートデプロイをサポートしています。 -
+
ログイン後、Difyのページに移動し、以下のステップに従って基本的なチャットアシスタントアプリケーションを作成します。 @@ -34,14 +34,14 @@ Localtunnelを使用して、FastAPIのローカルホストをインターネ 5. アプリケーションのアイコンを選択し、アプリケーションに「基本編成チャットアシスタント」などの名前を付ける 6. 作成をクリック -
+
作成が成功すると、上記のページに移動します。続いてアプリケーションを設定します。 1. モデルの選択(例:gpt-3.5-turbo-0125) 2. モデルパラメータの設定 3. アプリケーションのプロンプトを入力 -
+
設定が完了したら、右側の対話ボックスでテストを行い、テストが完了したら以下の操作を行います。 @@ -50,7 +50,7 @@ Localtunnelを使用して、FastAPIのローカルホストをインターネ 3. APIのアクセス ##### (4)基本編成チャットアシスタントのAPIキーの生成 -
+
「APIのアクセス」をクリックすると、上記のAPI管理ページに移動します。このページで以下の手順に従ってAPIキーを取得します。 @@ -66,7 +66,7 @@ Localtunnelを使用して、FastAPIのローカルホストをインターネ [Twilioコンソール]に移動し、Account SIDとAuth Tokenを取得して保存します。 -
+
## 5. チャットボットの作成 @@ -118,7 +118,7 @@ npx localtunnel --port 9000 このコマンドは、ローカルサーバー(9000ポートで実行中)とlocaltunnelが作成するパブリックドメイン間に接続を確立します。localtunnel転送URLを取得すると、クライアントからそのURLへのリクエストはすべて自動的にFastAPIのバックエンドに転送されます。 -
+
#### 5.5 コードの説明 @@ -192,7 +192,7 @@ TwilioのメッセージAPIを使用して、チャットボットがWhatsAppユ 「試してみる」セクションで「WhatsAppメッセージを送信」をクリックします。デフォルトでサンドボックスタブに移動し、「+14155238886」という電話番号と、隣に参加コード、右側にQRコードが表示されます。 -
+
Twilioのテスト環境を有効にするには、このコードのテキストをWhatsAppメッセージとして表示された電話番号に送信します。Webバージョンを使用している場合、ハイパーリンクをクリックしてWhatsAppチャットに誘導されることができます。 @@ -209,13 +209,13 @@ FastAPIアプリケーションで設定したエンドポイントは/message 設定が完了したら、「保存」ボタンを押します。 -
+
## 7. WhatsAppのテスト 6.1のページでQRコードをスキャンしてWhatsAppサンドボックス環境に入り、WhatsAppメッセージを送信してAIチャットボットの応答を待ちます。Difyチャットアシスタントに質問できることをAIチャットボットに試してみてください。 -
+
## 8. 後記 diff --git a/jp/learn-more/use-cases/how-to-connect-aws-bedrock.md b/jp/learn-more/use-cases/how-to-connect-aws-bedrock.md index bae0c0cdb..ca7cb8c81 100644 --- a/jp/learn-more/use-cases/how-to-connect-aws-bedrock.md +++ b/jp/learn-more/use-cases/how-to-connect-aws-bedrock.md @@ -12,13 +12,13 @@ [AWS Bedrock](https://aws.amazon.com/bedrock/)にアクセスし、ナレッジベースサービスを作成してください。 -

AWS Bedrock Knowledge Baseを作成

+

AWS Bedrock Knowledge Baseを作成

### 2. バックエンドAPIサービスの構築 Difyプラットフォームは、直接的にAWS Bedrock Knowledge Baseに接続することができません。開発チームは、Difyの外部ナレッジベース接続に関する[API定義](../../guides/knowledge-base/external-knowledge-api-documentation.md)を参照し、バックエンドAPIサービスを手動で構築してAWS Bedrockと接続する必要があります。具体的なアーキテクチャの概要は以下の通りです: -

バックエンドAPIサービスの構築

+

バックエンドAPIサービスの構築

以下の2つのコードファイルを参考にして、バックエンドサービスAPIを構築できます。 @@ -117,7 +117,7 @@ class ExternalDatasetService: AWS Bedrockの管理画面にログインし、作成したナレッジベースのIDを取得します。このパラメータは、Difyプラットフォームとの接続に使用されます。 -

AWS Bedrock Knowledge BaseのIDを取得

+

AWS Bedrock Knowledge BaseのIDを取得

### 4. 外部知識APIの関連付け @@ -129,13 +129,13 @@ Difyプラットフォームの**"ナレッジベース"**ページに移動し - APIエンドポイント(外部ナレッジベースへの接続アドレス、ステップ2でカスタマイズ可能)。例:`api-endpoint/retrieval` - API Key(外部ナレッジベースへの接続キー、ステップ2でカスタマイズ可能) -
+
### 5. 外部ナレッジベースの接続 **"ナレッジベース"**ページに移動し、ナレッジベースのカードの下にある **"外部ナレッジベースを接続"** をクリックして、パラメータ設定ページに移動します。 -
+
以下のパラメータを入力してください: @@ -154,7 +154,7 @@ Difyプラットフォームの**"ナレッジベース"**ページに移動し **スコア閾値:** テキストセグメントの選択に使用される類似度の閾値です。設定されたスコアを超えるテキストセグメントのみが取得され、デフォルト値は0.5です。数値が高くなるほど、テキストと質問の類似度が高く、取得されるテキストの数は減少し、結果もより精度が高くなります。 -
+
設定が完了すると、外部ナレッジベースAPIとの接続が確立されます。 @@ -162,8 +162,8 @@ Difyプラットフォームの**"ナレッジベース"**ページに移動し 外部ナレッジベースとの接続が確立された後、開発者は**"テスト取得"**で可能な質問のキーワードをシミュレートし、AWS Bedrock Knowledge Baseから取得したテキストセグメントをプレビューできます。 -

外部データベースの接続と検索をテスト

+

外部データベースの接続と検索をテスト

検索結果に満足できない場合は、検索設定を変更したり、AWS Bedrock Knowledge Baseの検索設定を調整したりすることができます。 -

AWS Bedrock Knowledge Base の検索設定を調整

+

AWS Bedrock Knowledge Base の検索設定を調整

diff --git a/jp/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md b/jp/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md index a18d61d8c..e6f1cc686 100644 --- a/jp/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md +++ b/jp/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md @@ -15,10 +15,10 @@ Wixは人気のWebサイト作成プラットフォームです。ドラッグ 3. ページ右上の「公開」ボタンをクリックします。 4. 公開ページで「サイトに埋め込む」のオプションを選択します。 - ![サイトに埋め込む](../../.gitbook/assets/best-practice-wix-2.png) + ![サイトに埋め込む](https://assets-docs.dify.ai/img/jp/use-cases/69e32259e16113a85efb36a55ff103e9.webp) 5. 適切なスタイルを選択し、表示されるiFrameコードをコピーします。例: - ![iFrameコード例](../../.gitbook/assets/best-practice-wix-3.png) + ![iFrameコード例](https://assets-docs.dify.ai/img/jp/use-cases/6de46e88bcfe958365970e58c91e4bdd.webp) ## 2. iFrameコードスニペットをWixサイトに埋め込む @@ -26,7 +26,7 @@ Wixは人気のWebサイト作成プラットフォームです。ドラッグ 2. ページの左側にある青い`+`(要素の追加)ボタンをクリックします。 3. **埋め込みコード**を選択し、**HTMLを埋め込む**をクリックして、ページにHTML iFrame要素を追加します。 - ![HTML iFrameを追加](../../.gitbook/assets/best-practice-add-html-iframe.png) + ![HTML iFrameを追加](https://assets-docs.dify.ai/img/jp/use-cases/f8e96ede33b585b00d0be569e13dee1f.webp) 4. `HTML設定`ボックスで、`コード`オプションを選択します。 5. Difyアプリケーションから取得したiFrameコードスニペットを貼り付けます。 6. **更新**ボタンをクリックして変更内容を保存し、プレビューします。 @@ -37,7 +37,7 @@ Wixは人気のWebサイト作成プラットフォームです。ドラッグ ``` -![Dify iFrameコードを挿入](../../.gitbook/assets/best-practice-insert-dify-iframe-code.png) +![Dify iFrameコードを挿入](https://assets-docs.dify.ai/img/jp/use-cases/f89b4bd5893e1d522e5a8bd896bee11f.webp) > ⚠️ iFrameコード内のアドレスがHTTPSで始まることを確認してください。HTTPアドレスは正しく表示されません。 diff --git a/jp/workshop/basic/build-ai-image-generation-app.md b/jp/workshop/basic/build-ai-image-generation-app.md index 6fa1594d7..35098e36b 100644 --- a/jp/workshop/basic/build-ai-image-generation-app.md +++ b/jp/workshop/basic/build-ai-image-generation-app.md @@ -6,7 +6,7 @@ 本記事では、Difyを使用してAI画像生成アプリを開発する方法について学びます。 -![](../../../img/workshop/build-ai-image-generation-app-12-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/fd446c9062b3aaa962d4f6535c60d12f.webp) ## 今回の学ぶポイント @@ -24,7 +24,7 @@ 管理ページに入ったら、キーをコピーするために`コピー`をクリックします。 -![](../../../img/workshop/build-ai-image-generation-app-1.png) +![](https://assets-docs.dify.ai/img/jp/basic/68007f69cdf208ccdb4130a5176b4984.webp) 次に、[Dify - ツール - Stability](https://cloud.dify.ai/tools) にキーを入力する必要があります。以下の手順に従ってください: @@ -32,7 +32,7 @@ - ツールに入る - ステイビリティを選択する - 承認をクリック -![](../../../img/workshop/build-ai-image-generation-app-2-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/096a6de7c057b04e799446ec491899fc.webp) - キーを入力して保存 ## 2. モデルプロバイダの設定 @@ -44,7 +44,7 @@ Difyの無料版では、200回の無料のOpenAIメッセージクレジット メッセージクレジットが不足している場合は、以下の手順に従って他のモデルプロバイダをカスタマイズできます: **あなたのアバター - 設定 - モデルプロバイダ**の順にクリックします。 -![](../../../img/workshop/build-ai-image-generation-app-3-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/19e05ce9a7929c53aab8cf003273ad23.webp) 適切なモデルプロバイダが見つからない場合は、groqプラットフォームがLlamaなどのLLM用に無料のコールクレジットを提供しています。 @@ -54,17 +54,17 @@ Difyの無料版では、200回の無料のOpenAIメッセージクレジット **Dify - モデルプロバイダ**に戻り、**groqcloud**を選択し、**設定**をクリックします。 -![](../../../img/workshop/build-ai-image-generation-app-4-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/daba9ae3c1a9179490dc0c3ba127bc45.webp) API Keyを貼り付けて保存します。 -![](../../../img/workshop/build-ai-image-generation-app-5-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/9f4d86396b83179c521cd60e717c0a42.webp) ## 3. エイジェントを作る **Dify - スタジオ**に戻り、**最初から作成**を選択します。 -![](../../../img/workshop/build-ai-image-generation-app-6-ja.png) +![](https://assets-docs.dify.ai/img/jp/basic/e52db26dfd44c226310867cbd3465361.webp) この実験では、エージェントの基本的な使用方法を理解するだけで十分です。 @@ -76,21 +76,21 @@ API Keyを貼り付けて保存します。 **エージェント**を選択し、名前を入力します。 -![](../../../img/workshop/build-ai-image-generation-app-7-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/309aa808354a326a0fc5b873878bb32c.webp) 以下のようにエージェントのオーケストレーションインターフェースに入ります。 -![](../../../img/workshop/build-ai-image-generation-app-8-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/492a3f517dffcc8d08940baab0167e99.webp) LLMを選択します。このチュートリアルでは、groqが提供するLlama-3.1-70Bを例にします: -![](../../../img/workshop/build-ai-image-generation-app-9-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/758709593a19635fa48772900dfb235c.webp) **ツール**でステイビリティを選択します: -![](../../../img/workshop/build-ai-image-generation-app-10-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/51f63fa4e2f25a605cad065076367ee9.webp) -![](../../../img/workshop/build-ai-image-generation-app-11-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/d28376231bfcad199cbd0371ff3e4c8a.webp) ### プロンプトの書き方 @@ -110,17 +110,17 @@ LLMを選択します。このチュートリアルでは、groqが提供するL 例:女の子が開いた本を持っているのを描く。 -![](../../../img/workshop/build-ai-image-generation-app-12-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/fd446c9062b3aaa962d4f6535c60d12f.webp) ### プロンプトを書くのかしなくても可能ですか?もちろん可能です! プロンプトの上部にある**自動**をクリックしてください。 -![](../../../img/workshop/prompt-gen-1-jp.png) +![](https://assets-docs.dify.ai/img/jp/basic/83d7b22a28eeedc25af39a80562c4494.webp) **指示**に要件を入力し、**自動**をクリックします。右側に生成されたプロンプトがAIによって作成されます。 -![](../../../img/workshop/prompt-gen-2-jp.png) +![](https://assets-docs.dify.ai/img/jp/basic/153f55d3acd0310b616ca9c72fdd0199.webp) ただし、プロンプトについての理解を深めるためには、初期段階ではこの機能に頼るべきではありません。 @@ -128,7 +128,7 @@ LLMを選択します。このチュートリアルでは、groqが提供するL 右上の公開ボタンをクリックし、公開後に**Run**を選択して、オンラインで実行されるエージェント用のWebページを取得します。 -![](../../../img/workshop/build-ai-image-generation-app-13-jp.png) +![](https://assets-docs.dify.ai/img/jp/basic/605b94d76d6bc32ffabd5e341e43b0fe.webp) このWebページのURLをコピーして、友人と共有することができます。 @@ -136,7 +136,7 @@ LLMを選択します。このチュートリアルでは、groqが提供するL ユーザーの入力コマンドにスタイル指示を追加することができます。例えば:「アニメスタイルで、女の子が開いた本を描いてください。」 -![](../../../img/workshop/build-ai-image-generation-app-14-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/5b77b0b3c3f11d5736208a1d313536c1.webp) ただし、デフォルトのスタイルをアニメスタイルに設定したい場合は、システムプロンプトにその旨を追加することができます。なぜなら、システムプロンプトはユーザーコマンドが実行されるたびに認識され、優先されるからです。 @@ -161,10 +161,10 @@ LLMを選択します。このチュートリアルでは、groqが提供するL ``` 例えば、今夜の夕食は何ですか?と聞いてみましょう。 -![](../../../img/workshop/build-ai-image-generation-app-15-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/f45fb871f867ce4a2688e5c47e3966af.webp) よりフォーマルなビジネスシナリオでは、感情的な単語ライブラリを使用してユーザーのリクエストを拒否することができます。 **Add Feature - Content Moderation**にキーワード「dinner」を追加します。ユーザーがそのキーワードを入力すると、エージェントアプリは「申し訳ありませんが、その内容は理解できません。」と出力します。 -![](../../../img/workshop/build-ai-image-generation-app-16-en.png) +![](https://assets-docs.dify.ai/img/jp/basic/a082bf01b81bca0a8e1ae6cb0838f02f.webp) diff --git a/jp/workshop/basic/travel-assistant.md b/jp/workshop/basic/travel-assistant.md index 34f761078..a09cf299a 100644 --- a/jp/workshop/basic/travel-assistant.md +++ b/jp/workshop/basic/travel-assistant.md @@ -37,25 +37,25 @@ Difyが提供するGoogleツールはSerpAPIに基づいており、事前にSer SerpAPIは1か月に100回の無料呼び出しを提供しており、この実験を完了するのに十分です。追加クレジットが必要な場合は、残高を追加するか、他のオープンソースのソリューションを使用できます。 -
+
2. **Dify - ツール - Google**に移動: `認可`に進むをクリックし、APIキーを入力して保存します。 -
+
#### webscraper この実験では、特定のウェブページからコンテンツを抽出するためのスクレイピングツールが必要ですが、Difyは組み込みのツールを提供しているため、追加の設定は不要です。 -
+
#### Wikipedia 目的地の知識を正確に紹介するために、Wikipediaは非常に良い情報源です。Difyにもこのツールが組み込まれており、追加の設定は不要です。 -
+
### 3. エージェントの構築 @@ -63,7 +63,7 @@ SerpAPIは1か月に100回の無料呼び出しを提供しており、この実 ツールとして`Google`、`webscraper`、`Wikipedia`を追加して有効にします。 -
+
### 4. **サンプル出力** @@ -124,4 +124,4 @@ Difyは現在、`短文`、`段落`、`ドロップダウンオプション`、` 変数を追加した後、ユーザーはアプリ開発者の意図に従って必要な背景情報をアプリに提供できるようになります。その結果は以下のようになります: -
\ No newline at end of file +
\ No newline at end of file diff --git a/jp/workshop/intermediate/article-reader.md b/jp/workshop/intermediate/article-reader.md index 2cf651fe8..b18afefbd 100644 --- a/jp/workshop/intermediate/article-reader.md +++ b/jp/workshop/intermediate/article-reader.md @@ -50,7 +50,7 @@ LLMはファイルを直接読み取ることができません。これは、 開始ノードのファイル変数を入力として、テキスト抽出ツールはドキュメント形式のファイルをテキスト形式の変数に変換します。 -
+
### **LLM** @@ -160,11 +160,11 @@ LLMはファイルを直接読み取ることができません。これは、 そのため、開始ノードのファイル変数を`array`型に調整する必要があります。つまり、ファイルリストに変更します。 -
+
開始ノードの後にイテレーションノードを追加し、入力変数と出力変数を設定します。イテレーションノード内では、各ループで実行する内容を設定します。この部分は前述の内容と完全に一致します。 -
+
## **問題2:特定のファイルのみを処理する** @@ -174,4 +174,4 @@ LLMはファイルを直接読み取ることができません。これは、 イテレーションノードの前にリスト操作を追加し、**フィルタ条件**や**ソート**を調整し、その後、イテレーションノードの入力をリスト操作ノードの出力に変更します。 -
\ No newline at end of file +
\ No newline at end of file diff --git a/jp/workspace/app.md b/jp/workspace/app.md index 365342956..dd3e5d969 100644 --- a/jp/workspace/app.md +++ b/jp/workspace/app.md @@ -4,11 +4,11 @@ **探索 > 発見** では、いくつかの一般的なテンプレートアプリケーションを提供しています。これらのアプリケーションは、翻訳、ライティング、プログラミング、アシスタントなどをカバーしています。 -
+
テンプレートアプリケーションを使用したい場合は、テンプレート上の「ワークスペースに追加」ボタンをクリックしてください。これで左側のワークスペースでそのアプリケーションを使用することができます。 -
+
新しいアプリケーションを作成するためにテンプレートを修正したい場合は、テンプレート上の「カスタマイズ」ボタンをクリックしてください。 @@ -16,6 +16,6 @@ ワークスペースはアプリケーションのナビゲーションです。ワークスペースでアプリケーションをクリックすると、そのアプリケーションを直接使用することができます。 -
+
ワークスペースには、あなた自身のアプリケーションや他のチームメンバーがワークスペースに追加したアプリケーションが含まれています。 \ No newline at end of file diff --git a/zh_CN/community/docs-contribution.md b/zh_CN/community/docs-contribution.md index 879915c12..84afdf944 100644 --- a/zh_CN/community/docs-contribution.md +++ b/zh_CN/community/docs-contribution.md @@ -13,7 +13,7 @@ Dify 帮助文档是一个[开源项目](https://github.com/langgenius/dify-docs 如果你在阅读某篇文档的时候发现存在内容错误,或者想要修改部分内容,请点击文档页面右侧目录栏内的 **“在 Github 上编辑”** 按钮,使用 Github 内置的在线编辑器修改文件,然后提交 pull request 并简单描述本次修改行为。标题格式请使用 `Fix: Update xxx`,我们将在收到请求后进行 review,无误后将合并你的修改。 -![](../.gitbook/assets/zh-docs-contribution.png) +![](https://assets-docs.dify.ai/img/zh_CN/community/8772b0242851ca1e46fd07dcc8ef9d82.webp) 当然,你也可以在 [Issues 页](https://github.com/langgenius/dify-docs/issues)贴上文档链接,并简单描述需要修改的内容。收到反馈后将尽快处理。 diff --git a/zh_CN/development/models-integration/hugging-face.md b/zh_CN/development/models-integration/hugging-face.md index b7e2e2b63..0f67e32fe 100644 --- a/zh_CN/development/models-integration/hugging-face.md +++ b/zh_CN/development/models-integration/hugging-face.md @@ -11,7 +11,7 @@ Dify 支持 Text-Generation 和 Embeddings,以下是与之对应的 Hugging Fa 2. 设置 Hugging Face 的 API key([获取地址](https://huggingface.co/settings/tokens))。 3. 进入 [Hugging Face 模型列表页](https://huggingface.co/models),选择对应的模型类型。 -
+
Dify 支持用两种方式接入 Hugging Face 上的模型: @@ -24,17 +24,17 @@ Dify 支持用两种方式接入 Hugging Face 上的模型: 模型详情页右侧有包含 Hosted inference API 的 区域才支持 Hosted inference API 。如下图所: -
+
在模型详情页,可以获得模型的名称。 -
+
#### 2 在 Dify 中使用接入模型 在 `设置 > 模型供应商 > Hugging Face > 模型类型` 的 Endpoint Type 选择 Hosted Inference API。如下图所示: -
+
API Token 为文章开头设置的 API Key。模型名字为上一步获得的模型名字。 @@ -44,26 +44,26 @@ API Token 为文章开头设置的 API Key。模型名字为上一步获得的 模型详情页右侧的 `Deploy` 按钮下有 Inference Endpoints 选项的模型才支持 Inference Endpoint。如下图所示: -
+
#### 2 部署模型 点击模型的部署按钮,选择 Inference Endpoint 选项。如果之前没绑过银行卡的,会需要绑卡。按流程走即可。绑过卡后,会出现下面的界面:按需求修改配置,点击左下角的 Create Endpoint 来创建 Inference Endpoint。 -
+
模型部署好后,就可以看到 Endpoint URL。 -
+
#### 3 在 Dify 中使用接入模型 在 `设置 > 模型供应商 > Hugging Face > 模型类型` 的 Endpoint Type 选择 Inference Endpoints。如下图所示: -
+
API Token 为文章开头设置的 API Key。`Text-Generation 模型名字随便起,Embeddings 模型名字需要跟 Hugging Face 的保持一致。`Endpoint URL 为 上一步部署模型成功后获得的 Endpoint URL。 -
+
> 注意:Embeddings 的「用户名 / 组织名称」,需要根据你在 Hugging Face 的 [Inference Endpoints](https://huggingface.co/docs/inference-endpoints/guides/access) 部署方式,来填写「[用户名](https://huggingface.co/settings/account)」或者「[组织名称](https://ui.endpoints.huggingface.co/)」。 diff --git a/zh_CN/development/models-integration/litellm.md b/zh_CN/development/models-integration/litellm.md index a7928e80c..824f536b7 100644 --- a/zh_CN/development/models-integration/litellm.md +++ b/zh_CN/development/models-integration/litellm.md @@ -53,7 +53,7 @@ docker run \ 在`设置 > 模型供应商 > OpenAI-API-compatible` 中填写: -
+
* **模型名称**: gpt-4 * **API endpoint URL**: `http://localhost:4000` diff --git a/zh_CN/development/models-integration/ollama.md b/zh_CN/development/models-integration/ollama.md index 6e4f8aadc..2c460d521 100644 --- a/zh_CN/development/models-integration/ollama.md +++ b/zh_CN/development/models-integration/ollama.md @@ -1,6 +1,6 @@ # 接入 Ollama 部署的本地模型 -![ollama](../../.gitbook/assets/ollama.png) +![ollama](https://assets-docs.dify.ai/img/zh_CN/models-integration/056f1628bdbecb16b7cbb44ecf5c652f.webp) [Ollama](https://github.com/jmorganca/ollama) 是一款跨平台推理框架客户端(MacOS、Windows、Linux),专为无缝部署大型语言模型(LLM)(如 Llama 2、Mistral、Llava 等)而设计。通过一键式设置,Ollama 可以在本地运行 LLM,将所有交互数据保存在自己的机器上,从而提高数据的私密性和安全性。 @@ -26,7 +26,7 @@ 在 `设置 > 模型供应商 > Ollama` 中填入: - ![](../../.gitbook/assets/ollama-config-zh.png) + ![](https://assets-docs.dify.ai/img/zh_CN/models-integration/e8268ff48931c174b90779da8380a8a0.webp) - 模型名称:`llama3.2` @@ -58,7 +58,7 @@ 4. 使用 Ollama 模型 - ![](../../.gitbook/assets/ollama-use-model.png) + ![](https://assets-docs.dify.ai/img/zh_CN/models-integration/8b6a9961866857f0b36545fcdc9a50bc.webp) 进入需要配置的 App 提示词编排页面,选择 Ollama 供应商下的 `llava` 模型,配置模型参数后即可使用。 diff --git a/zh_CN/development/models-integration/replicate.md b/zh_CN/development/models-integration/replicate.md index 7e72b6945..5465e60df 100644 --- a/zh_CN/development/models-integration/replicate.md +++ b/zh_CN/development/models-integration/replicate.md @@ -9,8 +9,8 @@ Dify 支持接入 Replicate 上的 [Language models](https://replicate.com/colle 3. 挑选模型。在 [Language models](https://replicate.com/collections/language-models) 和 [Embedding models](https://replicate.com/collections/embedding-models) 下挑选模型。 4. 在 Dify 的 `设置 > 模型供应商 > Replicate` 中添加模型。 -
+
API key 为第 2 步中设置的 API Key。Model Name 和 Model Version 可以在模型详情页中找到: -
+
diff --git a/zh_CN/development/models-integration/xinference.md b/zh_CN/development/models-integration/xinference.md index 08fea379c..b6578dcfd 100644 --- a/zh_CN/development/models-integration/xinference.md +++ b/zh_CN/development/models-integration/xinference.md @@ -29,7 +29,7 @@ 进入 `http://127.0.0.1:9997` 选择需要部署的模型和规格进行部署,如下图所示: -
+
由于不同模型在不同硬件平台兼容性不同,请查看 [Xinference 内置模型](https://inference.readthedocs.io/en/latest/models/builtin/index.html) 确定创建的模型是否支持当前硬件平台。 4. 获取模型 UID diff --git a/zh_CN/features/datasets/maintain-dataset-via-api.md b/zh_CN/features/datasets/maintain-dataset-via-api.md index fbd49b55e..45c33a334 100644 --- a/zh_CN/features/datasets/maintain-dataset-via-api.md +++ b/zh_CN/features/datasets/maintain-dataset-via-api.md @@ -12,7 +12,7 @@ 请转到知识页面,你可以在左侧导航中切换到API页面。在此页面上,你可以查看dify提供的API文档并管理用于访问Knowledge API的凭据. -

Knowledge API Document

+

Knowledge API Document

## **创建空的 Knowledge** diff --git a/zh_CN/getting-started/install-self-hosted/zeabur.md b/zh_CN/getting-started/install-self-hosted/zeabur.md index 1e002158d..bd868ac84 100644 --- a/zh_CN/getting-started/install-self-hosted/zeabur.md +++ b/zh_CN/getting-started/install-self-hosted/zeabur.md @@ -17,15 +17,15 @@ Zeabur 团队准备了一个一键部署模板,你只需点击下面的按钮 点击按钮后,你将被导航到 Zeabur 上的模板页面,你可以在那里查看部署的详细信息和说明。 -
Zeabur Template Overview
+
Zeabur Template Overview
点击部署按钮后,你需要输入一个生成的域名,以便将域名绑定到你的 Dify 实例并注入到其他服务中作为环境变量。 然后选择你喜欢的区域,点击部署按钮,你的 Dify 实例将在几分钟内部署完成。 -
Select Region
+
Select Region
部署完成后,你可以在 Zeabur 控制台中看到一个项目页面,如下图所示,你在部署过程中输入的域名将自动绑定到 NGINX 服务,你可以通过该域名访问你的 Dify 实例。 -
Zeabur Project Overview
+
Zeabur Project Overview
你也可以在 NGINX 服务页面的 Networking 选项卡中更改域名。你可以参考 [Zeabur 文档](https://zeabur.com/docs/deploy/domain-binding) 了解更多信息。 \ No newline at end of file diff --git a/zh_CN/guides/annotation/annotation-reply.md b/zh_CN/guides/annotation/annotation-reply.md index 7d60103f4..0d40d8784 100644 --- a/zh_CN/guides/annotation/annotation-reply.md +++ b/zh_CN/guides/annotation/annotation-reply.md @@ -17,13 +17,13 @@ 4. 如果没有找到匹配项,则问题继续常规流程(传递至 LLM 或 RAG); 5. 关闭标注回复功能后,系统将一直不再继续从标注内匹配回复。 -

标注回复流程

+

标注回复流程

### 提示词编排中开启标注回复 进入“应用构建->添加功能”开启标注回复开关: -

提示词编排中开启标注回复

+

提示词编排中开启标注回复

开启时需要先设置标注回复的参数,可设置参数包括:Score 阈值 和 Embedding 模型 @@ -33,27 +33,27 @@ 点击保存并启用时,该设置会立即生效,系统将对所有已保存的标注利用 Embedding 模型生成嵌入保存。 -

标注回复参数设置

+

标注回复参数设置

### 在会话调试页添加标注 你可以在调试与预览页面直接在模型回复信息上添加或编辑标注。 -

添加标注回复

+

添加标注回复

编辑成你需要的高质量回复并保存。 -

编辑标注回复

+

编辑标注回复

再次输入同样的用户问题,系统将使用已保存的标注直接回复用户问题。 -

通过已保存的标注回复用户问题

+

通过已保存的标注回复用户问题

### 日志与标注中开启标注回复 进入“应用构建->日志与标注->标注”开启标注回复开关: -

日志与标注中开启标注回复

+

日志与标注中开启标注回复

### 在标注后台设置标注回复参数 @@ -63,22 +63,22 @@ **Embedding 模型**:用于对标注文本进行向量化,切换模型时会重新生成嵌入。 -

设置标注回复参数

+

设置标注回复参数

### 批量导入标注问答对 在批量导入功能内,你可以下载标注导入模板,按模版格式编辑标注问答对,编辑好后在此批量导入。 -

批量导入标注问答对

+

批量导入标注问答对

### 批量导出标注问答对 通过标注批量导出功能,你可以一次性导出系统内已保存的所有标注问答对。 -

批量导出标注问答对

+

批量导出标注问答对

### 查看标注回复命中历史 在标注命中历史功能内,你可以查看所有命中该条标注的编辑历史、命中的用户问题、回复答案、命中来源、匹配相似分数、命中时间等信息,你可以根据这些系统信息持续改进你的标注内容。 -

查看标注回复命中历史

+

查看标注回复命中历史

diff --git a/zh_CN/guides/annotation/logs.md b/zh_CN/guides/annotation/logs.md index c1c9f50e3..cd4b43972 100644 --- a/zh_CN/guides/annotation/logs.md +++ b/zh_CN/guides/annotation/logs.md @@ -24,7 +24,7 @@ 这些标记将在 Dify 的后续版本中供模型微调使用,以提升模型的准确性与回复风格,当前预览版仅支持标记。 {% endhint %} -

标记日志以改进

+

标记日志以改进

点击一条日志会在界面右侧打开日志详情面板,在该面板中运营人员可以对一次互动进行标注: diff --git a/zh_CN/guides/application-orchestrate/agent.md b/zh_CN/guides/application-orchestrate/agent.md index 739337261..ad4f2c411 100644 --- a/zh_CN/guides/application-orchestrate/agent.md +++ b/zh_CN/guides/application-orchestrate/agent.md @@ -8,15 +8,15 @@ 为了方便快速上手使用,你可以在“探索”中找到智能助手的应用模板,添加到自己的工作区,或者在此基础上进行自定义。在全新的 Dify 工作室中,你也可以从零编排一个专属于你自己的智能助手,帮助你完成财务报表分析、撰写报告、Logo 设计、旅程规划等任务。 -

探索-智能助手应用模板

+

探索-智能助手应用模板

选择智能助手的推理模型,智能助手的任务完成能力取决于模型推理能力,我们建议在使用智能助手时选择推理能力更强的模型系列如 gpt-4 以获得更稳定的任务完成效果。 -

选择智能助手的推理模型

+

选择智能助手的推理模型

你可以在“提示词”中编写智能助手的指令,为了能够达到更优的预期效果,你可以在指令中明确它的任务目标、工作流程、资源和限制等。 -

编排智能助手的指令提示词

+

编排智能助手的指令提示词

### 添加助手需要的工具 @@ -26,13 +26,13 @@ 你可以直接使用 Dify 生态提供的第一方内置工具,或者轻松导入自定义的 API 工具(目前支持 OpenAPI / Swagger 和 OpenAI Plugin 规范)。 -

添加助手需要的工具

+

添加助手需要的工具

“工具”功能允许用户借助外部能力,在 Dify 上创建出更加强大的 AI 应用。例如你可以为智能助理型应用(Agent)编排合适的工具,它可以通过任务推理、步骤拆解、调用工具完成复杂任务。 另外工具也可以方便将你的应用与其他系统或服务连接,与外部环境交互。例如代码执行、对专属信息源的访问等。你只需要在对话框中谈及需要调用的某个工具的名字,即可自动调用该工具。 -![](../../.gitbook/assets/zh-agent-dalle3.png) +![](https://assets-docs.dify.ai/img/zh_CN/application-orchestrate/94fb3210c35dd45389821fcf6c2df1df.webp) ### 配置 Agent @@ -40,15 +40,15 @@ 在 Agent 配置中,你可以修改助手的迭代次数限制。 -

Function Calling 模式

+

Function Calling 模式

-

ReAct 模式

+

ReAct 模式

### 配置对话开场白 你可以为智能助手配置一套会话开场白和开场问题,配置的对话开场白将在每次用户初次对话中展示助手可以完成什么样的任务,以及可以提出的问题示例。 -

配置会话开场白和开场问题

+

配置会话开场白和开场问题

### 添加文件上传 @@ -62,8 +62,8 @@ 编排完智能助手之后,你可以在发布成应用之前进行调试与预览,查看助手的任务完成效果。 -

调试与预览

+

调试与预览

### 应用发布 -

应用发布为 Webapp

+

应用发布为 Webapp

diff --git a/zh_CN/guides/application-orchestrate/app-toolkits/README.md b/zh_CN/guides/application-orchestrate/app-toolkits/README.md index e6b7ffc44..e59305ddc 100644 --- a/zh_CN/guides/application-orchestrate/app-toolkits/README.md +++ b/zh_CN/guides/application-orchestrate/app-toolkits/README.md @@ -4,31 +4,31 @@ 应用工具箱为 Dify 的[应用](../#application_type)提供了不同的附加功能: -
+
### 对话开场白 在对话类应用中,AI 会主动说第一句话或者提出问题,你可以编辑开场白的内容包括开场问题。使用对话开场白可以引导用户提问,交代应用背景,降低对话提问的使用门槛。 -

对话开场白

+

对话开场白

### 下一步问题建议 设置下一步问题建议可以在每次对话交互后,让 AI 根据之前的对话内容继续生成 3 个提问,引导下一轮对话。 -
+
### 文字转语音 开启后可以将 AI 回复的内容转换成自然的语音播放。 -
+
### 语音转文字 开启后可以在应用内录音并将语音自动转换成文本。 -
+
### 引用与归属 diff --git a/zh_CN/guides/application-orchestrate/app-toolkits/moderation-tool.md b/zh_CN/guides/application-orchestrate/app-toolkits/moderation-tool.md index b1a193255..ffd41c371 100644 --- a/zh_CN/guides/application-orchestrate/app-toolkits/moderation-tool.md +++ b/zh_CN/guides/application-orchestrate/app-toolkits/moderation-tool.md @@ -2,26 +2,26 @@ 我们在与 AI 应用交互的过程中,往往在内容安全性,用户体验,法律法规等方面有较为苛刻的要求,此时我们需要“敏感词审查”功能,来为终端用户创造一个更好的交互环境。 在提示词编排页面,点击“添加功能”,找到底部的工具箱“内容审核”: -

Content moderation

+

Content moderation

### 功能一:调用 OpenAI Moderation API OpenAI 和大多数 LLM 公司提供的模型,都带有内容审查功能,确保不会输出包含有争议的内容,比如暴力,性和非法行为,并且 OpenAI 还开放了这种内容审查能力,具体可以参考 [platform.openai.com](https://platform.openai.com/docs/guides/moderation/overview) 。现在你也可以直接在 Dify 上调用 OpenAI Moderation API,你可以审核输入内容或输出内容,只要输入对应的“预设回复”即可。 -

OpenAI Moderation API

+

OpenAI Moderation API

### 功能二:自定义关键词 开发者可以自定义需要审查的敏感词,比如把“kill”作为关键词,在用户输入的时候作审核动作,要求预设回复内容为“The content is violating usage policies.”可以预见的结果是当用户在终端输入包含“kill”的语料片段,就会触发敏感词审查工具,返回预设回复内容。 -

Keywords

+

Keywords

### 功能三: 敏感词审查 Moderation 扩展 不同的企业内部往往有着不同的敏感词审查机制,企业在开发自己的 AI 应用如企业内部知识库 ChatBot,需要对员工输入的查询内容作敏感词审查。为此,开发者可以根据自己企业内部的敏感词审查机制写一个 API 扩展,具体可参考 [moderation.md](../../extension/api-based-extension/moderation.md "mention"),从而在 Dify 上调用,实现敏感词审查的高度自定义和隐私保护。 -

Moderation Settings

+

Moderation Settings

比如我们在自己的本地服务中自定义敏感词审查规则:不能查询有关美国总统的名字的问题。当用户在`query`变量输入"Trump",则在对话时会返回 "Your content violates our usage policy." 测试效果如下: -

Moderation Test

+

Moderation Test

diff --git a/zh_CN/guides/application-orchestrate/creating-an-application.md b/zh_CN/guides/application-orchestrate/creating-an-application.md index 330f3fa8f..e6732a596 100644 --- a/zh_CN/guides/application-orchestrate/creating-an-application.md +++ b/zh_CN/guides/application-orchestrate/creating-an-application.md @@ -12,7 +12,7 @@ 你可以从导航选择 「工作室 」,在应用列表内选择 「从模版创建」。 -

从模板创建应用

+

从模板创建应用

任意选择某个模板,并将其添加至工作区。 @@ -40,7 +40,7 @@ Dify DSL 是由 Dify.AI 所定义的 AI 应用工程文件标准,文件格式 如果你从社区或其它人那里获得了一个应用模版(DSL 文件),可以从工作室选择 「 导入DSL 文件 」。DSL 文件导入后将直接加载原应用的所有配置信息。 -

导入 DSL 文件创建应用

+

导入 DSL 文件创建应用

#### URL 导入 @@ -50,6 +50,6 @@ Dify DSL 是由 Dify.AI 所定义的 AI 应用工程文件标准,文件格式 https://example.com/your_dsl.yml ``` -

通过 URL 导入 DSL 文件

+

通过 URL 导入 DSL 文件

> 导入 DSL 文件时将校对文件版本号。如果 DSL 版本号差异较大,有可能会出现兼容性问题。详细说明请参考 [应用管理:导入](https://docs.dify.ai/zh-hans/guides/management/app-management#dao-ru-ying-yong)。 diff --git a/zh_CN/guides/application-orchestrate/multiple-llms-debugging.md b/zh_CN/guides/application-orchestrate/multiple-llms-debugging.md index 1f5fa5c83..994d24c88 100644 --- a/zh_CN/guides/application-orchestrate/multiple-llms-debugging.md +++ b/zh_CN/guides/application-orchestrate/multiple-llms-debugging.md @@ -2,11 +2,11 @@ 聊天助手应用类型支持 **“多个模型进行调试”** 功能,你可以同时批量检视不同模型对于相同问题的回答效果。 -![](../../.gitbook/assets/zh-multiple-models.png) +![](https://assets-docs.dify.ai/img/zh_CN/application-orchestrate/473784c07975a8795b837c243f5815e5.webp) 最多支持同时添加 4 个大模型。 -![](../../.gitbook/assets/zh-multiple-models-2.png) +![](https://assets-docs.dify.ai/img/zh_CN/application-orchestrate/c60a50d71f66b297fa196ab0dc51311a.webp) 调试时如果发现效果较好的模型,点击 **“单一模型进行调试”** 即可进入至当前模型的单独调试页面。 diff --git a/zh_CN/guides/application-publishing/developing-with-apis.md b/zh_CN/guides/application-publishing/developing-with-apis.md index bccaf3c18..e8c1792d4 100644 --- a/zh_CN/guides/application-publishing/developing-with-apis.md +++ b/zh_CN/guides/application-publishing/developing-with-apis.md @@ -15,7 +15,7 @@ Dify 基于“**后端即服务**”理念为所有应用提供了 API,为 AI 选择一个应用,在应用(Apps)左侧导航中可以找到**访问 API(API Access)**。在该页面中你可以查看 Dify 提供的 API 文档,并管理可访问 API 的凭据。 -

访问 API

+

访问 API

例如你是一个咨询公司的开发部分,你可以基于公司的私有数据库提供 AI 能力给终端用户或开发者,但开发者无法掌握你的数据和 AI 逻辑设计,从而使得服务可以安全、可持续的交付并满足商业目的。 diff --git a/zh_CN/guides/application-publishing/embedding-in-websites.md b/zh_CN/guides/application-publishing/embedding-in-websites.md index cd593e8f1..fc4be24a5 100644 --- a/zh_CN/guides/application-publishing/embedding-in-websites.md +++ b/zh_CN/guides/application-publishing/embedding-in-websites.md @@ -11,11 +11,11 @@ Dify 支持将你的 AI 应用嵌入到业务网站中,你可以使用该能 将 script 代码复制到你网站 `` 或 `` 标签中。 -
+
如果将 script 代码粘贴到官网的 `` 处,你将得到一个官网 AI 机器人: -
+
## 自定义 Dify 聊天机器人气泡按钮 diff --git a/zh_CN/guides/application-publishing/launch-your-webapp-quickly/README.md b/zh_CN/guides/application-publishing/launch-your-webapp-quickly/README.md index 72388d79f..d9be48e7b 100644 --- a/zh_CN/guides/application-publishing/launch-your-webapp-quickly/README.md +++ b/zh_CN/guides/application-publishing/launch-your-webapp-quickly/README.md @@ -11,7 +11,7 @@ 在应用监测页中,你可以找到 WebApp 的管理卡片。打开访问开关后,你可以得到一个能够在互联网上公开分享的网址。 -
+
我们对以下两种应用类型均预置了漂亮的 WebApp 界面: @@ -24,7 +24,7 @@ 点击 WebApp 卡片上的**设置**按钮,为 AI 站点配置一些选项,它们都会被最终用户所见: -![](../../../.gitbook/assets/web-app-settings.png) +![](https://assets-docs.dify.ai/img/zh_CN/launch-your-webapp-quickly/a48d1eae564217a358dd1241e01a68da.webp) {% hint style="info" %} 界面语言目前已支持:英文,中文,繁体中文,葡萄牙语,德语,日本语,韩语,乌克兰语,越南语。如果你需要增加更多语言,可以在 GitHub 内提交 Issue[ 寻求支持](../../../community/support.md)或者提交 PR 贡献代码。 diff --git a/zh_CN/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md b/zh_CN/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md index 3d5ba42b5..0f214dc2c 100644 --- a/zh_CN/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md +++ b/zh_CN/guides/application-publishing/launch-your-webapp-quickly/conversation-application.md @@ -13,33 +13,33 @@ 如你在应用编排时有设置变量的填写要求,则在对话前需要按提示填写信息才可进入对话窗口: -
+
填写必要内容,点击 “开始对话” 按钮,开始聊天。 -
+
移动到 AI 的回答上,可以复制会话内容,给回答 “赞” 和 “踩”。 -
+
### 对话的创建、置顶和删除 点击 “新对话” 按钮开始一个新的对话。移动到一个会话上,可以对会话进行 “置顶” 和 “删除” 操作。 -
+
### 对话开场白 若在应用编排时开启了「对话开场白」功能,则在创建一个新对话时 AI 应用会自动发起第一句对话: -
+
### 下一步问题建议 若在应用编排时开启了「下一步问题建议」功能,则在对话后系统自动生成 3 个相关问题建议: -
+
### 语音转文字 @@ -47,7 +47,7 @@ _请注意确保你使用的设备环境已经授权使用麦克风。_ -
+
### 引用与归属 diff --git a/zh_CN/guides/application-publishing/launch-your-webapp-quickly/text-generator.md b/zh_CN/guides/application-publishing/launch-your-webapp-quickly/text-generator.md index 992b5c714..4e6869b41 100644 --- a/zh_CN/guides/application-publishing/launch-your-webapp-quickly/text-generator.md +++ b/zh_CN/guides/application-publishing/launch-your-webapp-quickly/text-generator.md @@ -15,7 +15,7 @@ 输入查询内容,点击运行按钮,右侧会生成结果,如下图所示: -
+
在生成的结果部分,点 “复制” 按钮可以将内容复制到剪贴板。点 “保存” 按钮可以保存内容。可以在 “已保存” 选项卡中看到保存过的内容。也可以对生成的内容点 “赞” 和 “踩”。 @@ -29,17 +29,17 @@ 点击 “批量运行” 选项卡,则会进入批量运行页面。 -
+
#### 第 2 步 下载模版并填写内容 点击下载模版按钮,下载模版。编辑模版,填写内容,并另存为 `.csv` 格式的文件。 -
+
#### 第 3 步 上传文件并运行 -
+
如果需要导出生成的内容,可以点右上角的下载 “按钮” 来导出为 `csv` 文件。 @@ -49,10 +49,10 @@ 点击生成结果下面的 “保存” 按钮,可以保存运行结果。在 “已保存” 选项卡中,可以看到所有已保存的内容。 -
+
### 生成更多类似结果 如果在应用编排时开启了 “更多类似” 的功能。在 Web 应用中可以点击 “更多类似” 的按钮来生成和当前结果相似的内容。如下图所示: -
+
diff --git a/zh_CN/guides/extension/api-based-extension/README.md b/zh_CN/guides/extension/api-based-extension/README.md index 55df26f68..72562f89e 100644 --- a/zh_CN/guides/extension/api-based-extension/README.md +++ b/zh_CN/guides/extension/api-based-extension/README.md @@ -9,7 +9,7 @@ 除了需要开发对应的模块能力,还需要遵照以下规范,以便 Dify 正确调用 API。 -

基于 API 扩展

+

基于 API 扩展

### API 规范 @@ -230,7 +230,7 @@ API 返回为: 1. 进入 [https://ngrok.com](https://ngrok.com) 官网,注册并下载 Ngrok 文件。 -

Download

+

Download

2. 下载完成后,进入下载目录,根据下方说明解压压缩包,并执行说明中的初始化脚本。 * ```Shell $ unzip /path/to/ngrok.zip @@ -238,7 +238,7 @@ API 返回为: ``` 3. 查看本地 API 服务的端口: -

查看端口

+

查看端口

并运行以下命令启动: @@ -248,7 +248,7 @@ API 返回为: 启动成功的样例如下: -

Ngrok 启动

+

Ngrok 启动

4. 我们找到 Forwarding 中,如上图:`https://177e-159-223-41-52.ngrok-free.app`(此为示例域名,请替换为自己的)即为公网域名。 diff --git a/zh_CN/guides/extension/api-based-extension/cloudflare-workers.md b/zh_CN/guides/extension/api-based-extension/cloudflare-workers.md index e39a6c963..746158108 100644 --- a/zh_CN/guides/extension/api-based-extension/cloudflare-workers.md +++ b/zh_CN/guides/extension/api-based-extension/cloudflare-workers.md @@ -43,9 +43,9 @@ npm run deploy 部署成功之后,你会得到一个公网地址,你可以在 Dify 中添加这个地址作为 API Endpoint。请注意不要遗漏 `endpoint` 这个路径。 -

在 Dify 中添加 API Endpoint

+

在 Dify 中添加 API Endpoint

-

在 App 编辑页面中添加上 API Tool

+

在 App 编辑页面中添加上 API Tool

## 其他逻辑 TL;DR diff --git a/zh_CN/guides/knowledge-base/connect-external-knowledge-base.md b/zh_CN/guides/knowledge-base/connect-external-knowledge-base.md index a6db63a06..4d416e8e1 100644 --- a/zh_CN/guides/knowledge-base/connect-external-knowledge-base.md +++ b/zh_CN/guides/knowledge-base/connect-external-knowledge-base.md @@ -19,7 +19,7 @@ description: 作者: Allen。 Dify Technical Writer。 * Dify 平台能够直接获取托管在云服务提供商知识库内的文本内容,开发者无需将内容重复搬运至 Dify 中的知识库; * Dify 平台能够直接获取自建知识库内经算法处理后的文本内容,开发者仅需关注自建知识库的信息检索机制,并不断优化与提升信息召回的准确度。 -

外部知识库连接原理

+

外部知识库连接原理

以下是连接外部知识的详细步骤: @@ -39,13 +39,13 @@ description: 作者: Allen。 Dify Technical Writer。 * API 接口地址,外部知识库的连接地址,示例 `api-endpoint/retrieval`;详细说明请参考[外部知识库 API](https://docs.dify.ai/zh-hans/guides/knowledge-base/external-knowledge-api-documentation); * API Key,外部知识库连接密钥,详细说明请参考[外部知识库 API](https://docs.dify.ai/zh-hans/guides/knowledge-base/external-knowledge-api-documentation); -
+
### 3. 连接外部知识库 前往 **“知识库”** 页,点击添加知识库卡片下方的 **“连接外部知识库”** 跳转至参数配置页面。 -
+
填写以下参数: @@ -58,13 +58,13 @@ description: 作者: Allen。 Dify Technical Writer。 **Score 阈值:** 文本片段筛选的相似度阈值,只召回超过设置分数的文本片段,默认值为 0.5。数值越高说明对于文本与问题要求的相似度越高,预期被召回的文本数量也越少,结果也会相对而言更加精准。 -
+
### 4. 测试外部知识库连接与召回 建立与外部知识库的连接后,开发者可以在 **“召回测试”** 中模拟可能的问题关键词,预览从外部知识库召回的文本分段。若对于召回结果不满意,可以尝试修改召回参数或自行调整外部知识库的检索设置。 -
+
### 5. 在应用内集成外部知识库 @@ -72,12 +72,12 @@ description: 作者: Allen。 Dify Technical Writer。 在 Chatbot / Agent 类型应用内的编排页中的 **“上下文”** 内,选中带有 `EXTERNAL` 标签的外部知识库。 -
+
* Chatflow / Workflow 类型应用 在 Chatflow / Workflow 类型应用内添加 **“知识检索”** 节点,选中带有 `EXTERNAL` 标签的外部知识库。 -
+
### 6. 管理外部知识库 diff --git a/zh_CN/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion.md b/zh_CN/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion.md index aec448249..69011273f 100644 --- a/zh_CN/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion.md +++ b/zh_CN/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion.md @@ -41,11 +41,11 @@ Notion 分为**内部集成**(internal integration)和**外部集成**(pub 点击“**New integration**”按钮,类型默认是 **Internal**(不可修改),选择关联的空间,输入集成名称并上传 logo 后,点击“Submit”,集成创建成功。 -
+
创建集成后,你可以根据需要在 Capabilities 选项卡下更新其设置,并在 Secrets 下点击 “Show” 按钮然后复制 Secrets。 -
+
复制后回到 Dify 源代码下,在 **.env** 文件里配置相关环境变量,环境变量如下: @@ -58,11 +58,11 @@ NOTION_INTERNAL_SECRET=you-internal-secret **需要将 internal 集成升级为 public 集成**,导航到集成的 Distribution 页面,然后切换开关以公开集成。将开关切换到公共设置,你需要在下面的 Organization Information 表单中填写其他信息,包括你的公司名称、网站和重定向 URL 等信息,然后点击“Submit”按钮。 -
+
在集成的设置页面中成功公开集成后,你将能够在密钥选项卡中访问集成的密钥: -
+
回到 Dify 源代码下,在 **.env** 文件里配置相关环境变量,环境变量如下: diff --git a/zh_CN/guides/knowledge-base/external-data-tool.md b/zh_CN/guides/knowledge-base/external-data-tool.md index 71d74b905..f410f2bd6 100644 --- a/zh_CN/guides/knowledge-base/external-data-tool.md +++ b/zh_CN/guides/knowledge-base/external-data-tool.md @@ -15,20 +15,20 @@ 1. 在使用外部数据工具之前,你需要准备一个 API 和用于鉴权的 API Key,请阅读[external-data-tool.md](../extension/api-based-extension/external-data-tool.md "mention") 2. Dify 提供了集中式的 API 管理,在设置界面统一添加 API 扩展配置后,即可在 Dify 上的各类应用中直接使用。 -

API-based Extension

+

API-based Extension

3. 我们以“查询天气”为例,在“新增基于 API 的扩展”对话框输入名字,API 端点,API Key。保存后我们就可以调用 API 了。 -

Weather Inquiry

+

Weather Inquiry

4. 在提示词编排页面,点击“工具”右侧的“+添加”按钮,在打开的“添加 工具”对话框,填写名称和变量名称(变量名称会被引用到提示词中,请填写英文),以及选择第 2 步中已经添加的基于 API 的扩展。 -

External_data_tool

+

External_data_tool

5. 这样,我们在提示词编排框就可以把查询到的外部数据拼装到提示词中。比如我们要查询今天的伦敦天气,可以添加`location` 变量,输入"London",结合外部数据工具的扩展变量名称`weather_data`,调试输出如下: -

Weather_search_tool

+

Weather_search_tool

在对话日志中,我们也可以看到 API 返回的实时数据: -

Prompt Log

+

Prompt Log

diff --git a/zh_CN/guides/knowledge-base/integrate-knowledge-within-application.md b/zh_CN/guides/knowledge-base/integrate-knowledge-within-application.md index c4ab96c9d..b4f1d8143 100644 --- a/zh_CN/guides/knowledge-base/integrate-knowledge-within-application.md +++ b/zh_CN/guides/knowledge-base/integrate-knowledge-within-application.md @@ -21,7 +21,7 @@ 检索器会在所有与应用关联的知识库中去检索与用户问题相关的文本内容,并将多路召回的相关文档结果合并,以下是召回策略的技术流程图: -
+
根据用户意图同时检索所有添加至 **“上下文”** 的知识库,在多个知识库内查询相关文本片段,选择所有和用户问题相匹配的内容,最后通过 Rerank 策略找到最适合的内容并回答用户。该方法的检索原理更为科学。 @@ -59,7 +59,7 @@ Rerank 模型是一种外部评分系统,它会计算用户问题与给定的 Dify 目前支持多个 Rerank 模型,进入 “模型供应商” 页填入 Rerank 模型(例如 Cohere、Jina AI 等模型)的 API Key。 -

在模型供应商内配置 Rerank 模型

+

在模型供应商内配置 Rerank 模型

**可调参数** @@ -92,7 +92,7 @@ Dify 目前支持多个 Rerank 模型,进入 “模型供应商” 页填入 R 以下是知识库检索方式对文本召回的影响情况: -![](../../../img/zh-integrate-knowledge-within-app.png) +![](https://assets-docs.dify.ai/img/zh_CN/knowledge-base/579acac25d00a2c40abd5f40be558e5b.webp) 3. **引用多个知识库时,无法调整 “权重设置”,提示错误应如何处理?** diff --git a/zh_CN/guides/knowledge-base/knowledge-and-documents-maintenance/README.md b/zh_CN/guides/knowledge-base/knowledge-and-documents-maintenance/README.md index 2c023c882..f3141d47c 100644 --- a/zh_CN/guides/knowledge-base/knowledge-and-documents-maintenance/README.md +++ b/zh_CN/guides/knowledge-base/knowledge-and-documents-maintenance/README.md @@ -43,4 +43,4 @@ Dify 知识库提供整套标准 API ,开发者通过 API 调用对知识库 [maintain-dataset-via-api.md](maintain-dataset-via-api.md) {% endcontent-ref %} -

通过 API 管理文档

+

通过 API 管理文档

diff --git a/zh_CN/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.md b/zh_CN/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.md index b6ed1f5e0..7097d7132 100644 --- a/zh_CN/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.md +++ b/zh_CN/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.md @@ -17,7 +17,7 @@ 进入知识库页面,在左侧的导航中切换至 **API** 页面。在该页面中你可以查看 Dify 提供的知识库 API 文档,并可以在 **API 密钥** 中管理可访问知识库 API 的凭据。 -

Knowledge API Document

+

Knowledge API Document

## API 调用示例 diff --git a/zh_CN/guides/knowledge-base/retrieval-test-and-citation.md b/zh_CN/guides/knowledge-base/retrieval-test-and-citation.md index 9d62308da..63170d334 100644 --- a/zh_CN/guides/knowledge-base/retrieval-test-and-citation.md +++ b/zh_CN/guides/knowledge-base/retrieval-test-and-citation.md @@ -63,11 +63,11 @@ Dify 知识库内提供了文本召回测试的功能,用于模拟用户输入 在应用内的“上下文”添加知识库后,可以在 **“添加功能”** 内开启 **“引用与归属”**。在应用内输入问题后,若涉及已关联的知识库文档,将标注内容的引用来源。你可以通过此方式检查知识库所召回的内容分段是否符合预期。 -

打开引用与归属功能

+

打开引用与归属功能

开启功能后,当 LLM 引用知识库内容来回答问题时,可以在回复内容下面查看到具体的引用段落信息,包括**原始分段文本、分段序号、匹配度**等。点击引用分段上方的 **跳转至知识库**,可以快捷访问该分段所在的知识库分段列表,方便开发者进行调试编辑。 -

查看回复内容的引用信息

+

查看回复内容的引用信息

#### 查看知识库内已关联的应用 diff --git a/zh_CN/guides/management/app-management.md b/zh_CN/guides/management/app-management.md index 91c5b903c..dc4f34857 100644 --- a/zh_CN/guides/management/app-management.md +++ b/zh_CN/guides/management/app-management.md @@ -4,7 +4,7 @@ 创建应用后,如果你想要修改应用名称或描述,可以点击应用左上角的 「编辑信息」 ,重新修改应用的图标、名称或描述。 -
zh-Hans-edit-app-info

编辑应用信息

+
zh-Hans-edit-app-info

编辑应用信息

### 复制应用 @@ -20,11 +20,11 @@ * 在 “工作室” 页点击应用菜单按钮中 “导出 DSL”; * 进入应用的编排页后,点击左上角 “导出 DSL”。 -![](../../.gitbook/assets/export-dsl.png) +![](https://assets-docs.dify.ai/img/zh_CN/management/457a66965cf27bf5960954bba25c96dc.webp) DSL 文件不包含自定义工具节点内已填写的授权信息,例如第三方服务的 API Key;如果环境变量中包含 `Secret`类型变量,导出文件时将提示是否允许导出该敏感信息。 -![](../../.gitbook/assets/export-dsl-secret.png) +![](https://assets-docs.dify.ai/img/zh_CN/management/c3b27947ca294bf846af82df0f87ae31.webp) {% hint style="info" %} Dify DSL 格式文件是 Dify.AI 定义的 AI 应用工程文件标准,文件格式为 YML。该标准涵盖应用的基本描述、模型参数、编排配置等信息。 diff --git a/zh_CN/guides/management/personal-account-management.md b/zh_CN/guides/management/personal-account-management.md index 3a71bce7c..3067a5fc5 100644 --- a/zh_CN/guides/management/personal-account-management.md +++ b/zh_CN/guides/management/personal-account-management.md @@ -11,7 +11,7 @@ Dify 不同版本支持的登录方式如下: > 注意:Dify 的云服务版本账户,如果 GitHub 或 Google 账户的绑定邮箱与使用邮箱验证码登录的邮箱相同,系统会自动将它们关联为同一账户,无需手动绑定,避免重复注册。 -![](../../../img/zh-personal-account-1.png) +![](https://assets-docs.dify.ai/img/zh_CN/management/0c73766625dc274acc8f93a88481566b.webp) ## 修改账号信息 @@ -24,7 +24,7 @@ Dify 不同版本支持的登录方式如下: > 注意:重置密码功能仅在社区版提供 -
+
### 登录方式 diff --git a/zh_CN/guides/management/subscription-management.md b/zh_CN/guides/management/subscription-management.md index 3af5139b4..88fb3f420 100644 --- a/zh_CN/guides/management/subscription-management.md +++ b/zh_CN/guides/management/subscription-management.md @@ -10,7 +10,7 @@ 你可以在账单页查看团队内各项资源的使用情况。 -

团队账单管理

+

团队账单管理

### 常见问题 @@ -21,7 +21,7 @@ * 从 Professional 升级至 Team 需补足当月差额,立即生效。 * 从 Team 降级至 Professional 立即生效。 -

更改付费方案

+

更改付费方案

如果取消订阅方案,**团队将在当月账单周期结束后**自动切换至 Sandbox/Free 版本。已超出的团队人数及团队资源将无法访问。 diff --git a/zh_CN/guides/management/team-members-management.md b/zh_CN/guides/management/team-members-management.md index 700fb4dc7..071424ef0 100644 --- a/zh_CN/guides/management/team-members-management.md +++ b/zh_CN/guides/management/team-members-management.md @@ -14,14 +14,14 @@ 团队所有者或管理员点击右上角头像,轻点 **“成员”** → **“添加”**,输入邮箱,分配成员权限,添加新成员。 -

为团队成员分配权限

+

为团队成员分配权限

> 社区版团队需在[环境变量](https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments)中添加并启用邮件服务,被邀成员才能收到邀请邮件。 - 若被邀请的成员未注册 Dify,将收到一封邀请邮件,点击邮件中的链接即可完成注册。 - 若被邀请成员已注册 Dify,系统将自动分配权限,**同时不再发送邀请邮件**。被邀成员可以在右上角头像处切换至新的 Workspace。 -![](../../../img/switch-workspace.png) +![](https://assets-docs.dify.ai/img/zh_CN/management/127c49e4102f75e9acc5d1cf37a51f14.webp) ### 成员权限 @@ -48,7 +48,7 @@ 点击 Dify 团队首页右上角头像,前往 **“设置”** → **“成员”** ,选择需要被移除的成员的角色,轻点 **“移除团队”**。 -

移除成员

+

移除成员

### 常见问题 diff --git a/zh_CN/guides/model-configuration/README.md b/zh_CN/guides/model-configuration/README.md index 8936d52f0..a53e9f364 100644 --- a/zh_CN/guides/model-configuration/README.md +++ b/zh_CN/guides/model-configuration/README.md @@ -2,7 +2,7 @@ Dify 是基于大语言模型的 AI 应用开发平台,初次使用时你需要先在 Dify 的 **设置 -- 模型供应商** 页面内添加并配置所需要的模型。 -

设置-模型供应商

+

设置-模型供应商

Dify 目前已支持主流的模型供应商,例如 OpenAI 的 GPT 系列、Anthropic 的 Claude 系列等。不同模型的能力表现、参数类型会不一样,你可以根据不同情景的应用需求选择你喜欢的模型供应商。**你在 Dify 应用以下模型能力前,应该前往不同的模型厂商官方网站获得他们的 API key 。** @@ -35,7 +35,7 @@ Dify 目前已支持主流的模型供应商,例如 OpenAI 的 GPT 系列、An Dify 在需要模型时,会根据使用场景来选择设置过的默认模型。在 `设置 > 模型供应商` 中设置默认模型。 -
+
系统默认推理模型(System Reasoning Model):设置创建应用使用的默认推理模型,以及对话名称生成、下一步问题建议等功能也会使用该默认推理模型。 @@ -43,7 +43,7 @@ Dify 在需要模型时,会根据使用场景来选择设置过的默认模型 在 Dify 的 `设置 > 模型供应商` 中设置要接入的模型。 -
+
模型供应商分为两种: @@ -75,4 +75,4 @@ Dify 使用了 [PKCS1\_OAEP](https://pycryptodome.readthedocs.io/en/latest/src/c 配置完模型后,就可以在应用中使用这些模型了: -
+
diff --git a/zh_CN/guides/model-configuration/customizable-model.md b/zh_CN/guides/model-configuration/customizable-model.md index e1ce0c443..9b2788373 100644 --- a/zh_CN/guides/model-configuration/customizable-model.md +++ b/zh_CN/guides/model-configuration/customizable-model.md @@ -8,7 +8,7 @@ 而不同于预定义模型,自定义供应商接入时永远会拥有如下两个参数,不需要在供应商 yaml 中定义。 -
+
在前文中,我们已经知道了供应商无需实现`validate_provider_credential`,Runtime会自行根据用户在此选择的模型类型和模型名称调用对应的模型层的`validate_credentials`来进行验证。 diff --git a/zh_CN/guides/model-configuration/load-balancing.md b/zh_CN/guides/model-configuration/load-balancing.md index cdb573b78..e5808b58e 100644 --- a/zh_CN/guides/model-configuration/load-balancing.md +++ b/zh_CN/guides/model-configuration/load-balancing.md @@ -6,7 +6,7 @@ 你可以在 **模型供应商 -- 模型列表 -- 设置模型负载均衡** 打开该功能,并在同一个模型上添加多个凭据 (API key)。 -

模型负载均衡

+

模型负载均衡

{% hint style="info" %} 模型负载均衡为付费特性,你可以通过[订阅 SaaS 付费服务](../../getting-started/cloud.md#ding-yue-ji-hua)或者购买企业版来开启该功能。 @@ -14,17 +14,17 @@ 默认配置中的 API Key 为初次配置模型供应商时添加的凭据,你需要点击 **增加配置** 添加同一模型的不同 API Key 来正常使用负载均衡功能。 -

配置负载均衡

+

配置负载均衡

**需要额外添加至少 1 个模型凭据**即可保存并开启负载均衡。 你也可以将已配置的凭据**临时停用**或者**删除**。 -
+
配置完成后再模型列表内会显示所有已开启负载均衡的模型。 -

开启负载均衡

+

开启负载均衡

{% hint style="info" %} 默认情况下,负载均衡使用 Round-robin 策略。如果触发速率限制,将应用 1 分钟的冷却时间。 @@ -32,4 +32,4 @@ 你也可以从 **添加模型** 配置负载均衡,配置流程与上面一致。 -

从添加模型配置负载均衡

+

从添加模型配置负载均衡

diff --git a/zh_CN/guides/monitoring/README.md b/zh_CN/guides/monitoring/README.md index b08a3f103..a9dd7cd37 100644 --- a/zh_CN/guides/monitoring/README.md +++ b/zh_CN/guides/monitoring/README.md @@ -2,4 +2,4 @@ 你可以在 **概览** 内监控、跟踪应用程序在生产环境中的性能,在数据分析仪表盘内分析生产环境中应用的使用成本、延迟、用户反馈、性能等指标,并通过持续调试、迭代不断改进你的应用程序。 -

概览

+

概览

diff --git a/zh_CN/guides/monitoring/analysis.md b/zh_CN/guides/monitoring/analysis.md index 1413d02b0..34031d726 100644 --- a/zh_CN/guides/monitoring/analysis.md +++ b/zh_CN/guides/monitoring/analysis.md @@ -2,7 +2,7 @@ **概览 -- 数据分析** 内显示了用量、活跃用户数和 LLM 调用消耗等,这使你可以持续改进应用运营的效果、活跃度、经济性。我们将逐步提供更多有用的可视化能力,请告诉我们你想要的。 -

概览—数据分析

+

概览—数据分析

*** diff --git a/zh_CN/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md b/zh_CN/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md index 8dfd83936..280fbd3ba 100644 --- a/zh_CN/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md +++ b/zh_CN/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.md @@ -15,35 +15,35 @@ Langfuse 官网介绍:[https://langfuse.com/](https://langfuse.com/) 1. 在[官网注册](https://langfuse.com/)并登录 Langfuse 2. 在 Langfuse 内创建项目,登录后在主页点击 **New** ,创建一个自己的项目,**项目**将用于与 Dify 内的**应用**关联进行数据监测。 -

在 Langfuse 内创建项目

+

在 Langfuse 内创建项目

为项目编辑一个名称。 -

在 Langfuse 内创建项目

+

在 Langfuse 内创建项目

3. 创建项目 API 凭据,在项目内左侧边栏中点击 **Settings** 打开设置 -

创建一个项目 API 凭据

+

创建一个项目 API 凭据

在 Settings 内点击 **Create API Keys** 创建一个项目 API 凭据。 -

创建一个项目 API 凭据

+

创建一个项目 API 凭据

复制并保存 **Secret Key** ,**Public Key,Host** -

获取 API Key 配置

+

获取 API Key 配置

4. 在 Dify 内配置 Langfuse,打开需要监测的应用,在侧边菜单打开**监测**,在页面中选择**配置。** -

配置 Langfuse

+

配置 Langfuse

点击配置后,将在 Langfuse 内创建的 **Secret Key, Public Key, Host** 粘贴到配置内并保存。 -

配置 Langfuse

+

配置 Langfuse

成功保存后可以在当前页面查看到状态,显示已启动即正在监测。 -

查看配置状态

+

查看配置状态

*** @@ -51,11 +51,11 @@ Langfuse 官网介绍:[https://langfuse.com/](https://langfuse.com/) 配置完成后, Dify 内应用的调试或生产数据可以在 Langfuse 查看监测数据。 -

在 Dify 内调试应用

+

在 Dify 内调试应用

-

在 Langfuse 内查看应用数据

+

在 Langfuse 内查看应用数据

-

在 Langfuse 内查看应用数据

+

在 Langfuse 内查看应用数据

### 监测数据清单 diff --git a/zh_CN/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md b/zh_CN/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md index e9171a064..bdbfac242 100644 --- a/zh_CN/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md +++ b/zh_CN/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.md @@ -20,39 +20,39 @@ LangSmith 官网介绍:[https://www.langchain.com/langsmith](https://www.langc 在 LangSmith 内创建项目,登录后在主页点击 **New Project** 创建一个自己的项目,**项目**将用于与 Dify 内的**应用**关联进行数据监测。 -

在 LangSmith 内创建项目

+

在 LangSmith 内创建项目

创建完成之后在 Projects 内可以查看该项目。 -

在 LangSmith 内查看已创建项目

+

在 LangSmith 内查看已创建项目

#### 3. 创建项目凭据 创建项目凭据,在左侧边栏内找到项目设置 **Settings**。 -

项目设置

+

项目设置

点击 **Create API Key**,创建一个项目凭据。 -

创建一个项目 API Key

+

创建一个项目 API Key

选择 **Personal Access Token** ,用于后续的 API 身份校验。 -

创建一个 API Key

+

创建一个 API Key

将创建的 API key 复制保存。 -

复制 API Key

+

复制 API Key

#### 4. 将 LangSmith 集成至 Dify 平台 在 Dify 应用内配置 LangSmith。打开需要监测的应用,在左侧边菜单内打开**监测**,点击页面内的**配置。** -

配置 LangSmith

+

配置 LangSmith

点击配置后,将在 LangSmith 内创建的 **API Key** 和**项目名**粘贴到配置内并保存。 -

配置 LangSmith

+

配置 LangSmith

{% hint style="info" %} 配置项目名需要与 LangSmith 内设置的项目一致,若项目名不一致,数据同步时 LangSmith 会自动创建一个新的项目。 @@ -60,17 +60,17 @@ LangSmith 官网介绍:[https://www.langchain.com/langsmith](https://www.langc 成功保存后可以在当前页面查看监测状态。 -

查看配置状态

+

查看配置状态

### 在 LangSmith 内查看监测数据 配置完成后, Dify 内应用的调试或生产数据可以在 LangSmith 查看监测数据。 -

在 Dify 内调试应用

+

在 Dify 内调试应用

-

在 LangSmith 内查看应用数据

+

在 LangSmith 内查看应用数据

-

在 LangSmith 内查看应用数据

+

在 LangSmith 内查看应用数据

### 监测数据清单 diff --git a/zh_CN/guides/tools/README.md b/zh_CN/guides/tools/README.md index d626e9d44..484b04c74 100644 --- a/zh_CN/guides/tools/README.md +++ b/zh_CN/guides/tools/README.md @@ -13,7 +13,7 @@ ### 如何配置第一方工具 -

第一方工具列表

+

第一方工具列表

Dify 目前已支持: @@ -27,11 +27,11 @@ Dify 目前已支持: 若你需要直接使用 Dify 生态提供的第一方内置工具,你需要在使用前配置相应的凭据。 -

配置第一方工具凭据

+

配置第一方工具凭据

凭据校验成功后工具会显示“已授权”状态。配置凭据后,工作区中的所有成员都可以在编排应用程序时使用此工具。 -

第一方工具已授权

+

第一方工具已授权

### 如何创建自定义工具 @@ -39,15 +39,15 @@ Dify 目前已支持: 工具目前支持两种鉴权方式:无鉴权 和 API Key。 -

创建自定义工具

+

创建自定义工具

在导入 Schema 内容后系统会主动解析文件内的参数,并可预览工具具体的参数、 方法、路径。你也可以在此对工具参数进行测试。 -

自定义工具参数测试

+

自定义工具参数测试

完成自定义工具创建之后,工作区中的所有成员都可以在“工作室”内编排应用程序时使用此工具。 -

已添加自定义工具

+

已添加自定义工具

#### Cloudflare Workers @@ -60,8 +60,8 @@ Dify 目前已支持: 目前,你可以在“工作室”中创建**智能助手型应用**时,将已配置好凭据的工具在其中使用。 -

创建智能助手型应用时添加工具

+

创建智能助手型应用时添加工具

以下图为例,在财务分析应用内添加工具后,智能助手将在需要时自主调用工具,从工具中查询财务报告数据,并将数据分析后完成与用户之间的对话。 -

智能助手在对话中完成工具调用回复问题

+

智能助手在对话中完成工具调用回复问题

diff --git a/zh_CN/guides/tools/quick-tool-integration.md b/zh_CN/guides/tools/quick-tool-integration.md index 6f38b9843..4a87a1e30 100644 --- a/zh_CN/guides/tools/quick-tool-integration.md +++ b/zh_CN/guides/tools/quick-tool-integration.md @@ -275,4 +275,4 @@ class GoogleProvider(BuiltinToolProviderController): 当然,因为 google\_search 需要一个凭据,在使用之前,还需要在前端配置它的凭据。 -
+
diff --git a/zh_CN/guides/tools/tool-configuration/comfyui.md b/zh_CN/guides/tools/tool-configuration/comfyui.md index 5a51c4f54..6c8d248c7 100644 --- a/zh_CN/guides/tools/tool-configuration/comfyui.md +++ b/zh_CN/guides/tools/tool-configuration/comfyui.md @@ -7,10 +7,10 @@ ## 2. 提示词设置 如果你不需要通过dify传入提示词,可以跳过此步。如果你的提示词节点连接到了 ComfyUI 中唯一的 `KSampler` 节点,那么你可以跳过此步。 否则,请使用字符串 `{{positive_prompt}}` 替换掉正向提示词内容,`{{negative_prompt}}` 替换掉负向提示词内容。 -
+
## 3. 导出工作流的 API 文件 -
+
如图所示,在工具栏中选择 `Save(API Format)`,如果没有该选择,则需要在设置中开启 `Dev Mode`。 ## 4. 在 Dify 中集成 ComfyUI diff --git a/zh_CN/guides/tools/tool-configuration/dall-e.md b/zh_CN/guides/tools/tool-configuration/dall-e.md index 64827c1a6..bcfd69903 100644 --- a/zh_CN/guides/tools/tool-configuration/dall-e.md +++ b/zh_CN/guides/tools/tool-configuration/dall-e.md @@ -12,7 +12,7 @@ DALL-E 是由 OpenAI 开发的一种基于文本提示生成图像的工具。Di 在 Dify 导航页内轻点 `工具 > DALL-E > 去授权` 填写 API Key。 -![](../../../.gitbook/assets/zh-tools-dalle.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/aedd7b9acdf181402817d8b8a8c04195.webp) ## 3. 使用工具 @@ -20,10 +20,10 @@ DALL-E 是由 OpenAI 开发的一种基于文本提示生成图像的工具。Di Chatflow 和 Workflow 应用均支持添加 `DALL-E 绘图` 工具节点。添加后,需要在节点内的 “输入变量 → 提示词” 内填写[变量](https://docs.dify.ai/v/zh-hans/guides/workflow/variables)引用用户输入的提示词,或者是上一节点生成的内容。最后在 “结束” 节点内使用变量引用 `DALL-E 绘图` 输出的图像。 -![](../../../.gitbook/assets/zh-dalle3-node.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/31ad694609e2c9357bf0cfee9d08bfb3.webp) * **Agent 应用** 在 Agent 应用内添加 `DALL-E` 工具,然后在对话框内发送图片描述,调用工具生成 AI 图像。 -![](../../../.gitbook/assets/zh-agent-dalle3.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/94fb3210c35dd45389821fcf6c2df1df.webp) diff --git a/zh_CN/guides/tools/tool-configuration/google.md b/zh_CN/guides/tools/tool-configuration/google.md index 0a7caa32c..730365904 100644 --- a/zh_CN/guides/tools/tool-configuration/google.md +++ b/zh_CN/guides/tools/tool-configuration/google.md @@ -12,7 +12,7 @@ Google 搜索工具能够帮助你在使用 LLM 应用的时候,获取联网 在 Dify 导航页内轻点 `工具 > Google > 去授权` 填写 API Key。 -![](../../../.gitbook/assets/zh-tools-google.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/11576499783c4881c1fcfa6210374c61.webp) ## 3. 使用工具 diff --git a/zh_CN/guides/tools/tool-configuration/perplexity.md b/zh_CN/guides/tools/tool-configuration/perplexity.md index 8eae7dd8b..11c4dd0b2 100644 --- a/zh_CN/guides/tools/tool-configuration/perplexity.md +++ b/zh_CN/guides/tools/tool-configuration/perplexity.md @@ -12,7 +12,7 @@ Perplexity 是一个基于 AI 的搜索引擎,能够理解复杂的查询并 在 Dify 导航页内轻点 `工具 > Perplexity > 去授权` 填写 API Key。 -![](../../../.gitbook/assets/zh-tools-perplexity.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/13f20481bd36e4c9ebdc805d019e3423.webp) ## 3. 使用工具 @@ -22,10 +22,10 @@ Perplexity 是一个基于 AI 的搜索引擎,能够理解复杂的查询并 Chatflow 和 Workflow 应用均支持添加 Perplexity 工具节点。将用户输入的内容通过变量传递至 Perplexity 工具节点内的“查询”框中,按照需求调整 Perplexity 工具的内置参数,最后在“结束”节点的回复框中选中 Perplexity 工具节点的输出内容。 -![](../../../.gitbook/assets/zh-tools-chatflow-perplexity.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/f375ab5173d1316a3fd052110c04cd43.webp) * **Agent 应用** 在 Agent 应用内添加 `Perplexity Search` 工具,然后输入相关指令即可调用此工具。 -![](../../../.gitbook/assets/zh-tools-agent-perplexity.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/03ceca7df1caf822ecaf6e862439c65c.webp) diff --git a/zh_CN/guides/tools/tool-configuration/searchapi.md b/zh_CN/guides/tools/tool-configuration/searchapi.md index 010d1c105..d53dcad5e 100644 --- a/zh_CN/guides/tools/tool-configuration/searchapi.md +++ b/zh_CN/guides/tools/tool-configuration/searchapi.md @@ -12,7 +12,7 @@ SearchApi 是一个强大的实时 SERP API,可提供来自 Google 搜索、Go 在 Dify 导航页内轻点 `工具 > SearchApi > 去授权` 填写 API Key。 -![](../../../.gitbook/assets/zh-tool-searchapi.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/fe38da8e94f5a6ed13327c75b29c925b.webp) ## 3. 使用工具 @@ -22,7 +22,7 @@ SearchApi 是一个强大的实时 SERP API,可提供来自 Google 搜索、Go Chatflow 和 Workflow 应用均支持添加 `SearchApi` 系列工具节点,提供 Google Jobs API,Google News API,Google Search API,YouTube 脚本 API 四种工具。 -![](../../../.gitbook/assets/zh-tool-searchapi-flow.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/0f8fa8d0aa5c0e80a7443d2b6a35e6e0.webp) * **Agent 应用** diff --git a/zh_CN/guides/tools/tool-configuration/serper.md b/zh_CN/guides/tools/tool-configuration/serper.md index ca16032f3..ed245c7f1 100644 --- a/zh_CN/guides/tools/tool-configuration/serper.md +++ b/zh_CN/guides/tools/tool-configuration/serper.md @@ -12,7 +12,7 @@ Serper 是一个强大的实时搜索引擎工具API,可提供来自 Google 在 Dify 导航页内轻点 `工具 > Serper > 去授权` 填写 API Key。 -![](../../../.gitbook/assets/zh-tool-serper.png) +![](https://assets-docs.dify.ai/img/zh_CN/tool-configuration/8fbb77bebd0448663f0b83a3c224afff.webp) ## 3. 使用工具 diff --git a/zh_CN/guides/tools/tool-configuration/siliconflow.md b/zh_CN/guides/tools/tool-configuration/siliconflow.md index abd0513cd..e0d71cf44 100644 --- a/zh_CN/guides/tools/tool-configuration/siliconflow.md +++ b/zh_CN/guides/tools/tool-configuration/siliconflow.md @@ -12,7 +12,7 @@ SiliconCloud 基于优秀的开源基础模型,提供高性价比的 GenAI 服 在 Dify 的工具页中点击 `SiliconCloud > 去授权` 填写 API Key。 -
+
### 3. 使用工具 @@ -22,12 +22,12 @@ Chatflow 和 Workflow 应用均支持添加 `SiliconFlow` 工具节点。 将用户输入的内容通过[变量](../../workflow/variables.md)传递至 Siliconflow 工具的 Flux 或 Stable Diffusion 节点内的“提示词”“负面提示词”框中,按照需求调整内置参数,最后在“结束”节点的回复框中选中 Siliconflow 工具节点的输出内容(文本、图片等)。 -
+
* **Agent 应用** 在 Agent 应用内添加 `Stable Diffusion` 或 `Flux` 工具,然后在对话框内发送图片描述,调用工具生成 AI 图像。 -
+
-
+
diff --git a/zh_CN/guides/workflow/README.md b/zh_CN/guides/workflow/README.md index a78e37b67..81fa6c902 100644 --- a/zh_CN/guides/workflow/README.md +++ b/zh_CN/guides/workflow/README.md @@ -9,7 +9,7 @@ Dify 工作流分为两种类型: * **Chatflow**:面向对话类情景,包括客户服务、语义搜索、以及其他需要在构建响应时进行多步逻辑的对话式应用程序。 * **Workflow**:面向自动化和批处理情景,适合高质量翻译、数据分析、内容生成、电子邮件自动化等应用程序。 -
+
为解决自然语言输入中用户意图识别的复杂性,Chatflow 提供了问题理解类节点。相对于 Workflow 增加了 Chatbot 特性的支持,如:对话历史(Memory)、标注回复、Answer 节点等。 diff --git a/zh_CN/guides/workflow/additional-features.md b/zh_CN/guides/workflow/additional-features.md index 775182cc4..5551231c1 100644 --- a/zh_CN/guides/workflow/additional-features.md +++ b/zh_CN/guides/workflow/additional-features.md @@ -24,7 +24,7 @@ Workflow 类型应用仅支持 **“图片上传”** 功能。开启后,Workf 最后在 END 节点内选择 LLM 节点的输出变量即可完成设置。 -

开启视觉分析能力

+

开启视觉分析能力

### Chatflow @@ -43,7 +43,7 @@ Chatflow 类型应用支持以下功能: 支持以下文件类型:文档、图片、音频、视频以及其它文件类型。开启此功能后,应用使用者可以在应用对话的过程中随时上传并更新文件。最多支持同时上传 10 个文件,每个文件的大小上限为 15MB。 -

文件上传功能

+

文件上传功能

* **引用和归属** 常用于配合[“知识检索”](node/knowledge-retrieval.md)节点共同使用,显示 LLM 给出答复的参考源文档及归属部分。 @@ -59,7 +59,7 @@ Chatflow 类型应用支持以下功能: **对于应用使用者而言:** 已开启文件上传功能的 Chatflow 应用将会在对话框右侧出现 “回形针” 标识,点击后即可上传文件并与 LLM 交互。 -

使用文件上传

+

使用文件上传

**对于应用开发者而言:** @@ -78,7 +78,7 @@ LLM 并不具备直接读取文档文件的能力,因此需要使用 [文档 使用此方法搭建出的 Chatflow 应用无法记忆已上传的文件内容。应用使用者每次对话时都需要在聊天框中上传文档文件。如果你希望应用能够记忆已上传的文件,请参考 [《文件上传:在开始节点添加变量》](file-upload.md#fang-fa-er-zai-tian-jia-wen-jian-bian-liang)。 -

文档文件编排

+

文档文件编排

* **图片文件** @@ -90,7 +90,7 @@ LLM 并不具备直接读取文档文件的能力,因此需要使用 [文档 2. 添加 LLM 节点,启 VISION 功能并选择 `sys.files` 变量。 3. 在末尾添加 “直接回复” 节点,填写 LLM 节点的输出变量。 -

开启视觉分析能力

+

开启视觉分析能力

* **混合文件类型** @@ -103,7 +103,7 @@ LLM 并不具备直接读取文档文件的能力,因此需要使用 [文档 应用使用者同时上传文档文件和图片后,文档文件自动分流至文档提取器节点,图片文件自动分流至 LLM 节点以实现对于文件的共同处理。 -

混合文件处理

+

混合文件处理

* **音视频文件** diff --git a/zh_CN/guides/workflow/bulletin.md b/zh_CN/guides/workflow/bulletin.md index bdcab658f..b576f854b 100644 --- a/zh_CN/guides/workflow/bulletin.md +++ b/zh_CN/guides/workflow/bulletin.md @@ -8,11 +8,11 @@ description: 作者:Evanchen , Allen. * 移除 Chatflow 应用“功能”中的图片上传选项,取而代之的是新的“文件上传”功能。你可以在“文件上传”功能内选择图片文件类型。同时,应用对话框中的图片上传 icon 也被替换为文件上传 icon。 -
+
* 将在未来**停用 Workflow 应用“功能”中的图片上传选项**以及移除 `sys.files` [变量](variables.md),目前这两项功能已被标记为 `LEGACY`,建议应用开发者改用自定义文件变量为 Workflow 应用添加文件上传功能。 -
+
### 为什么要替换“图片上传”功能? @@ -27,7 +27,7 @@ Dify 此前仅支持上传图片文件。而在最新的版本中,已提供更 * 文件上传功能允许将文件以 File variables 的形式在工作流应用中上传、解析、引用、和下载。 * 开发者现可轻松构建能理解和处理图片、音频、视频复杂工作的应用。 -
+
因此不再建议使用单独的“图片上传”功能,而是改用更为综合全面的“文件上传”功能以增强应用体验。 @@ -39,11 +39,11 @@ Dify 此前仅支持上传图片文件。而在最新的版本中,已提供更 如果你已创建 Chatflow 应用并启用了“图片上传”功能,并在 LLM 节点中开启 Vision 功能,系统将自动完成功能切换,不会影响到应用的图片上传能力。如果需要更新并重新发布应用,需要在 LLM 节点中的 Vision 变量选择框指定文件变量后清除 checklist 中的 item,重新发布应用。 -
+
如果你希望在 Chatflow 应用中添加“图片上传”功能,请在功能中开启“文件上传”,仅勾选“图片”类型。然后在 LLM 节点中启用 Vision 功能,并在其中填写 `sys.files` 变量。此时输入框将出现“回形针”的上传入口,详细说明请参考 [附加功能](additional-features.md)。 -
+
* **Workflow 应用** diff --git a/zh_CN/guides/workflow/debug-and-preview/checklist.md b/zh_CN/guides/workflow/debug-and-preview/checklist.md index f05799d5a..77c784214 100644 --- a/zh_CN/guides/workflow/debug-and-preview/checklist.md +++ b/zh_CN/guides/workflow/debug-and-preview/checklist.md @@ -2,4 +2,4 @@ 在进入调试运行之前,你可以在检查清单内检查是否有未完成配置或者未连线的节点。 -
+
diff --git a/zh_CN/guides/workflow/debug-and-preview/history.md b/zh_CN/guides/workflow/debug-and-preview/history.md index e8c5fdcf4..b72fa7e28 100644 --- a/zh_CN/guides/workflow/debug-and-preview/history.md +++ b/zh_CN/guides/workflow/debug-and-preview/history.md @@ -2,4 +2,4 @@ 在「运行历史」中可以查看当前工作流历史调试的运行结果和日志信息。 -
+
diff --git a/zh_CN/guides/workflow/debug-and-preview/log.md b/zh_CN/guides/workflow/debug-and-preview/log.md index 17e9dd163..b2ea4592e 100644 --- a/zh_CN/guides/workflow/debug-and-preview/log.md +++ b/zh_CN/guides/workflow/debug-and-preview/log.md @@ -2,8 +2,8 @@ 点击「查看日志—详情」可以在详情中查看运行总览信息、输入/输出 、元数据信息等。 -
+
点击「查看日志-追踪」可以查看工作流完整运行过程各节点的输入/输出、Token 消耗、运行时长等。 -
+
diff --git a/zh_CN/guides/workflow/debug-and-preview/step-run.md b/zh_CN/guides/workflow/debug-and-preview/step-run.md index c2d89bc3c..ea29cd86f 100644 --- a/zh_CN/guides/workflow/debug-and-preview/step-run.md +++ b/zh_CN/guides/workflow/debug-and-preview/step-run.md @@ -2,8 +2,8 @@ 工作流支持节点的单步调试,在单步调试中你可以重复测试当前节点的执行是否符合预期。 -
+
单步测试运行后可以查看运行状态、输入/输出、元数据信息。 -
+
diff --git a/zh_CN/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md b/zh_CN/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md index 92837b967..45b2c6762 100644 --- a/zh_CN/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md +++ b/zh_CN/guides/workflow/debug-and-preview/yu-lan-yu-yun-hang.md @@ -2,12 +2,12 @@ Dify Workflow 提供了一套完整的运行调试功能,在对话型应用中点击「预览」进入调试模式。 -
+
在工作流应用中点击「运行」进入调试模式。 -
+
进入调试模式内在界面右侧调试已配置好的工作流。 -
+
diff --git a/zh_CN/guides/workflow/extract-import-template.md b/zh_CN/guides/workflow/extract-import-template.md index 0a8cface8..8ec1765a4 100644 --- a/zh_CN/guides/workflow/extract-import-template.md +++ b/zh_CN/guides/workflow/extract-import-template.md @@ -4,12 +4,12 @@ 在工作室应用列表内导入 DSL 文件: -
+
在工作室应用列表内导出 DSL 文件: -
+
在工作流编排页导出 DSL 文件: -
+
diff --git a/zh_CN/guides/workflow/node/agent.md b/zh_CN/guides/workflow/node/agent.md index 64c910289..e6d228792 100644 --- a/zh_CN/guides/workflow/node/agent.md +++ b/zh_CN/guides/workflow/node/agent.md @@ -10,17 +10,17 @@ Agent 节点是 Dify Chatflow/Workflow 中用于实现自主工具调用的组 在 Dify Chatflow/Workflow 编辑器中,从组件栏拖拽 Agent 节点至画布。 -
+
### 选择 Agent 策略 在节点配置面板中,点击 **Agent 策略**。 -
+
从下拉菜单选择所需的 Agent 推理策略。Dify 内置了 **Function Calling 和 ReAct** 两种策略,可在 **Marketplace** → **Agent 策略**分类中安装使用。 -
+
#### 1. Function Calling @@ -32,7 +32,7 @@ Agent 节点是 Dify Chatflow/Workflow 中用于实现自主工具调用的组 * **易于集成外部功能:** 可以将各种外部 API 或工具封装成函数供模型调用。 * **结构化输出:** 模型输出的是结构化的函数调用信息,方便下游节点处理。 -
+
2. **ReAct (Reason + Act)** @@ -44,7 +44,7 @@ ReAct 策略使 Agent 交替进行思考和行动:LLM 首先思考当前状态 * **可解释性较好:** 思考和行动的过程是交织的,可以一定程度上追踪 Agent 的推理路径。 * **适用范围广:** 适用于需要外部知识或需要执行特定操作的场景,例如问答、信息检索、任务执行等。 -
+
开发者可以向[公开仓库](https://github.com/langgenius/dify-plugins)贡献 Agent 策略插件,经过审核后将在 Marketplace 上架,供其他用户安装使用。 @@ -62,10 +62,10 @@ ReAct 策略使 Agent 交替进行思考和行动:LLM 首先思考当前状态 5. **最大迭代次数:** 设定 Agent 的最大执行步数。 6. **输出变量:** 提示节点输出的数据结构。 -
+
## **查看日志** Agent 节点执行过程中将生成详细日志。显示节点执行的总体信息,包括输入和输出、token 开销、耗时和状态。点击 "详情" 查看 Agent 策略执行的每一轮输出信息。 -
+
diff --git a/zh_CN/guides/workflow/node/answer.md b/zh_CN/guides/workflow/node/answer.md index 657f88597..679d0e3b2 100644 --- a/zh_CN/guides/workflow/node/answer.md +++ b/zh_CN/guides/workflow/node/answer.md @@ -14,13 +14,13 @@ **示例1:** 输出纯文本 -
+
**示例2:** 输出图片+LLM回复 -
+
-
+
{% hint style="info" %} 直接回复节点可以不作为最终的输出节点,作为流程过程节点时,可以在中间步骤流式输出结果。 diff --git a/zh_CN/guides/workflow/node/code.md b/zh_CN/guides/workflow/node/code.md index 0d5fea4b5..ddb841409 100644 --- a/zh_CN/guides/workflow/node/code.md +++ b/zh_CN/guides/workflow/node/code.md @@ -13,7 +13,7 @@ 该节点极大地增强了开发人员的灵活性,使他们能够在工作流程中嵌入自定义的 Python 或 Javascript 脚本,并以预设节点无法达到的方式操作变量。通过配置选项,你可以指明所需的输入和输出变量,并撰写相应的执行代码: -
+
## 配置 @@ -117,4 +117,4 @@ def main() -> dict: 危险代码将会被 Cloudflare WAF 自动拦截,你可以通过 “网页调试工具” 中的 “网络” 查看是否被拦截。 -

Cloudflare WAF

+

Cloudflare WAF

diff --git a/zh_CN/guides/workflow/node/doc-extractor.md b/zh_CN/guides/workflow/node/doc-extractor.md index 22cf5d097..13d9ac50a 100644 --- a/zh_CN/guides/workflow/node/doc-extractor.md +++ b/zh_CN/guides/workflow/node/doc-extractor.md @@ -13,7 +13,7 @@ LLM 自身无法直接读取或解释文档的内容。因此需要将用户上 文档提取器节点可以理解为一个信息处理中心,通过识别并读取输入变量中的文件,提取信息后并转化为 string 类型输出变量,供下游节点调用。 -

文档提取器节点

+

文档提取器节点

文档提取器节点结构分为输入变量、输出变量。 @@ -41,7 +41,7 @@ LLM 自身无法直接读取或解释文档的内容。因此需要将用户上 本章节将通过一个典型的 ChatPDF 示例工作流模板,介绍文档提取器节点的使用方法。 -

ChatPDF 工作流

+

ChatPDF 工作流

**配置流程:** @@ -49,13 +49,13 @@ LLM 自身无法直接读取或解释文档的内容。因此需要将用户上 2. 添加文档提取节点,并在输入变量内选中 `pdf` 变量。 3. 添加 LLM 节点,在系统提示词内选中文档提取器节点的输出变量。LLM 可以通过该输出变量读取文件中的内容。 -

填写文档提取器的输出变量

+

填写文档提取器的输出变量

4\. 配置结束节点,在结束节点中选择 LLM 节点的输出变量。 配置完成后,应用将具备文件上传功能,使用者可以上传 PDF 文件并展开对话。 -
+
{% hint style="info" %} 如需了解如何在聊天对话中上传文件并与 LLM 互动,请参考 [附加功能](../additional-features.md)。 diff --git a/zh_CN/guides/workflow/node/end.md b/zh_CN/guides/workflow/node/end.md index d6bd5d1b4..f2d817bf7 100644 --- a/zh_CN/guides/workflow/node/end.md +++ b/zh_CN/guides/workflow/node/end.md @@ -18,12 +18,12 @@ Chatflow 内不支持结束节点 在以下[长故事生成工作流](iteration.md#shi-li-2-chang-wen-zhang-die-dai-sheng-cheng-qi-ling-yi-zhong-bian-pai-fang-shi)中,结束节点声明的变量 `Output` 为上游代码节点的输出,即该工作流会在 Code3 节点执行完成之后结束,并输出 Code3 的执行结果。 -

结束节点-长故事生成示例

+

结束节点-长故事生成示例

**单路执行示例:** -
+
**多路执行示例:** -
+
diff --git a/zh_CN/guides/workflow/node/http-request.md b/zh_CN/guides/workflow/node/http-request.md index f539145dd..566ede13c 100644 --- a/zh_CN/guides/workflow/node/http-request.md +++ b/zh_CN/guides/workflow/node/http-request.md @@ -15,7 +15,7 @@ 你可以通过配置 HTTP 请求的包括 URL、请求头、查询参数、请求体内容以及认证信息等。 -

HTTP 请求配置

+

HTTP 请求配置

*** @@ -25,7 +25,7 @@ 你可以在 HTTP 请求的不同部分动态插入变量。例如在处理客户评价请求时,可以将用户名或客户 ID、评价内容等变量嵌入到请求中,以定制化自动回复信息或获取特定客户信息并发送相关资源至特定的服务器。 -

客户评价分类

+

客户评价分类

HTTP 请求的返回值包括响应体、状态码、响应头和文件。值得注意的是,如果响应中包含了文件,这个节点能够自动保存文件,供流程后续步骤使用。这样不仅能提高处理效率,也可以更加简单直接地处理带有文件的响应。 @@ -37,7 +37,7 @@ HTTP 请求的返回值包括响应体、状态码、响应头和文件。值得 配置示例如下: -

通过 HTTP 节点发送文件

+

通过 HTTP 节点发送文件

### 高级功能 diff --git a/zh_CN/guides/workflow/node/ifelse.md b/zh_CN/guides/workflow/node/ifelse.md index e1a74fce3..995018151 100644 --- a/zh_CN/guides/workflow/node/ifelse.md +++ b/zh_CN/guides/workflow/node/ifelse.md @@ -31,7 +31,7 @@ ### 场景 -
+
以**文本总结工作流**作为示例说明各个条件: @@ -45,4 +45,4 @@ 涉及复杂的条件判断时,可以设置多重条件判断,在条件之间设置 **AND** 或者 **OR**,即在条件之间取**交集**或者**并集**。 -

多重条件判断

+

多重条件判断

diff --git a/zh_CN/guides/workflow/node/iteration.md b/zh_CN/guides/workflow/node/iteration.md index 2bb23473c..ec7fae678 100644 --- a/zh_CN/guides/workflow/node/iteration.md +++ b/zh_CN/guides/workflow/node/iteration.md @@ -20,13 +20,13 @@ **输出变量:** 仅支持输出数组变量 `Array[List]`。如果你想要输出其它变量格式,请阅读 [扩展阅读:如何将数组转换为文本](iteration.md#ru-he-jiang-shu-zu-zhuan-huan-wei-wen-ben)。 -

迭代节点原理图

+

迭代节点原理图

### 场景 #### **示例1:长文章迭代生成器** -

长故事生成器

+

长故事生成器

1. 在 **开始节点** 内添加输入故事标题、大纲变量,提示用户手动输入初始信息 2. 使用 **LLM 节点** 基于用户输入的故事标题和大纲,让 LLM 开始编写内容 @@ -38,15 +38,15 @@ 1. 在 **开始节点** 配置故事标题(title)和大纲(outline); -

开始节点配置

+

开始节点配置

2. 选择 **LLM 节点** 基于用户输入的故事标题和大纲,让 LLM 开始编写文本; -

模板节点

+

模板节点

3. 选择 **参数提取节点**,将故事文本转换成为数组(Array)结构。提取参数为 `sections` ,参数类型为 `Array[Object]` -

参数提取

+

参数提取

{% hint style="info" %} 参数提取效果受模型推理能力和指令影响,使用推理能力更强的模型,在**指令**内增加示例可以提高参数提取的效果。 @@ -54,11 +54,11 @@ 4. 将数组格式的故事大纲作为迭代节点的输入,在迭代节点内部使用 **LLM 节点** 进行处理 -

配置迭代节点

+

配置迭代节点

在 LLM 节点内配置输入变量 `GenerateOverallOutline/output` 和 `Iteration/item` -

配置 LLM 节点

+

配置 LLM 节点

{% hint style="info" %} 迭代的内置变量:`items[object]` 和 `index[number]` @@ -70,15 +70,15 @@ 5. 在迭代节点内部配置 **直接回复节点** ,可以实现在每轮迭代生成之后流式输出。 -

配置 Answer 节点

+

配置 Answer 节点

6. 完整调试和预览 -

按故事章节多轮迭代生成

+

按故事章节多轮迭代生成

#### **示例 2:长文章迭代生成器(另一种编排方式)** -
+
* 在 **开始节点** 内输入故事标题和大纲 * 使用 **LLM 节点** 生成文章小标题,以及小标题对应的内容 @@ -95,11 +95,11 @@ 迭代节点支持并行模式,开启后将有效提升迭代节点的整体运行效率。 -
+
下图是迭代节点开启或关闭并行模式的运行效果对比。 -

顺序与并行执行原理图

+

顺序与并行执行原理图

并行模式下的最高并行轮数为 10,这意味着单位时间内最多可以同时运行 10 个任务。如果需要处理超过 10 个任务,前 10 个元素将率先同时运行,前排任务处理完成后将继续处理剩余任务。 @@ -133,10 +133,10 @@ * [代码节点](code.md) -

code 节点输出 array

+

code 节点输出 array

* [参数提取](parameter-extractor.md) -

参数提取节点输出 array

+

参数提取节点输出 array

* [知识库检索](knowledge-retrieval.md) * [迭代](iteration.md) * [工具](tools.md) @@ -150,7 +150,7 @@ **使用代码节点转换** -

代码节点转换

+

代码节点转换

代码示例: @@ -164,7 +164,7 @@ def main(articleSections: list): **使用模板节点转换** -

模板节点转换

+

模板节点转换

代码示例: diff --git a/zh_CN/guides/workflow/node/knowledge-retrieval.md b/zh_CN/guides/workflow/node/knowledge-retrieval.md index 994aad96d..ccb684f78 100644 --- a/zh_CN/guides/workflow/node/knowledge-retrieval.md +++ b/zh_CN/guides/workflow/node/knowledge-retrieval.md @@ -14,7 +14,7 @@ 下图为一个最基础的知识库问答应用示例,该流程的执行逻辑为:知识库检索作为 LLM 节点的前置步骤,在用户问题传递至 LLM 节点之前,先在知识检索节点内将匹配用户问题最相关的文本内容并召回,随后在 LLM 节点内将用户问题与检索到的上下文一同作为输入,让 LLM 根据检索内容来回复问题。 -

知识库问答应用示例

+

知识库问答应用示例

*** @@ -27,11 +27,11 @@ 3. 指定[召回模式](../../../learn-more/extended-reading/retrieval-augment/retrieval.md)。自 9 月 1 日后,知识库的召回模式将自动切换为多路召回,不再建议使用 N 选 1 召回模式; 4. 连接并配置下游节点,一般为 LLM 节点; -

知识检索配置

+

知识检索配置

**输出变量** -

输出变量

+

输出变量

知识检索的输出变量 `result` 为从知识库中检索到的相关文本分段。其变量数据结构中包含了分段内容、标题、链接、图标、元数据信息。 @@ -45,6 +45,6 @@ 当用户提问时,若在知识检索中召回了相关文本,文本内容会作为上下文变量中的值填入提示词,提供 LLM 回复问题;若未在知识库检索中召回相关的文本,上下文变量值为空,LLM 则会直接回复用户问题。 -

配置下游 LLM 节点

+

配置下游 LLM 节点

该变量除了可以作为 LLM 回复问题时的提示词上下文作为外部知识参考引用,另外由于其数据结构中包含了分段引用信息,同时可以支持应用端的 [**引用与归属**](../../knowledge-base/retrieval-test-and-citation.md#id-2-yin-yong-yu-gui-shu) 功能。 diff --git a/zh_CN/guides/workflow/node/list-operator.md b/zh_CN/guides/workflow/node/list-operator.md index 23e22b0ce..9971e9d2c 100644 --- a/zh_CN/guides/workflow/node/list-operator.md +++ b/zh_CN/guides/workflow/node/list-operator.md @@ -10,11 +10,11 @@ 例如在一个应用中,允许用户同时上传文档文件和图片文件两种不同类型的文件。需要使用**列表操作节点**进行分拣,将不同的文件类型交由不同流程处理。 -

分流不同的文件类型

+

分流不同的文件类型

列表操作节点一般用于提取数组变量中的信息,通过设置条件将其转化为能够被下游节点所接受的变量类型。它的结构分为**输入变量**、**过滤条件**、**排序(可选)**、**取前 N 项(可选)**、**输出变量**。 -

列表操作节点

+

列表操作节点

#### 输入变量 @@ -80,6 +80,6 @@ 3. 提取文档文件变量,传递至 “文档提取器” 节点;提取图片文件变量,传递至 “LLM” 节点。 4. 在末尾添加 “直接回复” 节点,填写 LLM 节点的输出变量。 -
+
应用使用者同时上传文档文件和图片后,文档文件自动分流至文档提取器节点,图片文件自动分流至 LLM 节点以实现对于混合文件的共同处理。 diff --git a/zh_CN/guides/workflow/node/llm.md b/zh_CN/guides/workflow/node/llm.md index abfa05f3f..477488dee 100644 --- a/zh_CN/guides/workflow/node/llm.md +++ b/zh_CN/guides/workflow/node/llm.md @@ -4,7 +4,7 @@ 调用大语言模型的能力,处理用户在 “开始” 节点中输入的信息(自然语言、上传的文件或图片),给出有效的回应信息。 -

LLM 节点

+

LLM 节点

*** @@ -29,7 +29,7 @@ LLM 节点是 Chatflow/Workflow 的核心节点。该节点能够利用大语言 在应用编辑页中,点击鼠标右键或轻点上一节点末尾的 + 号,添加节点并选择 LLM。 -

LLM 节点配置-选择模型

+

LLM 节点配置-选择模型

**配置步骤:** @@ -43,15 +43,15 @@ LLM 节点是 Chatflow/Workflow 的核心节点。该节点能够利用大语言 3. **填写上下文(可选),** 上下文可以理解为向 LLM 提供的背景信息,常用于填写[知识检索](knowledge-retrieval.md)的输出变量。 4. **编写提示词**,LLM 节点提供了一个易用的提示词编排页面,选择聊天模型或补全模型,会显示不同的提示词编排结构。如果选择聊天模型(Chat model),你可以自定义系统提示词(SYSTEM)/用户(USER)/ 助手(ASSISTANT)三部分内容。 -

编写提示词

+

编写提示词

如果在编写系统提示词(SYSTEM)时没有好的思路,也可以使用提示生成器功能,借助 AI 能力快速生成适合实际业务场景的提示词。 -![提示生成器](../../../.gitbook/assets/zh-node-llm-prompt-generator.png) +![提示生成器](https://assets-docs.dify.ai/img/zh_CN/node/064191d22b91145d5e268c3a5c61f3f3.webp) 在提示词编辑器中,你可以通过输入 **“/”** 或者 **“{”** 呼出 **变量插入菜单**,将 **特殊变量块** 或者 **上游节点变量** 插入到提示词中作为上下文内容。 -

呼出变量插入菜单

+

呼出变量插入菜单

5. **高级设置**,可以开关记忆功能并设置记忆窗口、开关 Vision 功能或者使用 Jinja-2 模版语言来进行更复杂的提示词等。 @@ -67,7 +67,7 @@ LLM 节点是 Chatflow/Workflow 的核心节点。该节点能够利用大语言 具备视觉能力的 LLM 可以通过变量读取应用使用者所上传的图片。开启 VISION 后,选择图片文件的输出变量完成设置。 -

视觉上传功能

+

视觉上传功能

**文件变量** @@ -85,13 +85,13 @@ LLM 节点是 Chatflow/Workflow 的核心节点。该节点能够利用大语言 会话历史变量应用并不广泛,仅在 Chatflow 中选择文本补全类模型时可以插入使用。 {% endhint %} -

插入会话历史变量

+

插入会话历史变量

**模型参数** 模型的参数会影响模型的输出效果。不同模型的参数会有所区别。下图为`gpt-4`的参数列表。 -
+
主要的参数名词解释如下: @@ -102,7 +102,7 @@ LLM 节点是 Chatflow/Workflow 的核心节点。该节点能够利用大语言 如果你不理解这些参数是什么,可以选择**加载预设**,从创意、平衡、精确三种预设中选择。 -
+
*** @@ -137,7 +137,7 @@ LLM 节点是 Chatflow/Workflow 的核心节点。该节点能够利用大语言 2. 将知识检索节点的 **输出变量** `result` 填写至 LLM 节点中的 **上下文变量** 内; 3. 将 **上下文变量** 插入至应用提示词内,赋予 LLM 读取知识库内的文本能力。 -

上下文变量

+

上下文变量

[知识检索节点](knowledge-retrieval.md)输出的变量 `result` 还包含了分段引用信息,你可以通过 [**引用与归属**](../../knowledge-base/retrieval-test-and-citation.md#id-2-yin-yong-yu-gui-shu) 功能查看信息来源。 @@ -155,7 +155,7 @@ LLM 节点是 Chatflow/Workflow 的核心节点。该节点能够利用大语言 如需了解更多,请参考[文件上传](../file-upload.md)。 -

填写系统提示词

+

填写系统提示词

* **异常处理** diff --git a/zh_CN/guides/workflow/node/parameter-extractor.md b/zh_CN/guides/workflow/node/parameter-extractor.md index 684ded149..8b9211808 100644 --- a/zh_CN/guides/workflow/node/parameter-extractor.md +++ b/zh_CN/guides/workflow/node/parameter-extractor.md @@ -16,11 +16,11 @@ Dify 工作流内提供了丰富的[工具](https://docs.dify.ai/v/zh-hans/guide 在该示例中:Arxiv 论文检索工具的输入参数要求为 **论文作者** 或 **论文编号**,参数提取器从问题“这篇论文中讲了什么内容:2405.10739”中提取出论文编号 **2405.10739**,并作为工具参数进行精确查询。 -

Arxiv 论文检索工具

+

Arxiv 论文检索工具

2. **将文本转换为结构化数据**,如长故事迭代生成应用中,作为[迭代节点](iteration.md)的前置步骤,将文本格式的章节内容转换为数组格式,方便迭代节点进行多轮生成处理。 -
+
3. **提取结构化数据并使用** [**HTTP 请求**](http-request.md) ,可请求任意可访问的 URL ,适用于获取外部检索结果、webhook、生成图片等情景。 @@ -28,7 +28,7 @@ Dify 工作流内提供了丰富的[工具](https://docs.dify.ai/v/zh-hans/guide ### 3 如何配置 -
+
**配置步骤** diff --git a/zh_CN/guides/workflow/node/question-classifier.md b/zh_CN/guides/workflow/node/question-classifier.md index c94361a43..b111a04f7 100644 --- a/zh_CN/guides/workflow/node/question-classifier.md +++ b/zh_CN/guides/workflow/node/question-classifier.md @@ -14,7 +14,7 @@ 下图为产品客服场景的示例工作流模板: -
+
在该场景中我们设置了 3 个分类标签/描述: @@ -32,7 +32,7 @@ ### 如何配置 -
+
**配置步骤:** diff --git a/zh_CN/guides/workflow/node/start.md b/zh_CN/guides/workflow/node/start.md index 015c231c9..c1e3212e4 100644 --- a/zh_CN/guides/workflow/node/start.md +++ b/zh_CN/guides/workflow/node/start.md @@ -8,7 +8,7 @@ 在开始节点的设置页,你可以看到两部分设置,分别是 **“输入字段”** 和预设的[**系统变量**](../variables.md#xi-tong-bian-liang)。 -

Chatflow 和 Workflow

+

Chatflow 和 Workflow

### 输入字段 @@ -41,7 +41,7 @@ Dify 内置的文档提取器节点只能够处理部分格式的文档文件。 配置完成后,用户在使用应用前将按照输入项指引,向 LLM 提供必要信息。更多的信息将有助于 LLM 提升问答效率。 -
+
### 系统变量 diff --git a/zh_CN/guides/workflow/node/template.md b/zh_CN/guides/workflow/node/template.md index c2ee1bcfa..128b421fc 100644 --- a/zh_CN/guides/workflow/node/template.md +++ b/zh_CN/guides/workflow/node/template.md @@ -18,7 +18,7 @@ **示例1:** 将多个输入(文章标题、介绍、内容)拼接为完整文本 -

拼接文本

+

拼接文本

**示例2:** 将知识检索节点获取的信息及其相关的元数据,整理成一个结构化的 Markdown 格式 @@ -40,6 +40,6 @@ ``` {% endcode %} -

知识检索节点输出转换为 Markdown

+

知识检索节点输出转换为 Markdown

你可以参考 Jinja 的[官方文档](https://jinja.palletsprojects.com/en/3.1.x/templates/),创建更为复杂的模板来执行各种任务。 diff --git a/zh_CN/guides/workflow/node/tools.md b/zh_CN/guides/workflow/node/tools.md index 7b91bee27..1bb25ee0b 100644 --- a/zh_CN/guides/workflow/node/tools.md +++ b/zh_CN/guides/workflow/node/tools.md @@ -13,11 +13,11 @@ 1. 对工具授权/创建自定义工具/将工作流发布为工具 2. 配置工具输入和参数 -

工具选择

+

工具选择

工具节点可以连接其它节点,通过[变量](https://docs.dify.ai/v/zh-hans/guides/workflow/variables)处理和传递数据。 -

配置 Google 搜索工具检索外部知识

+

配置 Google 搜索工具检索外部知识

### 高级功能 diff --git a/zh_CN/guides/workflow/node/variable-aggregator.md b/zh_CN/guides/workflow/node/variable-aggregator.md index bf9168c7f..b1bb73574 100644 --- a/zh_CN/guides/workflow/node/variable-aggregator.md +++ b/zh_CN/guides/workflow/node/variable-aggregator.md @@ -16,15 +16,15 @@ 未添加变量聚合,分类1 和 分类 2 分支经不同的知识库检索后需要重复定义下游的 LLM 和直接回复节点。 -

问题分类(无变量聚合)

+

问题分类(无变量聚合)

添加变量聚合,可以将两个知识检索节点的输出聚合为一个变量。 -

问题分类后的多路聚合

+

问题分类后的多路聚合

**IF/ELSE 条件分支后的多路聚合** -

问题分类后的多路聚合

+

问题分类后的多路聚合

### 格式要求 diff --git a/zh_CN/guides/workflow/node/variable-assigner.md b/zh_CN/guides/workflow/node/variable-assigner.md index fc0567db4..7cdf8280e 100644 --- a/zh_CN/guides/workflow/node/variable-assigner.md +++ b/zh_CN/guides/workflow/node/variable-assigner.md @@ -22,7 +22,7 @@ 示例:开始对话后,LLM 会自动判断用户输入是否包含需要记住的事实、偏好或历史记录。如果有,LLM 会先提取并存储这些信息,然后再用这些信息作为上下文来回答。如果没有新的信息需要保存,LLM 会直接使用自身的相关记忆知识来回答问题。 -
+
**配置流程:** @@ -107,7 +107,7 @@ def main(arg1: list) -> str: 示例:用户在对话开始前,在 `language` 输入框内指定了 “中文”,该语言将会被写入会话变量,LLM 在后续进行答复时会参考会话变量中的信息,在后续对话中持续使用“中文”进行回复。 -
+
**配置流程:** @@ -123,7 +123,7 @@ def main(arg1: list) -> str: 示例:开始对话后,LLM 会要求用户在对话框内输入 Checklist 所涉及的事项,用户一旦提及了 Checklist 中的内容,将会更新并存储至会话变量内。LLM 会在每轮对话后提醒用户继续补充遗漏项。 -
+
**配置流程:** diff --git a/zh_CN/guides/workflow/orchestrate-node.md b/zh_CN/guides/workflow/orchestrate-node.md index 13d52ef23..ded88f9be 100644 --- a/zh_CN/guides/workflow/orchestrate-node.md +++ b/zh_CN/guides/workflow/orchestrate-node.md @@ -2,7 +2,7 @@ Chatflow 和 Workflow 类型应用内的节点均可以通过可视化拖拉拽的形式进行编排,支持**串行**和**并行**两种编排设计模式。 -

上图为串行节点流、下图为并行节点流

+

上图为串行节点流、下图为并行节点流

## 串行设计 @@ -14,13 +14,13 @@ Chatflow 和 Workflow 类型应用内的节点均可以通过可视化拖拉拽 点击两个节点中间连线的 + 号即可在中间添加一个串行节点;按照顺序将节点依次串线连接,最后将线收拢至 **“结束”节点**(Workflow)/ **“直接回复”节点**(Chatflow)完成设计。 -

串行结构

+

串行结构

### 查看串行结构应用日志 串行结构应用内的日志将按照顺序展示各个节点的运行情况。点击对话框右上角的 「查看日志-追踪」,查看工作流完整运行过程各节点的输入 / 输出、Token 消耗、运行时长等。 -

串行结构应用日志

+

串行结构应用日志

## 并行设计 @@ -28,7 +28,7 @@ Chatflow 和 Workflow 类型应用内的节点均可以通过可视化拖拉拽 例如,在某个并行设计的翻译工作流应用内,用户输入源文本触发工作流后,位于并行结构内的节点将共同收到前置节点的流转指令,同时开展多语言的翻译任务,缩短任务的处理耗时。 -

并行设计

+

并行设计

### 新建并行结构 @@ -38,25 +38,25 @@ Chatflow 和 Workflow 类型应用内的节点均可以通过可视化拖拉拽 将鼠标 Hover 至某个节点,显示 `+` 按钮,支持新建多个节点,创建后自动形成并行结构。 -

Type 01

+

Type 01

**方式 2** 拖拽节点末尾的 `+` 按钮,拉出连线形成并行结构。 -

Type 02

+

Type 02

**方式 3** 如果画布存在多个节点,通过可视化拖拽的方式组成并行结构。 -

Type 03

+

Type 03

**方式 4** 除了在画布中通过直接添加并行节点或可视化拖拽方式组成并行结构,你也可以在节点右侧清单的“下一步”中添加并行节点,自动生成并行结构。 -

Type 04

+

Type 04

**Tips:** @@ -66,7 +66,7 @@ Chatflow 和 Workflow 类型应用内的节点均可以通过可视化拖拉拽 * Chatflow 类型应用支持添加多个 **“直接回复”** 节点,该类型应用内的所有并行结构在末尾处均需要配置 **“直接回复”** 节点才能正常输出各个并行结构里的内容; * 所有的并行结构都会同时运行;并行结构内的节点处理完任务后即输出结果,**输出结果时不存在顺序关系**。并行结构越简单,输出结果的速度越快。 -

Chatflow 应用中的并行结构

+

Chatflow 应用中的并行结构

### 设计并行结构应用 @@ -78,7 +78,7 @@ Chatflow 和 Workflow 类型应用内的节点均可以通过可视化拖拉拽 > 并行分支的上限数为 10 个。 -

普通并行

+

普通并行

2. **嵌套并行** @@ -86,22 +86,22 @@ Chatflow 和 Workflow 类型应用内的节点均可以通过可视化拖拉拽 一个工作流内最多支持 3 层嵌套关系。 -

嵌套并行:2 层嵌套关系

+

嵌套并行:2 层嵌套关系

3. **条件分支 + 并行** 并行结构也可以和条件分支共同使用。 -

条件分支 + 并行

+

条件分支 + 并行

4. **迭代分支 + 并行** 迭代分支内同样支持编排并行结构,加速迭代内各节点的执行效率。 -

迭代分支+并行

+

迭代分支+并行

### 查看并行结构应用日志 包含并行结构的应用的运行日志支持以树状结构进行展示,你可以折叠并行节点组以更好地查看各个节点的运行日志。 -

并行结构

+

并行结构

diff --git a/zh_CN/guides/workflow/publish.md b/zh_CN/guides/workflow/publish.md index 01575a4c5..97e543a85 100644 --- a/zh_CN/guides/workflow/publish.md +++ b/zh_CN/guides/workflow/publish.md @@ -2,7 +2,7 @@ 调试完成之后点击右上角的「发布」可以将该工作流保存并快速发布成为不同类型的应用。 -
+
对话型应用支持发布为: diff --git a/zh_CN/guides/workflow/variables.md b/zh_CN/guides/workflow/variables.md index 983785a36..a705adac7 100644 --- a/zh_CN/guides/workflow/variables.md +++ b/zh_CN/guides/workflow/variables.md @@ -20,7 +20,7 @@ Workflow 类型应用提供以下系统变量: -

Workflow 类型应用系统变量

+

Workflow 类型应用系统变量

#### Chatflow @@ -28,13 +28,13 @@ Chatflow 类型应用提供以下系统变量:
变量名称数据类型说明备注
sys.queryString用户在对话框中初始输入的内容
sys.filesArray[File]用户在对话框内上传的图片图片上传功能需在应用编排页右上角的 “功能” 处开启
sys.dialogue_countNumber

用户在与 Chatflow 类型应用交互时的对话轮数。每轮对话后自动计数增加 1,可以和 if-else 节点搭配出丰富的分支逻辑。

例如到第 X 轮对话时,回顾历史对话并给出分析

sys.conversation_idString对话框交互会话的唯一标识符,将所有相关的消息分组到同一个对话中,确保 LLM 针对同一个主题和上下文持续对话
sys.user_idString分配给每个应用用户的唯一标识符,用以区分不同的对话用户
sys.app_idString 应用 ID,系统会向每个 Workflow 应用分配一个唯一的标识符,用以区分不同的应用,并通过此参数记录当前应用的基本信息面向具备开发能力的用户,通过此参数区分并定位不同的 Workflow 应用
sys.workflow_idStringWorkflow ID,用于记录当前 Workflow 应用内所包含的所有节点信息面向具备开发能力的用户,可以通过此参数追踪并记录 Workflow 内的包含节点信息
sys.workflow_run_idStringWorkflow 应用运行 ID,用于记录 Workflow 应用中的运行情况面向具备开发能力的用户,可以通过此参数追踪应用的历次运行情况
-

Chatflow 类型应用系统变量

+

Chatflow 类型应用系统变量

### 环境变量 **环境变量用于保护工作流内所涉及的敏感信息**,例如运行工作流时所涉及的 API 密钥、数据库密码等。它们被存储在工作流程中,而不是代码中,以便在不同环境中共享。 -

环境变量

+

环境变量

支持以下三种数据类型: @@ -56,7 +56,7 @@ Chatflow 类型应用提供以下系统变量: 例如你可以将用户在首轮对话时输入的语言偏好存储至会话变量中,LLM 在回答时将参考会话变量中的信息,并在后续的对话中使用指定的语言回复用户。 -

会话变量

+

会话变量

**会话变量**支持以下六种数据类型: diff --git a/zh_CN/guides/workspace/app/README.md b/zh_CN/guides/workspace/app/README.md index 5f10e4442..5904efabb 100644 --- a/zh_CN/guides/workspace/app/README.md +++ b/zh_CN/guides/workspace/app/README.md @@ -4,11 +4,11 @@ 在**发现**中,提供了一些常用的模版应用。这些应用涵盖了人力资源,助手,翻译,编程和写作。 -
+
如果要使用某个模版应用,点击模版的“添加到工作区”按钮。在左侧的工作区中,可以使用该应用。 -
+
如果要修改某个模版来创建一个新的应用,点击模版的“自定义”按钮。 @@ -16,6 +16,6 @@ 工作区是应用的导航。点击工作区里的应用,可以直接使用该应用。 -
+
工作区中的应用包括:自己的应用和其他团队添加到工作区中的应用。 diff --git a/zh_CN/learn-more/extended-reading/how-to-use-json-schema-in-dify.md b/zh_CN/learn-more/extended-reading/how-to-use-json-schema-in-dify.md index 731f37a56..4f28a454b 100644 --- a/zh_CN/learn-more/extended-reading/how-to-use-json-schema-in-dify.md +++ b/zh_CN/learn-more/extended-reading/how-to-use-json-schema-in-dify.md @@ -22,7 +22,7 @@ JSON Schema 是一种用于描述 JSON 数据结构的规范,开发者可以 将应用中的 LLM 切换至上述支持 JSON Schema 输出的模型,然后在设置表单开启 `JSON Schema` 并填写 JSON Schema 模板;同时开启 `response_format` 栏并切换至 `json_schema` 格式。 -![](../../.gitbook/assets/learn-more-json-schema.png) +![](https://assets-docs.dify.ai/img/zh_CN/extended-reading/73e1801819f7ef73cced141459bcac62.webp) LLM 生成的内容支持以下格式输出: @@ -216,7 +216,7 @@ You are a UI generator AI. Convert the user input into a UI. **效果示例:** -![](../../.gitbook/assets/best-practice-json-schema-ui-example.png) +![](https://assets-docs.dify.ai/img/zh_CN/extended-reading/724fa883c1c229e74898b2b3bb8e40b3.webp) ## 提示 diff --git a/zh_CN/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/README.md b/zh_CN/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/README.md index b952c451a..a618ed731 100644 --- a/zh_CN/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/README.md +++ b/zh_CN/learn-more/extended-reading/prompt-engineering/prompt-engineering-1/README.md @@ -6,10 +6,10 @@ 在你开始尝试新模式前,你需要知道**专家模式**下的必要元素: -* **文本补全模型** ![](../../../../.gitbook/assets/screenshot-20231017-092613.png) +* **文本补全模型** ![](https://assets-docs.dify.ai/img/zh_CN/prompt-engineering-1/22eb2f8f25741ced31c7f22504bf3f49.webp) 在选择模型的时候,模型名字的右侧显示 COMPLETE 的即为文本补全模型,该类模型接受名为“提示词”的自由格式文本字符串,模型将生成一个文本补全,试图匹配你给它的任何上下文或模式。例如,如果你给的提示词:“正如笛卡尔所说,我思故”,它将高概率返回“我在”作为补全。 -* **聊天模型** +* **聊天模型** 在选择模型的时候,模型名字的右侧显示 CHAT 的即为聊天模型,该类模型将消息列表作为输入,并返回模型生成的消息作为输出。尽管聊天格式旨在简化多轮对话,但它对于没有任何对话的单轮任务同样有用。聊天模型使用的是聊天消息作为输入和输出,包含 SYSTEM / USER / ASSISTANT 三种消息类型: @@ -23,13 +23,13 @@ 是指特定的单词、短语或字符,用于向 LLM 发出停止生成文本的信号。 * **专家模式提示词中的内容块** - * + * 用户在配置了知识库的 App 中,输入查询内容,App 会将查询内容作为知识库的检索条件,检索的结果在组织之后会作为上下文内容替换 `上下文` 变量,使 LLM 能够参考上下文的内容进行回答。 - * + * 查询内容仅在对话型应用的文本补全模型中可用,对话中用户输入的内容将替换该变量,以触发每轮新的对话。 - * + * 会话历史仅在对话型应用的文本补全模型中可用。在对话型应用中多次对话时,Dify 会将历史的对话记录根据内置规则进行组装拼接,并替换 `会话历史` 变量。其中 Human 和 Assistant 前缀可点击 `会话历史` 后的`...` 进行修改。 * **初始模版** @@ -48,7 +48,7 @@ 创建应用后,在提示词编排页可以切换至**专家模式**,在此模式下可以编辑完整的应用提示词。 -

专家模式入口

+

专家模式入口

{% hint style="warning" %} 在**专家模式**下修改提示词并发布应用后,将无法返回至**简易模式**。 @@ -62,7 +62,7 @@ 需要注意的是,我们只有先上传了上下文,在**专家模式**下才会呈现包含 \{{#context#\}} 的内置提示词 {% endhint %} -

上下文参数设置

+

上下文参数设置

**TopK:值范围为整数 1~10** @@ -106,7 +106,7 @@ Assistant1: 土是黄色的 在**专家模式**下,你可以在文本编辑器中输入“`/`”,快捷调出内容块来插入提示词中。内容块分为:`上下文`、`变量`、`会话历史`、`查询内容`。你也可以通过输入“`{`”,快捷插入已创建过的变量列表。\\ -

快捷键 “/”

+

快捷键 “/”

{% hint style="warning" %} 除“`变量`”以外的其他内容块不可重复插入。在不同应用和模型下,可插入的内容块会根据不同的提示词模板结构有所区别,`会话历史`、`查询内容` 仅在对话型应用的文本补全模型中可用。 @@ -149,7 +149,7 @@ And answer according to the language English. 在调试预览界面,用户与 AI 产生对话之后,将鼠标指针移动到任意的用户会话,即可在左上角看到“日志”标志按钮,点击即可查看提示词日志。 -

调试日志入口

+

调试日志入口

在日志中,我们可以清晰的查看到: @@ -157,7 +157,7 @@ And answer according to the language English. * 当前会话引用的相关文本片段 * 历史会话记录 -

调试预览界面查看提示词日志

+

调试预览界面查看提示词日志

从日志中,我们可以查看经过系统拼装后最终发送至 LLM 的完整提示词,并根据调试结果持续改进提示词输入。 @@ -165,4 +165,4 @@ And answer according to the language English. 在初始的构建应用主界面,左侧导航栏可以看到“日志与标注”,点击进去即可查看完整的日志。 在日志与标注的主界面,点击任意一个会话日志条目,在弹出的右侧对话框中同样鼠标指针移动到会话上即可点开“日志”按钮查看提示词日志。 -

日志与标注界面查看提示词日志

+

日志与标注界面查看提示词日志

diff --git a/zh_CN/learn-more/extended-reading/retrieval-augment/README.md b/zh_CN/learn-more/extended-reading/retrieval-augment/README.md index 8b086d7f0..861affdb9 100644 --- a/zh_CN/learn-more/extended-reading/retrieval-augment/README.md +++ b/zh_CN/learn-more/extended-reading/retrieval-augment/README.md @@ -8,7 +8,7 @@ 在下图中,当用户提问时 “美国总统是谁?” 时,系统并不是将问题直接交给大模型来回答,而是先将用户问题在知识库中(如下图中的维基百科)进行向量搜索,通过语义相似度匹配的方式查询到相关的内容(拜登是美国现任第46届总统…),然后再将用户问题和搜索到的相关知识提供给大模型,使得大模型获得足够完备的知识来回答问题,以此获得更可靠的问答结果。 -

RAG 基本架构

+

RAG 基本架构

**为什么需要这样做呢?** diff --git a/zh_CN/learn-more/extended-reading/retrieval-augment/hybrid-search.md b/zh_CN/learn-more/extended-reading/retrieval-augment/hybrid-search.md index 3dadd6ce9..dbaf6045d 100644 --- a/zh_CN/learn-more/extended-reading/retrieval-augment/hybrid-search.md +++ b/zh_CN/learn-more/extended-reading/retrieval-augment/hybrid-search.md @@ -29,7 +29,7 @@ RAG 检索环节中的主流方法是向量检索,即语义相关度匹配的 在混合检索中,你需要在数据库中提前建立向量索引和关键词索引,在用户问题输入时,分别通过两种检索器在文档中检索出最相关的文本。 -

混合检索

+

混合检索

“混合检索”实际上并没有明确的定义,本文以向量检索和关键词检索的组合为示例。如果我们使用其他搜索算法的组合,也可以被称为“混合检索”。比如,我们可以将用于检索实体关系的知识图谱技术与向量检索技术结合。 @@ -39,7 +39,7 @@ RAG 检索环节中的主流方法是向量检索,即语义相关度匹配的 定义:通过生成查询嵌入并查询与其向量表示最相似的文本分段。 -

向量检索设置

+

向量检索设置

**TopK:** 用于筛选与用户问题相似度最高的文本片段。系统同时会根据选用模型上下文窗口大小动态调整片段数量。系统默认值为 3 。 @@ -51,7 +51,7 @@ RAG 检索环节中的主流方法是向量检索,即语义相关度匹配的 定义:索引文档中的所有词汇,从而允许用户查询任意词汇,并返回包含这些词汇的文本片段。 -

全文检索设置

+

全文检索设置

**TopK:** 用于筛选与用户问题相似度最高的文本片段。系统同时会根据选用模型上下文窗口大小动态调整片段数量。系统默认值为 3 。 @@ -61,7 +61,7 @@ RAG 检索环节中的主流方法是向量检索,即语义相关度匹配的 同时执行全文检索和向量检索,并应用重排序步骤,从两类查询结果中选择匹配用户问题的最佳结果,需配置 Rerank 模型 API。 -

混合检索设置

+

混合检索设置

**TopK:** 用于筛选与用户问题相似度最高的文本片段。系统同时会根据选用模型上下文窗口大小动态调整片段数量。系统默认值为 3 。 @@ -71,16 +71,16 @@ RAG 检索环节中的主流方法是向量检索,即语义相关度匹配的 进入“知识库->创建知识库”页面并在检索设置中设置不同的检索模式: -

创建知识库时设置检索模式

+

创建知识库时设置检索模式

### 知识库设置中修改检索模式 进入“知识库->选择知识库->设置”页面中可以对已创建的知识库修改不同的检索模式。 -

知识库设置中修改检索模式

+

知识库设置中修改检索模式

### 提示词编排中修改检索模式 进入“提示词编排->上下文->选择知识库->设置”页面中可以在创建应用时修改不同的检索模式。 -

提示词编排中修改检索模式

+

提示词编排中修改检索模式

diff --git a/zh_CN/learn-more/extended-reading/retrieval-augment/rerank.md b/zh_CN/learn-more/extended-reading/retrieval-augment/rerank.md index 80242e593..ddfa8dbfe 100644 --- a/zh_CN/learn-more/extended-reading/retrieval-augment/rerank.md +++ b/zh_CN/learn-more/extended-reading/retrieval-augment/rerank.md @@ -6,7 +6,7 @@ **重排序模型会计算候选文档列表与用户问题的语义匹配度,根据语义匹配度重新进行排序,从而改进语义排序的结果**。其原理是计算用户问题与给定的每个候选文档之间的相关性分数,并返回按相关性从高到低排序的文档列表。常见的 Rerank 模型如:Cohere rerank、bge-reranker 等。 -

混合检索+重排序

+

混合检索+重排序

在大多数情况下,在重排序之前会有一次前置检索,这是由于计算查询与数百万个文档之间的相关性得分将会非常低效。所以,**重排序一般都放在搜索流程的最后阶段,非常适合用于合并和排序来自不同检索系统的结果**。 @@ -24,7 +24,7 @@ Dify 目前已支持 Cohere Rerank 模型,进入“模型供应商-> Cohere”页面填入 Rerank 模型的 API 秘钥: -

在模型供应商内配置 Cohere Rerank 模型

+

在模型供应商内配置 Cohere Rerank 模型

### @@ -38,7 +38,7 @@ Dify 目前已支持 Cohere Rerank 模型,进入“模型供应商-> Cohere” 进入“知识库->创建知识库->检索设置”页面并在添加 Rerank 设置。除了在创建知识库可以设置 Rerank ,你也可以在已创建的知识库设置内更改 Rerank 配置,在应用编排的知识库召回模式设置中更改 Rerank 配置。 -

知识库检索模式中设置 Rerank 模型

+

知识库检索模式中设置 Rerank 模型

**TopK:** 用于设置 Rerank 后返回相关文档的数量。 @@ -50,4 +50,4 @@ Dify 目前已支持 Cohere Rerank 模型,进入“模型供应商-> Cohere” 查看更多关于多路召回模式的说明,[《多路召回》](https://docs.dify.ai/v/zh-hans/guides/knowledge-base/integrate-knowledge-within-application#duo-lu-zhao-hui-tui-jian)。 -

知识库多路召回模式中设置 Rerank 模型

+

知识库多路召回模式中设置 Rerank 模型

diff --git a/zh_CN/learn-more/extended-reading/retrieval-augment/retrieval.md b/zh_CN/learn-more/extended-reading/retrieval-augment/retrieval.md index e4261ef4d..06c5df825 100644 --- a/zh_CN/learn-more/extended-reading/retrieval-augment/retrieval.md +++ b/zh_CN/learn-more/extended-reading/retrieval-augment/retrieval.md @@ -2,7 +2,7 @@ 当用户构建知识库问答类的 AI 应用时,如果在应用内关联了多个知识库,此时需要应用 Dify 的召回策略决定从哪些知识库中检索内容。 -

召回模式设置

+

召回模式设置

### 召回设置 @@ -12,6 +12,6 @@ 以下是多路召回模式的技术流程图: -

多路召回

+

多路召回

由于多路召回模式不依赖于模型的推理能力或知识库描述,该模式在多知识库检索时能够获得质量更高的召回效果,除此之外加入 Rerank 步骤也能有效改进文档召回效果。因此,当创建的知识库问答应用关联了多个知识库时,我们更推荐将召回模式配置为多路召回。 diff --git a/zh_CN/learn-more/faq/llms-use-faq.md b/zh_CN/learn-more/faq/llms-use-faq.md index 6a3c9ab78..750cc0caa 100644 --- a/zh_CN/learn-more/faq/llms-use-faq.md +++ b/zh_CN/learn-more/faq/llms-use-faq.md @@ -115,7 +115,7 @@ Query or prefix prompt is too long, you can reduce the preix prompt, or shrink t 如下方表格示例,仅需保留第二行的表头,首行(表格1)为多余表头,需删掉。 -
+
### 19. 买了 ChatGPT plus,为什么在 dify 里还不能使用 GPT4? diff --git a/zh_CN/learn-more/use-cases/build-an-notion-ai-assistant.md b/zh_CN/learn-more/use-cases/build-an-notion-ai-assistant.md index 4cb2d2185..c99a1c5c1 100644 --- a/zh_CN/learn-more/use-cases/build-an-notion-ai-assistant.md +++ b/zh_CN/learn-more/use-cases/build-an-notion-ai-assistant.md @@ -88,15 +88,15 @@ Notion 是一个强大的知识管理工具。它的灵活性和可扩展性使 > 我希望你能在我的 Notion 工作区中扮演一个 IT 专家的角色,利用你对计算机科学、网络基础设施、Notion 笔记和 IT 安全的知识来解决问题。 -
+
建议初始时启用 AI 主动提供用户一个起始句子,给出可以询问的线索。此外,激活「语音转文字」功能可以让用户通过语音与你的 AI 助手进行互动。 -
+
现在你可以在“概览”中单击公共 URL 聊天与你自己的 AI 助手! -
+
### 通过API集成到你的项目中​ diff --git a/zh_CN/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code.md b/zh_CN/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code.md index c42a85e01..6ea390d1a 100644 --- a/zh_CN/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code.md +++ b/zh_CN/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code.md @@ -10,48 +10,48 @@ Dify 可以选择两种应用一种是对话型应用类似于 ChatGPT 那种, 你可以在这里访问 Dify:https://dify.ai/ -
+
我们输入名称创建完成之后看到的页面就是我们的看板页面里面有一些数据监控和应用设置。我们先点击左侧的提示词编排,这里就是主要的工作页面了。 -
+
这个页面左侧是提示词设置和一些其他功能,右侧可以实时预览和使用你创建的内容。前缀提示词就是用户每次输入内容后触发的提示词了,可以理解为每次 GPT 都会按照你的前缀提示词内容去处理用户输入的信息。 -
+
可以看一下我的前缀提示词结构,主要有两部分前面是中文写的让 GPT 按照下面英文的结构输出照片的描述。英文的结构就是生成提示词的模板了,主要意思是【主题彩色照片,错综复杂的图案,鲜明的对比,环境描述,相机型号,与输入内容相关的镜头焦距描述,与输入内容相关的构图描述,四位摄影师的名字】这个就是提示词的主要内容了。理论上你现在保存到右边预览区域输入你想生成的主题就能生成对应提示词了。 -
+
那可能有人注意到了后面的 \{{proportion\}} 和 \{{version\}} 是什么呢,可以看到我右边需要用户选择图像比例和模型版本这两个变量就是用来传递用户选择的信息的。我们看一下如何设置。 -
+
我们的功能是把用户选择的信息填到提示词的最后方便用户直接复制不用重新填写和记忆这些命令,这里就要用到下面的变量功能。 变量的作用就是把用户表单填写或者选择的内容动态的带入到提示词里面。比如我这里创建了两个变量一个代表图像比例一个代表模型版本。点击添加按钮创建变量。 -
+
创建之后首先需要填写前面的变量 Key 和字段名称,变量 Key 需要英文。后面的可选开启之后这个字段就会是选填的。之后我们需要点击操作栏的设置来设置变量内容。 -
+
变量包括两种内容一种是文本变量一种是下拉选项,文本的就是用户需要手动输入,下拉的话就是选择了。这里我们主要是不想用户手打命令,所以我们选择下拉选项。增加需要的选项就行。 -
+
之后就是使用变量了,我们需要把变量 Key 用两个 {} 包起来填写到前缀提示词里。这里由于我们不想让 GPT 改用户选择的内容,我加了一句提示词“如实输出变量内容”。 -
+
加了上面那句话 GPT 还是有一定几率改掉我们的变量内容怎么办,我们可以在右侧模型选择这里把多样性调低,这样创造性输出就会降低,他就不容易改写我们的变量内容了。其他的几个参数的意思可看小叹号了解。 -
+
好了到这里我们的应用就创建完成了,测试输出没问题以后点击右上角的发布按钮,你的应用就发布了。你你和用户可以通过公开访问 URL 的地址访问你的应用。可以在设置里设置应用名称以及简介、图标之类的内容。 -
+
这就是利用 Dify 创建一个简单 AI 应用的流程,你还可以通过生成的 API 把你的应用部署在其他平台或者更改它的 UI。同时 Dify 还支持上传你自己的数据,比如你可以建一个客服机器人帮助你回答自己产品的相关问题。教程到这里就结束了,感谢 @goocarlos 创建了这么好的产品。 diff --git a/zh_CN/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md b/zh_CN/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md index b8bf1e586..fead8d1cd 100644 --- a/zh_CN/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md +++ b/zh_CN/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes.md @@ -6,7 +6,7 @@ Dify 是一个开源且非常简单易用的 LLMOps 平台,让你能够可视化快速创建并运营 AI 应用的工具平台。Dify 提供了可视化的 Prompt 编排、运营、知识库管理等功能。你甚至无需具备 AI 相关的技术研究和晦涩概念的理解。Dify 对接了各个出色的大型语言模型供应商,如 OpenAI、Azure OpenAI、Antropic 等,已提供 GPT 系列、Claude 系列模型,未来也将接入优秀的开源模型。这一切都是可以在设置中切换使用。这意味着,你在创建调试应用时,可以对比不同模型的效果,以确定使用最适合你的模型。**基于 Dify,你不仅可以很轻易地开发一个 AI 智能客服,还可以创造符合你使用习惯和需求的文本写作助手、虚拟招聘 HR 专家、会议总结助手、翻译助手等各种文本生成型应用,为你的工作提效。** -
+
**前提条件** @@ -22,7 +22,7 @@ Dify 是一个开源产品,你可以在 GitHub (https://github.com/langgenius/ 如果你希望能基于公司现有的知识库和产品文档构建人工智能客服,来与用户交流,那么你需要尽可能将你产品有关的文档上传到 Dify 的知识库中。Dify 帮助你完成数据的**分段处理和清洗**。Dify知识库支持高质量和经济两种索引模式,我们推荐使用高质量模式,会消耗 token 但能提供更高的准确性。操作步骤:在 【知识库】页面,新建一个知识库,上传你的业务数据(支持批量上传多个文本),选择清洗方式,【保存并处理】,只需几秒钟即可完成处理。 -
+
**创建一个 AI 应用,给 AI 指令** @@ -40,28 +40,28 @@ Dify 是一个开源产品,你可以在 GitHub (https://github.com/langgenius/ > 开场白:你好,我是 Bob☀️, Dify的第一位AI成员。你可以与我讨论任何与Dify产品、团队甚至LLMOps相关的问题。 -
+
**调试 AI 智能客服的表现并发布** 完成以上的设置后,你可以在当前的页面右侧给它发送信息调试它的表现是否符合预期。然后点击【发布】。这时候你就已经拥有了一个 AI 智能客服。 -
+
**将 AI 客服应用嵌入到你的前端页面** 这一步,是将准备好的 AI 智能客服嵌入到你的官网页面。依次点击【概览】->【嵌入】,选择 \*\*script 标签方式,\*\*将 script 代码复制到你网站 `` 或 `` 标签中。如你是非技术人员,可让负责官网的开发帮忙粘贴并更新页面。 -
+
1. 将复制的代码粘贴到你官网的目标位置: -
+
1. 更新你的官网,即可以得到一个拥有你业务数据的官网 AI智能客服。试一试效果: -
+
以上通过 Dify 官网 AI 客服 Bob 的例子演示了如何将 Dify 应用嵌入到官网的具体操作步骤。当然,你还可以通过 Dify 提供的更多特性来增加 AI 客服的表现,例如增加一些变量设置,让用户在互动前填入必要的判断信息,如名字、使用的具体产品等等。 欢迎你一起来探索,定制企业的 AI 智能客服。 -
+
diff --git a/zh_CN/learn-more/use-cases/dify-on-dingtalk.md b/zh_CN/learn-more/use-cases/dify-on-dingtalk.md index e741aa81e..5ab8e186b 100644 --- a/zh_CN/learn-more/use-cases/dify-on-dingtalk.md +++ b/zh_CN/learn-more/use-cases/dify-on-dingtalk.md @@ -8,7 +8,7 @@ IM 是天然的智能聊天机器人应用场景,校企用户有不少是使 先上效果图,也许你就有兴趣继续读下去了。 -
+
## 1. 准备工作 @@ -27,20 +27,20 @@ IM 是天然的智能聊天机器人应用场景,校企用户有不少是使 下图是一个简易方法让你快速识别自己应用的类型,**后续配置时需要明确写明接入应用的类型**。 -
+
另外需要说明的是,虽然所有类型的应用都可以接入,但是根据类型不同也有些限制和区别: * AGENT 也属于 CHATBOT,聊天助手应用在接入钉钉机器人后是可以保持聊天上下文的(即支持多轮对话),只有本身在 Dify 中支持会话的才可以 * COMPLETION(文本生成)、WORKFLOW(纯工作流)应用在创建的时候有限制,接收的用户输入 **只能有一个且变量名为 `query`**,因为钉钉对话场景下用户输入是单条消息,所以这里只能设置一个变量。 -
+
-
+
这里我们假设你已经创建好等待接入的 Dify 应用了,这时就需要查看你这个应用的 `访问 API` 页面,创建该应用的 API 密钥④,并且记录 API 服务器访问地址⑤。 -
+
所以,在此步骤中你创建了待接入的 Dify 应用,同时记录该应用的几个重要参数:**应用的类型**、**该应用 API 秘钥**、**API 服务器访问地址**。 @@ -48,23 +48,23 @@ IM 是天然的智能聊天机器人应用场景,校企用户有不少是使 登录进入 [钉钉开发平台](https://open-dev.dingtalk.com/),选择合适的组织,进入企业内部应用开发页面,创建一个企业内部应用。 -
+
在弹出窗口里填好 **应用名称**、**应用描述**,上传应用图标点击保存。然后自动进入应用开发配置界面,通过 `添加应用能力` 添加机器人能力。 -
+
打开机器人配置开关,在下方出现的表单中按你的实际情况填入各必要信息,**在消息接收模式上选择 Stream 模式**。 -
+
点击发布后,再去到左边栏的应用发布 -> 版本管理与发布 -> 创建新版本,给应用建立一个新版本进行发布。 -
+
最后回到 `凭证与基础信息`,记录下该应用的 `Client ID` 和 `Client Secret`,此时左上角应用的状态应该是 **已发布**,到此完成钉钉机器人的配置。 -
+
### 2.3. 钉钉 AI 卡片配置 @@ -72,15 +72,15 @@ IM 是天然的智能聊天机器人应用场景,校企用户有不少是使 进入钉钉开发者后台,顶部菜单 -> 开放能力 ->[卡片平台](https://open-dev.dingtalk.com/fe/card) -> 新建模版,来新建一个 AI 卡片模板,填入你喜欢的模版名称,卡片类型选择 **消息卡片**,卡片模板场景选择 **AI 卡片**,并 **关联刚才创建的应用**。 -
+
点击 **创建** 后进入卡片编辑页面,这里基本不需要任何改动,如果希望机器人在出错时把具体错误信息也输出出来,可以把 `启用失败状态` 打开。 -
+
最后点击保存,发布,显示 “模版发布成功”,然后返回到刚才的模版列表页面,复制 \*\* 模版 ID\*\*,保存下来一会儿会用到。 -
+
## 3. 部署 Dify-on-Dingtalk @@ -165,7 +165,7 @@ docker compose up -d 从群设置中找到创建的钉钉机器人,添加进群,即可开始在群众 @机器人进行对话,该示例图片中是使用了 Dify 应用的标注功能实现关键字 help 的固定输出。 -
+
### 4.2. 与机器人进行私聊 @@ -176,7 +176,7 @@ docker compose up -d 私聊界面中直接对话即可,不需要再 `@` 了。 -
+
## 5. 后记 diff --git a/zh_CN/learn-more/use-cases/dify-on-teams.md b/zh_CN/learn-more/use-cases/dify-on-teams.md index 04f76220d..5350510d7 100644 --- a/zh_CN/learn-more/use-cases/dify-on-teams.md +++ b/zh_CN/learn-more/use-cases/dify-on-teams.md @@ -19,7 +19,7 @@ 首先,登录 [Dify 平台](https://cloud.dify.ai/signin),使用 Github 登录或者使用 Google 登录。此外,你也可以参考 Dify 官方教程 [Docker Compose 部署](https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/docker-compose) 私有部署。 -
+
登录成功后,进入 Dify 页面,我们按照下方步骤创建一个基础编排聊天助手应用 @@ -30,7 +30,7 @@ 5. 选择应用图标并为应用填写一个名称,比如基础编排聊天助手 6. 点击创建 -
+
创建成功后会跳转到上图所示页面,此时继续配置应用 @@ -38,7 +38,7 @@ 2. 设置模型参数 3. 填写应用提示词 -
+
配置完成后,可以在右侧对话框进行测试。测试完成后,进行如下操作: @@ -48,7 +48,7 @@ 接着生成基础编排聊天助手 API 密钥 -
+
点击 "访问 API" 后,会跳转到上图的 API 管理页面,按照如下步骤获取 API 密钥: @@ -64,23 +64,23 @@ 转到 [Azure Marketplace](https://portal.azure.com/#view/Microsoft\_Azure\_Marketplace/GalleryItemDetailsBladeNopdl/id/Microsoft.AzureBot/selectionMode\~/false/resourceGroupId//resourceGroupLocation//dontDiscardJourney\~/false/selectedMenuId/home/launchingContext\~/%7B%22galleryItemId%22%3A%22Microsoft.AzureBot%22%2C%22source%22%3A%5B%22GalleryFeaturedMenuItemPart%22%2C%22VirtualizedTileDetails%22%5D%2C%22menuItemId%22%3A%22home%22%2C%22subMenuItemId%22%3A%22Search%20results%22%2C%22telemetryId%22%3A%22a09b3b54-129b-475f-bd39-d7285a272043%22%7D/searchTelemetryId/258b225f-e7d5-4744-bfe4-69fa701d9d5a) 画面应该会直接到 Azure Bot Service 的创建画面。 -
+
确认所有设置然后创建。 -
+
创建好后转到 Azure Bot 页面,先把 Subscription ID 保存好。 -
+
然后选择 Configuration,保存好 Microsoft App ID 然后选择 Manage Password。 -
+
创建和保存新 client secret。 -
+
## 5. 创建你的聊天机器人 @@ -148,7 +148,7 @@ npx localtunnel --port 3978 上述命令在你的本地服务器(运行在 3978 端口)和 localtunnel 创建的公共域之间建立了一个连接。一旦你有了 localtunnel 转发 URL,任何来自客户端对该 URL 的请求都会自动被定向到你的 FastAPI 后端。 -
+
## 6. 配置你的 Azure Bot @@ -158,23 +158,23 @@ npx localtunnel --port 3978 将 `Message Endpoint` 替换为在第五步中获取的 localtunnel 转发 URL。 -
+
#### 6.2 配置 Channels 在左侧面板上选择 Channels,点击 Microsoft Teams。 -
+
## 7. Teams 测试 回到在 6.2 步中创建的 Channels 页面,点击 “Open in Teams” -
+
发送 Teams 消息,并等待你的 AI 聊天机器人的回复。尝试向 AI 聊天机器人提问你可以向 Dify 聊天助手提问的任何问题。 -
+
## 8. 后记 diff --git a/zh_CN/learn-more/use-cases/dify-on-wechat.md b/zh_CN/learn-more/use-cases/dify-on-wechat.md index aa60639c3..38e031ea1 100644 --- a/zh_CN/learn-more/use-cases/dify-on-wechat.md +++ b/zh_CN/learn-more/use-cases/dify-on-wechat.md @@ -26,11 +26,11 @@ Dify是一个优秀的LLMOps(大型语言模型运维)平台,Dify的详细 首先,登录[Dify官方应用平台](https://cloud.dify.ai/signin),你可以选择使用Github登录或者使用Google登录。此外,你也可以参考Dify官方教程[Docker Compose 部署 | 中文 | Dify](https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/docker-compose) 私有部署,Dify是开源项目,支持私有部署。 -
+
**(3)创建Dify基础编排聊天助手应用** -
+
登录成功后,进入Dify页面,我们按照下方步骤创建一个基础编排聊天助手应用 @@ -41,7 +41,7 @@ Dify是一个优秀的LLMOps(大型语言模型运维)平台,Dify的详细 5. 选择应用图标并为应用填写一个名称,比如基础编排聊天助手 6. 点击创建 -
+
创建成功后我们会跳转到上图所示页面,我们继续配置应用 @@ -49,7 +49,7 @@ Dify是一个优秀的LLMOps(大型语言模型运维)平台,Dify的详细 2. 设置模型参数 3. 填写应用提示词 -
+
在配置完成后,我们可以在右侧对话框进行测试,在测试完成后,进行如下操作 @@ -59,7 +59,7 @@ Dify是一个优秀的LLMOps(大型语言模型运维)平台,Dify的详细 **(4)生成基础编排聊天助手API密钥** -
+
在点击"访问API"后,我们会跳转到上图的API管理页面,在这个页面我们按照如下步骤获取API密钥: @@ -135,13 +135,13 @@ python3 app.py # windows环境下该命令通常为 python app.py **(2)扫码登录** -
+
本项目使用itchat实现个人微信登录,有封号风险,建议使用**实名认证**过的**微信小号**进行测试,在执行上述命令后,我们可以在控制台看到打印如上图所示二维码,使用微信扫码登录,登录后当看到"itchat:Start auto replying."字符,表示登录成功,我们可以进行测试。 **(3)对话测试** -
+
我们看到,微信机器人的回复与在Dify测试页面上的回复一致。至此,恭喜你成功把Dify接入了个人微信🎉🎉🎉 @@ -197,23 +197,23 @@ docker logs -f dify-on-wechat # 查看二维码并登录 **(1)下载知识库文件** -
+
我们到[dify文档仓库](../../guides/workflow/)下载Dify工作流介绍的文档。 **(2)Dify中导入知识库** -
+
进入知识库页面,创建知识库 -
+
选择导入已有文本,上传刚才下载的introduce.md文件,点击下一步 -
+
-
+
选择如下配置 @@ -223,33 +223,33 @@ docker logs -f dify-on-wechat # 查看二维码并登录 最后点击保存并处理 -
+
我们看到知识库正在进行嵌入处理,稍等片刻,即可嵌入成功。 #### 2.3.2. 创建工作流编排聊天助手 -
+
我们进入Dify工作室,点击从应用模板创建 -
+
我们使用知识库+聊天机器人类型的模板,设置应用图标与名称,点击创建 -
+
跳转到工作流编排页面后,先点击知识检索节点,点击最右侧"+"添加知识库。我们选择之前上传好的introduce.md知识库,该知识库是对Dify工作流的基本介绍。最后我们点击添加,知识库节点设置完成。 -
+
接下来选择LLM节点,点击设置上下文,我们选择result变量,该变量存有知识检索的结果。 -
+
设置完LLM节点后,我们点击预览进行测试,输入问题:请介绍一下dify工作流。可以看到最终输出了Dify工作流的正确介绍。测试正常后,我们返回编辑模式。 -
+
返回编辑模式后,依次点击发布、更新、访问API @@ -277,7 +277,7 @@ docker logs -f dify-on-wechat # 查看二维码并登录 我们按照**2.2.1小节**启动程序并扫码登录,然后给微信机器人发送消息,进行测试 -
+
微信机器人的回复与在Dify测试页面上的回复一致。恭喜你更进一步,把工作流编排应用接入了个人微信,你可以向知识库中导入更多的Dify官方文档,让微信机器人为你解答更多的Dify相关问题。 @@ -285,23 +285,23 @@ docker logs -f dify-on-wechat # 查看二维码并登录 #### 2.4.1. 创建Agent应用 -
+
进入工作室页面,点击创建空白应用,选择Agent,设置图标和应用名称,最后点击创建 -
+
创建成功后,我们会进入Agent应用配置页面,在这个页面我们选择好对话模型,然后添加工具。我们首先添加DALL-E绘画工具,首次使用该工具需要授权,一般我们设置好OpenAI API key和OpenAI base URL即可使用该DALL-E绘画工具。 -
+
授权成功后,我们添加DALL-E 3绘画工具 -
+
接着,继续添加DuckDuckGo搜索引擎和数学工具,进行后续的工具测试 -
+
我们输入问题"搜索开源项目Dify的star数量,这个数量乘以3.14是多少",确认应用能够正常调用工具,我们依次点击发布、更新、访问API @@ -330,7 +330,7 @@ docker logs -f dify-on-wechat # 查看二维码并登录 继续参照**2.2.1小节**启动程序并扫码登录,然后给微信机器人发送消息,进行测试 -
+
可以看到微信机器人可以正常使用搜索和绘画工具。再一次恭喜你,把Dify Agent应用接入微信。也恭喜我,写到这里可以先睡觉了。 @@ -338,17 +338,17 @@ docker logs -f dify-on-wechat # 查看二维码并登录 #### 2.5.1. 创建工作流应用 -
+
首先你需要提前下载好我预先创建的DSL文件,[点击此处下载](https://github.com/hanfangyuan4396/dify-on-wechat/blob/master/dsl/chat-workflow.yml)。下载完成后,进入工作室页面,点击导入DSL文件,上传提前下载好的文件,最后点击创建。 -
+
创建完成后,按照上图步骤进行测试。点击运行,输入你好,确保该工作流能正常输出结果。 你可以在此工作流的基础上进行修改,但是对于**工作流类型**的应用,它的输入变量名称十分灵活,,为了更方便地接入微信机器人,[Dify on WeChat](https://github.com/hanfangyuan4396/dify-on-wechat)项目约定**工作流类型**的应用**输入变量命名为`query`**,**输出变量命名为`text`**。 -
+
测试没有问题后,按照上图步骤发布应用,依次点击发布、更新、访问API。 @@ -377,7 +377,7 @@ docker logs -f dify-on-wechat # 查看二维码并登录 同样参照**2.2.1小节**启动程序并扫码登录,然后给微信机器人发送消息,进行测试。 -
+
可以看到机器人成功接通了工作流api并进行了回复,至此我们已经完全掌握了如何创建Dify所有类型的应用:基础聊天助手、工作流聊天助手、智能助手、工作流,我们也学会了如何把上述应用发布为API,并接入微信。 @@ -456,7 +456,7 @@ python app.py [INFO][2024-04-30 21:17:05][wework_channel.py:224] - wework程序初始化完成········ ``` -
+
现在我们给机器人发送消息,可以看到接入成功! diff --git a/zh_CN/learn-more/use-cases/dify-on-whatsapp.md b/zh_CN/learn-more/use-cases/dify-on-whatsapp.md index 0ee3d6246..6bc83526f 100644 --- a/zh_CN/learn-more/use-cases/dify-on-whatsapp.md +++ b/zh_CN/learn-more/use-cases/dify-on-whatsapp.md @@ -23,7 +23,7 @@ 首先,登录[Dify官方应用平台](https://cloud.dify.ai/signin),你可以选择使用Github登录或者使用Google登录。此外,你也可以参考Dify官方教程[Docker Compose 部署 | 中文 | Dify](https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/docker-compose) 私有部署,Dify是开源项目,支持私有部署。 -
+
登录成功后,进入Dify页面,我们按照下方步骤创建一个基础编排聊天助手应用 @@ -34,7 +34,7 @@ 5. 选择应用图标并为应用填写一个名称,比如基础编排聊天助手 6. 点击创建 -
+
创建成功后我们会跳转到上图所示页面,我们继续配置应用 @@ -42,7 +42,7 @@ 2. 设置模型参数 3. 填写应用提示词 -
+
在配置完成后,我们可以在右侧对话框进行测试,在测试完成后,进行如下操作 @@ -52,7 +52,7 @@ **(4)生成基础编排聊天助手API密钥** -
+
在点击"访问API"后,我们会跳转到上图的API管理页面,在这个页面我们按照如下步骤获取API密钥: @@ -68,7 +68,7 @@ 转到\[Twilio控制台] 畫面應該會直接獲取到Account SID 和Auth Token,保存好這两个东西。 -
+
## 5. 创建你的聊天机器人 @@ -122,7 +122,7 @@ npx localtunnel --port 9000 上述命令在你的本地服务器(运行在9000端口)和localtunnel创建的公共域之间建立了一个连接。一旦你有了localtunnel转发URL,任何来自客户端对该URL的请求都会自动被定向到你的FastAPI后端。 -
+
#### 5.5 代码解释 @@ -196,7 +196,7 @@ conversation_ids = {} 在“试试看”下,点击“发送WhatsApp消息”。你将默认进入沙盒选项卡,你会看到一个电话号码“+14155238886”,旁边有一个加入的代码,右边有一个二维码。 -
+
要启用Twilio测试环境,将此代码的文本作为WhatsApp消息发送到显示的电话号码。如果你正在使用网络版本,可以点击超链接将你引导到WhatsApp聊天。 @@ -212,13 +212,13 @@ Twilio沙盒webhook 完整的URL应如下所示:https://breezy-humans-help.loc 完成后,按“保存”按钮。 -
+
## 7. WhatsApp測試 掃6.1 頁面的二維碼進入WhatsApp 沙盒環境,然後发送WhatsApp消息,并等待你的AI聊天机器人的回复。尝试向AI聊天机器人提问你可以向Dify 聊天助手提问的任何问题。 -
+
## 8. 后记 diff --git a/zh_CN/learn-more/use-cases/how-to-connect-aws-bedrock.md b/zh_CN/learn-more/use-cases/how-to-connect-aws-bedrock.md index 8f4df16f8..b23f5fa9e 100644 --- a/zh_CN/learn-more/use-cases/how-to-connect-aws-bedrock.md +++ b/zh_CN/learn-more/use-cases/how-to-connect-aws-bedrock.md @@ -12,13 +12,13 @@ 访问 [AWS Bedrock](https://aws.amazon.com/bedrock/),创建 Knowledge Base 服务。 -

创建 AWS Bedrock Knowledge Base

+

创建 AWS Bedrock Knowledge Base

### 2. 构建后端 API 服务 Dify 平台尚不能直接连接 AWS Bedrock Knowledge Base,需要开发团队参考 Dify 关于外部知识库连接的 [API 定义](../../guides/knowledge-base/external-knowledge-api-documentation.md),手动创建后端 API 服务,建立与 AWS Bedrock 的连接。具体架构示意图请参考: -

构建后端 API 服务

+

构建后端 API 服务

你可以参考以下 2 个代码文件,构建后端服务 API。 @@ -117,7 +117,7 @@ class ExternalDatasetService: 登录 AWS Bedrock Knowledge 后台,获取已创建 Knowledge Base 的 ID。此参数将会在[后续步骤](how-to-connect-aws-bedrock.md#id-5.-lian-jie-wai-bu-zhi-shi-ku)用于与 Dify 平台的连接。 -

获取 AWS Bedrock Knowledge Base ID

+

获取 AWS Bedrock Knowledge Base ID

### 4. 关联外部知识 API @@ -129,13 +129,13 @@ class ExternalDatasetService: * API 接口地址,外部知识库的连接地址,可在[第二步](how-to-connect-aws-bedrock.md#id-2.-gou-jian-hou-duan-api-fu-wu)中自定义。示例 `api-endpoint/retrieval`; * API Key,外部知识库连接密钥,可在[第二步](how-to-connect-aws-bedrock.md#id-2.-gou-jian-hou-duan-api-fu-wu)中自定义。 -
+
### 5. 连接外部知识库 前往 **“知识库”** 页,点击添加知识库卡片下方的 **“连接外部知识库”** 跳转至参数配置页面。 -
+
填写以下参数: @@ -152,7 +152,7 @@ class ExternalDatasetService: \*\*Score 阈值:\*\*文本片段筛选的相似度阈值,只召回超过设置分数的文本片段,默认值为 0.5。数值越高说明对于文本与问题要求的相似度越高,预期被召回的文本数量也越少,结果也会相对而言更加精准。 -
+
设置完成后即可建立与外部知识库 API 的连接。 @@ -160,8 +160,8 @@ class ExternalDatasetService: 建立与外部知识库的连接后,开发者可以在 **“召回测试”** 中模拟可能的问题关键词,预览从 AWS Bedrock Knowledge Base 召回的文本分段。 -

测试外部知识库的连接与召回

+

测试外部知识库的连接与召回

若对于召回结果不满意,可以尝试修改召回参数或自行调整 AWS Bedrock Knowledge Base 的检索设置。 -

调整 AWS Bedrock Knowledge Base 文本处理参数

+

调整 AWS Bedrock Knowledge Base 文本处理参数

diff --git a/zh_CN/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md b/zh_CN/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md index b4fbc6c2d..05d51af69 100644 --- a/zh_CN/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md +++ b/zh_CN/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website.md @@ -15,16 +15,16 @@ Wix 是一个非常流行的网站创建平台,它允许用户通过拖拽的 * 点击右上角的“发布”按钮 * 在发布页面中,选择 “Embed Into Site” 选项。 - ![](../../.gitbook/assets/best-practice-wix-2.png) + ![](https://assets-docs.dify.ai/img/zh_CN/use-cases/69e32259e16113a85efb36a55ff103e9.webp) * 选择合适的样式并复制显示的 iFrame 代码,例如: -![](../../.gitbook/assets/best-practice-wix-3.png) +![](https://assets-docs.dify.ai/img/zh_CN/use-cases/6de46e88bcfe958365970e58c91e4bdd.webp) ## 2. 在 Wix 网站中嵌入 iFrame 代码片段 登录 Wix 网站,打开你要编辑的网页。点击网页左侧蓝色的 `+` (Add Elements)按钮,然后选择 **Embed Code**,最后点击 **Embed HTML** 添加一个 HTML iFrame 元素到页面。 -![](../../.gitbook/assets/best-practice-add-html-iframe.png) +![](https://assets-docs.dify.ai/img/zh_CN/use-cases/f8e96ede33b585b00d0be569e13dee1f.webp) 在 `HTML Settings` 框内选择 `Code` 选项,复制并粘贴你在 Dify 应用中获取的 iFrame 代码片段,然后点击 **Update** 按钮进行保存并进行预览。 @@ -34,7 +34,7 @@ Wix 是一个非常流行的网站创建平台,它允许用户通过拖拽的 ``` -![](../../.gitbook/assets/best-practice-insert-dify-iframe-code.png) +![](https://assets-docs.dify.ai/img/zh_CN/use-cases/f89b4bd5893e1d522e5a8bd896bee11f.webp) > ⚠️ 请确保 iFrame 代码中的地址以 HTTPS 开头,HTTP 地址将无法正常显示。 diff --git a/zh_CN/learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.md b/zh_CN/learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.md index bc6f8bd5b..f16d7bea4 100644 --- a/zh_CN/learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.md +++ b/zh_CN/learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools.md @@ -30,11 +30,11 @@ conda activate python-3-11 推荐直接从[官网](https://developer.nvidia.com/cuda-downloads?target_os=Windows\&target_arch=x86_64\&target_version=11\&target_type=exe_local)安装。 Windows 11 选择下图版本。 -
+
根据引导安装完,打开 `NVDIA 控制面板 -> 系统信息` 看到完成了安装。 -
+
**WSL2 准备** @@ -46,7 +46,7 @@ conda activate python-3-11 2. Input CMD 3. Ctrl + Shift + Enter -
+
**第二步,在** **CMD** **中用指令安装** @@ -186,7 +186,7 @@ alias proxy="source /path/to/proxy.sh" 进入官网,选择 WSL-Ubuntu 版本,按照指引使用命令行安装。 -
+
修改`~/.bashrc`将 CUDA 添加至环境变量: @@ -199,7 +199,7 @@ export PATH=$PATH:/usr/local/cuda-12.2/lib64 进入 PyTorch [官网](https://pytorch.org/),按照环境安装 PyTorch。 -
+
这样环境准备就完成了。 @@ -243,7 +243,7 @@ Xinference 默认会在本地启动一个 worker,端点为:`http://127.0.0.1 在浏览器中打开: [http://localhost:9997](http://localhost:9997),选择 baichuan-chat,pytorch,13B,4bit,点击 create 部署。 -
+
或者使用 CLI 部署: @@ -328,7 +328,7 @@ docker-worker-1 langgenius/dify-api:0.3.16 "/bin/bash /entrypoi…" Docker 启动成功后,在浏览器中访问:http://127.0.0.1/。设置过密码后登陆,会进入应用列表页。 -
+
至此,成功使用 Docker 部署了 Dify 社区版。 @@ -351,13 +351,13 @@ hostname -I 172.22.195.4 ``` -
+
#### 使用 Baichuan-13B-Chat 创建应用,就可以在应用中使用上一步配置的 Baichuan-13B-Chat 模型了。在 Dify 的提示词编排界面,选择 baichuan-chat 模型,设计你的应用提示词(prompt),即可发布一个可访问的 AI 应用。 -
+
以上,就是本地部署 Dify 接入 Xinference 部署的 baichuan-chat 的全过程。 至此,我们基于 Baichuan-13B-Chat 的一个基本的聊天应用就基本完成了。 diff --git a/zh_CN/learn-more/use-cases/train-a-qa-chatbot-that-belongs-to-you.md b/zh_CN/learn-more/use-cases/train-a-qa-chatbot-that-belongs-to-you.md index ad59e3771..246a9b0a7 100644 --- a/zh_CN/learn-more/use-cases/train-a-qa-chatbot-that-belongs-to-you.md +++ b/zh_CN/learn-more/use-cases/train-a-qa-chatbot-that-belongs-to-you.md @@ -16,7 +16,7 @@ _注:CODING DevOps 是腾讯云旗下的一站式研发管理平台及云原 例如这样 🔽 -
+
这里的“胡言乱语”指的是它会用其他不相关的概念进行回答,并且**你并不能够预期什么问题会有什么回答,这在商业场景下十分致命。在大多数情况下,ChatGPT 对于一些带有公理性质**的知识回答是没有问题的,作为一个可以日常侃大山闲聊的对象依然是合格的,可是你却看着它的强大的学习和理解能力望洋兴叹。 @@ -42,7 +42,7 @@ _注:CODING DevOps 是腾讯云旗下的一站式研发管理平台及云原 但是,它现在也只是一个**通用型聊天机器人**,离商业可用的**专用型问答机器人**还差一个语料的距离。 -
+
### **准备语料** @@ -60,21 +60,21 @@ _是的没错,你也可以把电子书上传进来,用 AI 帮助你提炼书 在正式开始训练前,我们得先把教材准备好。好在 CODING 之前的所有文档皆以 Git 代码仓库 + Markdown 的形式进行协作,因此我只需要先把文档先拉到本地中。不过我现在碰到了第一个问题,那就是如何把仓库中的这一系列 .md 文档文件合并至同一个文件中? -
+
不怕,让 AI 给我们写一段 python 吧。 -
+
试着运行这个脚本,oh,输入路径后就成功生成了一篇总合文档!如果你想了解如何让 AI 给你写代码,不妨阅读[《如何用狗屁通(GPT )解决一个套娃问题》](http://mp.weixin.qq.com/s?__biz=MzU2Njg1NDA3Mw==\&mid=2247484248\&idx=1\&sn=50809b40f520c767483e1a7b0eefb9c1\&chksm=fca76b8ecbd0e298e627140d63e7b3383d226ab293a2e8fefa04b5a1ee12f187520560ec1579\&scene=21#wechat_redirect)。 -
+
### **开始训练** 现在要做的事,就是上传这个文件并静待训练成果了。 -
+
数据自动分段与清洗完成后,在刚创建的应用设置中的上下文,关联这一篇文档。为了保证响应速度和成本控制,这里直接用 gpt-4o 模型。 @@ -84,17 +84,17 @@ _是的没错,你也可以把电子书上传进来,用 AI 帮助你提炼书 现在再去和这个机器人互动,看看它会回答什么? -
+
好了,你已经是个成熟的问答机器人了,可以回答更加复杂的产品问题了。 -
+
-
+
-
+
-
+
这个问答机器人花了多久做出来,成本如何? diff --git a/zh_CN/workshop/basic/build-ai-image-generation-app.md b/zh_CN/workshop/basic/build-ai-image-generation-app.md index 035924001..75040b8f2 100644 --- a/zh_CN/workshop/basic/build-ai-image-generation-app.md +++ b/zh_CN/workshop/basic/build-ai-image-generation-app.md @@ -6,7 +6,7 @@ 本文将使用图像生成模型,指导你使用 Dify 快速开发一个 AI 图片生成应用。 -
+
### 本实验中你将掌握的知识点 @@ -24,7 +24,7 @@ 进入管理页后,点击复制密钥即可。 -
+
接下来,你需要通过以下步骤把密钥填入 [Dify - 工具 - Stability](https://cloud.dify.ai/tools) 中: @@ -33,7 +33,7 @@ * 选择 Stability * 点击授权 -
+
* 填入密钥并保存 @@ -47,7 +47,7 @@ Free 版本的 Dify 提供了免费 200 条 OpenAI 的消息额度 点击**右上角头像 - 设置 - 模型供应商** -
+
如果尚未找到合适的模型供应商,groq 平台提供了 Llama 等 LLM 的免费调用额度。 @@ -57,17 +57,17 @@ Free 版本的 Dify 提供了免费 200 条 OpenAI 的消息额度 回到**Dify - 模型供应商**,选择**groqcloud**,点击 **设置**。 -
+
粘贴 API Key 并保存。 -
+
### 3. 构建 Agent 回到**Dify - 工作室**,选择**创建空白应用**。 -
+
在本实验中,我们只需要了解 Agent 的基础用法即可。 @@ -81,21 +81,21 @@ Agent 是一种模拟人类行为和能力的 AI 系统,它通过自然语言 选择 **Agent**,填写名称即可。 -
+
接下来你会进入到如下图的 Agent 编排界面 -
+
我们选择 LLM,本篇教程中我们使用 groq 提供的 Llama-3.1-70B 为例: -
+
在**工具**中添加 AI 绘图工具 Stability: -
+
-
+
#### 撰写提示词 @@ -115,17 +115,17 @@ Agent 是一种模拟人类行为和能力的 AI 系统,它通过自然语言 例如:画一个女孩,手中拿着一本打开的书 -
+
#### 不想撰写提示词?当然可以! 点击提示词的右上角**生成**。 -
+
在**指令**中输入你的需求,点击**生成**,右侧生成的提示词中会出现由AI生成的提示词。 -
+
不过,为了养成对提示词良好的理解,我们在初期最好不要依赖这一项功能。 @@ -133,7 +133,7 @@ Agent 是一种模拟人类行为和能力的 AI 系统,它通过自然语言 点击右上角的发布按钮,发布后选择**运行**就可以获得一个在线运行的 Agent 的网页。 -
+
复制这个网页的 URL,可以分享给其他好友使用。 @@ -141,7 +141,7 @@ Agent 是一种模拟人类行为和能力的 AI 系统,它通过自然语言 我们可以在用户输入的命令中加上画风的指令,例如:二次元风格,画一个女孩,手中拿着一本打开的书 -
+
但是如果我们希望风格默认都是二次元风格呢,那么我们加在系统提示词里就行了,因为我们之前了解到系统提示词是每次执行用户命令都会知晓的,优先级更高。 @@ -167,10 +167,10 @@ Agent 是一种模拟人类行为和能力的 AI 系统,它通过自然语言 例如,我们尝试提问:今晚吃什么 -
+
在一些更正式的业务场景中,我们可以调用敏感词库来拒绝用户的请求。 在**添加功能 - 内容审查**中添加关键词 “晚饭”,当用户输入关键词时,则 Agent 应用输出 “对不起,我不明白你在说什么”。 -
+
diff --git a/zh_CN/workshop/basic/travel-assistant.md b/zh_CN/workshop/basic/travel-assistant.md index d0cb6cbf8..891814a9f 100644 --- a/zh_CN/workshop/basic/travel-assistant.md +++ b/zh_CN/workshop/basic/travel-assistant.md @@ -39,25 +39,25 @@ SerpAPI提供一个月100次的免费调用次数,这足够我们完成本次 点击复制 -
+
2. 前往 **Dify - 工具 - Google**: 点击 `去授权` ,填入API Key并保存。 -
+
#### webscraper 本次实验中,我们需要一个爬虫工具从指定的网页中抓取内容,Dify 已提供内置工具,无需额外配置。 -
+
#### Wikipedia 我们还希望 Agent 能够准确介绍目的地知识,Wikipedia 是一个比较好知识来源,Dify 也内置了该工具,无需额外配置。 -
+
### 3. 构建 Agent @@ -65,7 +65,7 @@ SerpAPI提供一个月100次的免费调用次数,这足够我们完成本次 添加工具:`Google`、`webscraper`和`wikipedia`并启用。 -
+
4. **示例输出** @@ -126,4 +126,4 @@ Dify 目前支持`文本`、`段落`、`下拉选项`、`数字`、`基于 API 添加变量后,用户可以按照应用开发者的意图向应用提供必要的背景信息,实现的效果如下: -
+
diff --git a/zh_CN/workshop/intermediate/article-reader.md b/zh_CN/workshop/intermediate/article-reader.md index 2b922c253..062f7a3b6 100644 --- a/zh_CN/workshop/intermediate/article-reader.md +++ b/zh_CN/workshop/intermediate/article-reader.md @@ -6,7 +6,7 @@ 本次实验中,我们将以文章理解助手为案例。这个文章理解助手将会根据上传的文档进行提问,协助用户带着问题去阅读论文等材料。 -
+
## 本实验中你将掌握的知识点 @@ -54,7 +54,7 @@ 将开始节点的文件变量作为输入变量,文档提取器会将文档格式的文件转为文本变量输出。 -
+
### LLM @@ -163,11 +163,11 @@ 因此,你需要把开始节点中的文件变量调整为`array`类型,也就是文件列表。 -
+
在开始节点之后需要加入迭代节点,并且设置输入变量和输出变量。在迭代节点内部,设置每次循环执行的内容,这部分和前文内容完全一致。 -
+
## 思考题 2 : 针对思考题 1,只处理文件列表的特定文件 @@ -177,5 +177,5 @@ 在迭代节点前加入列表操作,调整**过滤条件**、**排序**,然后将迭代节点的输入改为列表操作节点的输出。 -
+
diff --git a/zh_CN/workshop/intermediate/customer-service-bot.md b/zh_CN/workshop/intermediate/customer-service-bot.md index 6d526e664..3980881ff 100644 --- a/zh_CN/workshop/intermediate/customer-service-bot.md +++ b/zh_CN/workshop/intermediate/customer-service-bot.md @@ -32,7 +32,7 @@ 本次实验中需要涉及使用 embedding 模型,目前支持 embedding 的模型提供商中有 OpenAI、Cohere 等,在 Dify 的模型供应商中有标注 `TEXT EMBEDDING` ,请确保至少添加了一个并且有充足余额。 -
+
> **什么是 embedding?** > @@ -56,7 +56,7 @@ Dify 支持三种数据源:上传文本文件、Notion、网页。 上传文档后,会进入以下页面: -
+
可以看到右侧有分段预览。当前默认选择的是自动分段与清洗,Dify 会根据文本内容的不同自动将文章切分为许多个段落。你也可以在自定义中设置其他的切分规则。 @@ -78,11 +78,11 @@ Dify 提供了向量检索、全文检索、混合检索三种检索功能,其 混合检索中可以设置权重或者使用重新排序(Rerank)模型。使用权重设置时,可以设置检索更侧重语义还是关键词,例如下图中语义占 70% 的权重,关键词占30%的权重。 -
+
点击**保存并处理**将会处理文档,完成处理后文档就可以在应用中使用了。 -
+
### 同步自 Web 站点 @@ -90,7 +90,7 @@ Dify 提供了向量检索、全文检索、混合检索三种检索功能,其 目前 Dify 支持最多 50 个页面的处理,请注意限制数量的设置。如果超出,可以再创建新的知识库。 -
+
### 调整知识库内容 @@ -106,7 +106,7 @@ Dify 提供了向量检索、全文检索、混合检索三种检索功能,其 在知识库的文档页,左侧边栏中点击召回测试,可以输入关键词来测试检索结果的准确性。 -
+
## 添加节点 @@ -125,7 +125,7 @@ Dify 提供了向量检索、全文检索、混合检索三种检索功能,其 * 用户请求对技术名词的解释 * 用户询问社群加入方式 -
+
### 直接回复节点 @@ -141,7 +141,7 @@ Dify 提供了向量检索、全文检索、混合检索三种检索功能,其 Dify 支持 Markdown 格式的文本的输出。你可以在输出中用 Makrdown 来丰富文本的格式。甚至可以用 Markdown 格式在文中插入图片,效果如下: -
+
### 知识检索节点 @@ -165,13 +165,13 @@ LLM 需要根据用户的提问,调整回复,使得回复内容更加得体 此外,你可以打开 LLM 记忆让用户的对话体验更加连贯。 -
+
## 思考题 1: 如何连接外部知识库 在知识库功能中,你可以通过外部知识库 API 来连接外部知识库,例如 AWS Bedrock 知识库。 -
+
有关 AWS Bedrock 知识库的最佳实践,请阅读:[如何连接 AWS Bedrock 知识库?](../../learn-more/use-cases/how-to-connect-aws-bedrock.md) @@ -181,7 +181,7 @@ LLM 需要根据用户的提问,调整回复,使得回复内容更加得体 在搭载知识库的实例中,进入 **知识库 -> API**,并且创建 API 密钥。请妥善保管 API 密钥。 -
+
## 思考题 3: 如何将客服机器人嵌入网页 diff --git a/zh_CN/workshop/intermediate/twitter-chatflow.md b/zh_CN/workshop/intermediate/twitter-chatflow.md index c51368ccb..b2f4e386a 100644 --- a/zh_CN/workshop/intermediate/twitter-chatflow.md +++ b/zh_CN/workshop/intermediate/twitter-chatflow.md @@ -36,17 +36,17 @@ Free 版本的 Dify 提供了免费 200 条 OpenAI 的消息额度,如果消 点击**右上角头像 - 设置 - 模型供应商** -
+
## 创建 ChatFlow 应用 现在,让我们开始创建 ChatFlow。点击`创建空白应用 - 工作流编排`: -
+
初始化的 Chatflow 应用如下: -
+
## 添加节点 @@ -56,7 +56,7 @@ Free 版本的 Dify 提供了免费 200 条 OpenAI 的消息额度,如果消 点击开始节点并添加一个新变量: -
+
### 代码节点 @@ -73,25 +73,25 @@ def main(id: str) -> dict: 添加一个代码节点并选择 Python ,然后设置输入和输出变量名: -
+
### HTTP 请求节点 根据 [Crawlbase文档](https://crawlbase.com/docs/crawling-api/scrapers/#twitter-profile),如果以 HTTP 请求格式抓取 Twitter 用户的个人资料,我们需要按以下格式填写 HTTP 请求节点: -
+
出于安全考虑,最好不要直接将 API Key 作为明文输入。在 Dify 最新版本中,可以在`环境变量`中设置令牌值。点击 `env` - `添加变量`来设置 API Key,这样就不会以明文出现在节点中。 -
+
点击[此处](https://crawlbase.com/dashboard/account/docs)获取 Crawlbase API Key。输入 `/`插入为变量。 -
+
点击此节点的开始按钮,输入Elon Musk 的 URL 进行测试: -
+
### LLM 节点 @@ -101,7 +101,7 @@ def main(id: str) -> dict: 以下是一个提示词示例。 -
+
## 测试运行 @@ -109,7 +109,7 @@ def main(id: str) -> dict: 例如,我想分析 Elon Musk 的推文,并以他的语气写一条关于全球变暖的推文。 -
+
点击右上角的`发布`,并将其添加到你的网站中。 diff --git a/zh_CN/workspace/app.md b/zh_CN/workspace/app.md index fcf162921..b52a3c699 100644 --- a/zh_CN/workspace/app.md +++ b/zh_CN/workspace/app.md @@ -4,11 +4,11 @@ 在 **探索 > 发现** 中, 我们提供了一些常用的模板应用。这些应用涵盖翻译、写作、编程和助手。 -
+
如果你想使用模板应用,点击模板上的“添加到工作区”按钮。便可以在左侧的工作区中使用该应用。 -
+
如果你要修改模板以创建新应用程序,请单击模板上的“自定义”按钮。 @@ -16,6 +16,6 @@ 工作区是应用程序的导航。在工作区中点击一个应用,便可直接使用该应用。 -
+
工作区中的应用包括:你自己的应用和其他团队添加到工作区的应用。