GITBOOK-87: Update docs: "Integrate LangSmith"

pull/138/head
allen 2024-07-05 12:54:59 +00:00 committed by gitbook-bot
parent 7b3b57d03a
commit 0ffc1351f2
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
92 changed files with 82 additions and 72 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 KiB

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 538 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 660 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 KiB

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 KiB

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 496 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 KiB

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 KiB

After

Width:  |  Height:  |  Size: 422 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 KiB

After

Width:  |  Height:  |  Size: 484 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

After

Width:  |  Height:  |  Size: 496 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 KiB

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 KiB

After

Width:  |  Height:  |  Size: 515 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 KiB

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 KiB

After

Width:  |  Height:  |  Size: 525 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 KiB

After

Width:  |  Height:  |  Size: 857 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 857 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 KiB

After

Width:  |  Height:  |  Size: 597 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 818 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 KiB

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 KiB

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 KiB

After

Width:  |  Height:  |  Size: 497 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 KiB

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 KiB

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 KiB

After

Width:  |  Height:  |  Size: 731 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 731 KiB

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 KiB

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 KiB

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 KiB

After

Width:  |  Height:  |  Size: 396 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 KiB

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 KiB

After

Width:  |  Height:  |  Size: 473 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 597 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 KiB

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 KiB

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

After

Width:  |  Height:  |  Size: 824 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 824 KiB

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 KiB

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 KiB

After

Width:  |  Height:  |  Size: 790 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 790 KiB

After

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 KiB

After

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 598 KiB

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 532 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 KiB

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 KiB

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 KiB

After

Width:  |  Height:  |  Size: 484 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 KiB

After

Width:  |  Height:  |  Size: 239 KiB

View File

@ -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 left-hand menu: “**Prompt Eng.**” to compose the application.
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
**2.1 Fill in Prompts**
@ -50,13 +50,13 @@ And then edit the opening remarks:
If an application wants to generate content based on private contextual conversations, it can use our [knowledge](broken-reference) feature. Click the "Add" button in the context to add a knowledge base.
![](<../../.gitbook/assets/image (9) (1) (1).png>)
![](<../../.gitbook/assets/image (9) (1) (1) (1).png>)
**2.3 Debugging**
We fill in the user input on the right side and debug the input content.
![](<../../.gitbook/assets/image (11) (1) (1).png>)
![](<../../.gitbook/assets/image (11) (1) (1) (1).png>)
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:

View File

@ -16,7 +16,7 @@ If you have the requirement to fill in variables when you apply the layout, you
Fill in the necessary content and click the "Start Chat" button to start chatting.
<figure><img src="../../../.gitbook/assets/image (8) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (8) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
Move to the AI's answer, you can copy the content of the conversation, and give the answer "like" and "dislike".
@ -52,4 +52,4 @@ _Please make sure that the device environment you are using is authorized to use
If the "Quotations and Attribution" feature is enabled during the application arrangement, the dialogue returns will automatically show the quoted knowledge document sources.
<figure><img src="../../../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (3) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

View File

@ -49,7 +49,7 @@ 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.
<figure><img src="../../../.gitbook/assets/image (6) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (6) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
### Generate more similar results

View File

@ -19,7 +19,7 @@ The feature provides an alternative system for enhancing retrieval, skipping the
4. Without a match, the query follows the standard LLM or RAG process.
5. Deactivating Annotation Reply ceases matching replies from the annotations.
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1).png" alt="" width="563"><figcaption><p>Annotation Reply Process</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt="" width="563"><figcaption><p>Annotation Reply Process</p></figcaption></figure>
## Activation

View File

@ -46,7 +46,7 @@ When adding segments in bulk, you need to first download the CSV format segment
In the segment list, you can directly edit the content of the added segments, including the text content and keywords of the segments.
<figure><img src="../../.gitbook/assets/image (5) (1) (1).png" alt=""><figcaption><p>Editing document segments</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (5) (1) (1) (1).png" alt=""><figcaption><p>Editing document segments</p></figcaption></figure>
***

View File

@ -31,4 +31,4 @@ When testing the knowledge base effect within the application, you can go to **W
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 **Jump to Knowledge Base** above the cited segment allows quick access to the segment list in the knowledge base, facilitating developers in debugging and editing.
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>View Citation Information in Response Content</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>View Citation Information in Response Content</p></figcaption></figure>

View File

@ -18,25 +18,25 @@ Dify's knowledge base supports web scraping and parsing into Markdown for import
First, you need to configure Firecrawl credentials in the **Data Source** section of the **Settings** page.
<figure><img src="../../.gitbook/assets/image.png" alt=""><figcaption><p>Configuring Firecrawl Credentials</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (11).png" alt=""><figcaption><p>Configuring Firecrawl Credentials</p></figcaption></figure>
Log in to the [Firecrawl website](https://www.firecrawl.dev/) to complete registration, get your API Key, and then enter and save it in Dify.
<figure><img src="../../.gitbook/assets/image (2).png" alt=""><figcaption><p>Get the API Key and save it in Dify</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1).png" alt=""><figcaption><p>Get the API Key and save it in Dify</p></figcaption></figure>
#### 2. Scrape target webpage
On the knowledge base creation page, select **Sync from website** and enter the URL to be scraped.
<figure><img src="../../.gitbook/assets/image (3).png" alt=""><figcaption><p>Web scraping configuration</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (3) (1).png" alt=""><figcaption><p>Web scraping configuration</p></figcaption></figure>
The configuration options include: Whether to crawl sub-pages, Page crawling limit, Page scraping max depth, Excluded paths, Include only paths, and Content extraction scope. After completing the configuration, click **Run** to preview the parsed pages.
<figure><img src="../../.gitbook/assets/image (4).png" alt=""><figcaption><p>Execute scraping</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (4) (1).png" alt=""><figcaption><p>Execute scraping</p></figcaption></figure>
#### 3. Review import results
After importing the parsed text from the webpage, it is stored in the knowledge base documents. View the import results and click **Add URL** to continue importing new web pages.
<figure><img src="../../.gitbook/assets/image (7).png" alt=""><figcaption><p>Importing parsed web text into the knowledge base</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (7) (1).png" alt=""><figcaption><p>Importing parsed web text into the knowledge base</p></figcaption></figure>

View File

@ -6,7 +6,7 @@ In enterprise-level large-scale model API calls, high concurrent requests can ex
You can enable this feature in **Model Provider -- Model List -- Configure Model Load Balancing** and add multiple credentials (API keys) for the same model.
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1).png" alt="" width="563"><figcaption><p>Model Load Balancing</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1).png" alt="" width="563"><figcaption><p>Model Load Balancing</p></figcaption></figure>
{% hint style="info" %}
Model load balancing is a paid feature. You can enable this feature by [subscribing to SaaS paid services](../../getting-started/cloud.md#subscription-plans) or purchasing the enterprise edition.
@ -14,17 +14,17 @@ Model load balancing is a paid feature. You can enable this feature by [subscrib
The default API Key in the configuration is the credential added when the model provider was initially configured. You need to click **Add Configuration** to add different API keys for the same model to properly use the load balancing feature.
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1).png" alt="" width="563"><figcaption><p>Configure Load Balancing</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt="" width="563"><figcaption><p>Configure Load Balancing</p></figcaption></figure>
**You need to add at least one additional model credential** to save and enable load balancing.
You can also **temporarily disable** or **delete** configured credentials.
<figure><img src="../../.gitbook/assets/image (7) (1).png" alt="" width="563"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (7) (1) (1).png" alt="" width="563"><figcaption></figcaption></figure>
After configuration, all models with load balancing enabled will be displayed in the model list.
<figure><img src="../../.gitbook/assets/image (6) (1).png" alt="" width="563"><figcaption><p>Enable Load Balancing</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (6) (1) (1).png" alt="" width="563"><figcaption><p>Enable Load Balancing</p></figcaption></figure>
{% hint style="info" %}
By default, load balancing uses the Round-robin strategy. If a 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 a rate limit is tri
You can also configure load balancing from **Add Model**, and the configuration process is the same as described above.
<figure><img src="../../.gitbook/assets/image (4) (1).png" alt="" width="563"><figcaption><p>Configure Load Balancing from Add Model</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (4) (1) (1).png" alt="" width="563"><figcaption><p>Configure Load Balancing from Add Model</p></figcaption></figure>

View File

@ -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:
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
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

View File

@ -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.
<figure><img src="../../.gitbook/assets/image (6) (1) (1).png" alt=""><figcaption><p>Overview—Data Analysis</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (6) (1) (1) (1).png" alt=""><figcaption><p>Overview—Data Analysis</p></figcaption></figure>
***

View File

@ -55,4 +55,4 @@ After configuration, debugging or production data of the application in Dify can
<figure><img src="../../../.gitbook/assets/image (258).png" alt=""><figcaption><p>Viewing application data in Langfuse</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (8).png" alt=""><figcaption><p>Viewing application data in Langfuse</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (8) (1).png" alt=""><figcaption><p>Viewing application data in Langfuse</p></figcaption></figure>

View File

@ -1,64 +1,74 @@
# Integrate LangSmith
### 1. What is LangSmith
### What is LangSmith
LangSmith is a platform for building production-grade LLM applications. It is used for developing, collaborating, testing, deploying, and monitoring LLM applications.
{% hint style="info" %}
Introduction to LangSmith: [https://www.langchain.com/langsmith](https://www.langchain.com/langsmith)
For more details, please refer to [LangSmith](https://www.langchain.com/langsmith).
{% endhint %}
***
### 2. How to Configure LangSmith
### How to Configure LangSmith
1. Register and log in to LangSmith on the [official website](https://www.langchain.com/langsmith)
2. 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.
#### 1. Register/Login to [LangSmith](https://www.langchain.com/langsmith)
<figure><img src="../../../.gitbook/assets/image (3) (1).png" alt=""><figcaption><p>Create a project in LangSmith</p></figcaption></figure>
#### 2. Create a Project
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.
<figure><img src="../../../.gitbook/assets/image (1).png" alt=""><figcaption><p>Create a project in LangSmith</p></figcaption></figure>
Once created, you can view all created projects in the Projects section.
<figure><img src="../../../.gitbook/assets/image (7) (1).png" alt=""><figcaption><p>View created projects in LangSmith</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (7) (1) (1).png" alt=""><figcaption><p>View created projects in LangSmith</p></figcaption></figure>
3. Create project credentials. Find the project settings **Settings** in the left sidebar.
#### 3. Create Project Credentials
<figure><img src="../../../.gitbook/assets/image (8) (1).png" alt=""><figcaption><p>Project settings</p></figcaption></figure>
Find the project settings **Settings** in the left sidebar.
<figure><img src="../../../.gitbook/assets/image (8) (1) (1).png" alt=""><figcaption><p>Project settings</p></figcaption></figure>
Click **Create API Key** to create project credentials.
<figure><img src="../../../.gitbook/assets/image (3) (1) (1).png" alt=""><figcaption><p>Create a project API Key</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (3) (1) (1) (1).png" alt=""><figcaption><p>Create a project API Key</p></figcaption></figure>
Select **Personal Access Token** for subsequent API authentication.
<figure><img src="../../../.gitbook/assets/image (5) (1).png" alt=""><figcaption><p>Create an API Key</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (5) (1) (1).png" alt=""><figcaption><p>Create an API Key</p></figcaption></figure>
Copy and save the created API key.
<figure><img src="../../../.gitbook/assets/image (9).png" alt=""><figcaption><p>Copy API Key</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (9) (1).png" alt=""><figcaption><p>Copy API Key</p></figcaption></figure>
4. Configure LangSmith in the Dify application. Open the application you need to monitor, open **Monitoring** in the side menu, and select **Configure** on the page.
#### 4. Integrating LangSmith with Dify
<figure><img src="../../../.gitbook/assets/image (11).png" alt=""><figcaption><p>Configure LangSmith</p></figcaption></figure>
Configure LangSmith in the Dify application. Open the application you need to monitor, open **Monitoring** in the side menu, and select **Configure** on the page.
<figure><img src="../../../.gitbook/assets/image (2).png" alt=""><figcaption><p>Configure LangSmith</p></figcaption></figure>
After clicking configure, paste the **API Key** and **project name** created in LangSmith into the configuration and save.
<figure><img src="../../../.gitbook/assets/image (12).png" alt=""><figcaption><p>Configure LangSmith</p></figcaption></figure>
{% 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.
{% endhint %}
Once successfully saved, you can view the monitoring status on the current page.
<figure><img src="../../../.gitbook/assets/image (15).png" alt=""><figcaption><p>View configuration status</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (4).png" alt=""><figcaption><p>View configuration status</p></figcaption></figure>
### 3. Viewing Monitoring Data in LangSmith
### Viewing Monitoring Data in LangSmith
After configuration, debugging or production data of the application in Dify can be viewed in LangSmith.
Once configured, the debug or production data from applications within Dify can be monitored in LangSmith.
<figure><img src="../../../.gitbook/assets/image (17).png" alt=""><figcaption><p>Debugging applications in Dify</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (6).png" alt=""><figcaption><p>Debugging Applications in Dify</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (2) (1).png" alt=""><figcaption><p>Viewing application data in LangSmith</p></figcaption></figure>
When you switch to LangSmith, you can view detailed operation logs of Dify applications in the dashboard.
<figure><img src="../../../.gitbook/assets/image (8).png" alt=""><figcaption><p>Viewing application data in LangSmith</p></figcaption></figure>
Detailed LLM operation logs through LangSmith will help you optimize the performance of your Dify application.
<figure><img src="../../../.gitbook/assets/image (10).png" alt=""><figcaption><p>Viewing application data in LangSmith</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (18).png" alt=""><figcaption><p>Viewing application data in LangSmith</p></figcaption></figure>

View File

@ -6,4 +6,4 @@ description: Checklist
Before entering debug mode, you can check the checklist to see if there are any nodes with incomplete configurations or that have not been connected.
<figure><img src="../../../.gitbook/assets/image (8) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (8) (1) (1).png" alt=""><figcaption></figcaption></figure>

View File

@ -2,8 +2,8 @@
description: History
---
# History
# Run History
In the "Run History," you can view the run results and log information from the historical debugging of the current workflow.
<figure><img src="../../../.gitbook/assets/image (9).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (9) (1).png" alt=""><figcaption></figcaption></figure>

View File

@ -6,8 +6,8 @@ description: Log
Clicking "View Log—Details" allows you to see a comprehensive overview of the run, including information on input/output, metadata, and more, in the details section.
<figure><img src="../../../.gitbook/assets/image (6) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (6) (1) (1).png" alt=""><figcaption></figcaption></figure>
Clicking "View Log—Trace" enables you to review the input/output, token consumption, runtime duration, etc., of each node throughout the complete execution process of the workflow.
<figure><img src="../../../.gitbook/assets/image (7) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (7) (1) (1).png" alt=""><figcaption></figcaption></figure>

View File

@ -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.
<figure><img src="../../../.gitbook/assets/image (3) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (3) (1) (1).png" alt=""><figcaption></figcaption></figure>
After running a step test, you can review the execution status, input/output, and metadata information.
<figure><img src="../../../.gitbook/assets/image (4) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (4) (1) (1).png" alt=""><figcaption></figcaption></figure>

View File

@ -2,12 +2,12 @@
Dify Workflow offers a comprehensive set of execution and debugging features. In conversational applications, clicking "Preview" enters debugging mode.
<figure><img src="../../../.gitbook/assets/image (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
In workflow applications, clicking "Run" enters debugging mode.
<figure><img src="../../../.gitbook/assets/image (2) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (2) (1) (1).png" alt=""><figcaption></figcaption></figure>
Once in debugging mode, you can debug the configured workflow using the interface on the right side of the screen.
<figure><img src="../../../.gitbook/assets/image (5) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (5) (1) (1).png" alt=""><figcaption></figcaption></figure>

View File

@ -14,10 +14,10 @@ Answer node can be seamlessly integrated at any point to dynamically deliver con
Example 1: Output plain text.
<figure><img src="../../../.gitbook/assets/image (8) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (8) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
Example 2: Output image and LLM reply.
<figure><img src="../../../.gitbook/assets/image (6) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (6) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (7) (1) (1).png" alt="" width="275"><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (7) (1) (1) (1).png" alt="" width="275"><figcaption></figcaption></figure>

View File

@ -6,8 +6,8 @@ The "End" node serves as the termination point of the process, beyond which no f
Single-Path Execution Example:
<figure><img src="../../../.gitbook/assets/image (2) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (2) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
Multi-Path Execution Example:
<figure><img src="../../../.gitbook/assets/image (5) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (5) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

View File

@ -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.
<figure><img src="../../../.gitbook/assets/image (2) (1).png" alt="" width="332"><figcaption><p>HTTP Request Configuration</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (2) (1) (1).png" alt="" width="332"><figcaption><p>HTTP Request Configuration</p></figcaption></figure>
***
@ -23,6 +23,6 @@ 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.
<figure><img src="../../../.gitbook/assets/image (1) (1) (1).png" alt=""><figcaption><p>Customer Feedback Classification</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt=""><figcaption><p>Customer Feedback Classification</p></figcaption></figure>
The return values of an HTTP request include the response body, status code, response headers, and files. Notably, if the response contains a file (currently only image types are supported), 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.

View File

@ -64,7 +64,7 @@ Built-in variables for iteration: `items[object]` and `index[number]`.
#### **Example 2: Long Article Iteration Generator (Another Arrangement)**
<figure><img src="../../../.gitbook/assets/image (2) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (2) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
* Enter the story title and outline in the **Start Node**.
* Use an **LLM Node** to generate subheadings and corresponding content for the article.
@ -138,7 +138,7 @@ The output variable of the iteration node is in array format and cannot be direc
**Convert Using a Code Node**
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1).png" alt="" width="334"><figcaption><p>Code Node Conversion</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1).png" alt="" width="334"><figcaption><p>Code Node Conversion</p></figcaption></figure>
```python
def main(articleSections: list):
@ -150,7 +150,7 @@ def main(articleSections: list):
**Convert Using a Template Node**
<figure><img src="../../../.gitbook/assets/image (3) (1) (1).png" alt="" width="332"><figcaption><p>Template Node Conversion</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (3) (1) (1) (1).png" alt="" width="332"><figcaption><p>Template Node Conversion</p></figcaption></figure>
```django
{{ articleSections | join("\n") }}

View File

@ -2,7 +2,7 @@
Invoking a Large Language Model for Question Answering or Natural Language Processing. Within an LLM node, you can select an appropriate model, compose prompts, set the context referenced in the prompts, configure memory settings, and adjust the memory window size.
<figure><img src="../../../.gitbook/assets/image (9) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (9) (1) (1).png" alt=""><figcaption></figcaption></figure>
Configuring an LLM node primarily involves two steps:
@ -13,7 +13,7 @@ Configuring an LLM node primarily involves two steps:
Before selecting a model suitable for your task, you must complete the model configuration in "System Settings—Model Provider". The specific configuration method can be referenced in the [model configuration instructions](https://docs.dify.ai/tutorials/model-configuration#model-integration-settings). After selecting a model, you can configure its parameters.
<figure><img src="../../../.gitbook/assets/image (10) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (10) (1) (1).png" alt=""><figcaption></figcaption></figure>
**Write Prompts**

View File

@ -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.
<figure><img src="../../../.gitbook/assets/image (8) (1).png" alt=""><figcaption><p>Arxiv Paper Retrieval Tool</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (8) (1) (1).png" alt=""><figcaption><p>Arxiv Paper Retrieval Tool</p></figcaption></figure>
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.
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
3. **Extracting structured data and using the** [**HTTP Request**](http\_request.md), which can request any accessible URL, suitable for obtaining external retrieval results, webhooks, generating images, and other scenarios.
@ -28,7 +28,7 @@ In this example: The Arxiv paper retrieval tool requires **paper author** or **p
### 3 How to Configure
<figure><img src="../../../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (3) (1) (1) (1) (1) (1).png" alt="" width="375"><figcaption></figcaption></figure>
**Configuration Steps**

View File

@ -1,8 +1,8 @@
# Publish
# Application Publishing
After completing debugging, clicking "Publish" in the upper right corner allows you to save and quickly release the workflow as different types of applications.&#x20;
<figure><img src="../../.gitbook/assets/image (11).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (11) (1).png" alt=""><figcaption></figcaption></figure>
Conversational applications can be published as:

View File

@ -94,7 +94,7 @@ _I want you to act as an IT Expert in my Notion workspace, using your knowledge
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.
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
Finally, Click the "Publish" button on the top right of the page. Now you can click the public URL in the "Overview" section to converse with your personalized AI assistant!