Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: knowledge doc (#2389)

zxhlyh392995ca4683
diff --git a/web/app/(commonLayout)/datasets/template/template.en.mdx b/web/app/(commonLayout)/datasets/template/template.en.mdx
index f2b4e604ee0..e3f3f21e6b0 100644
--- a/web/app/(commonLayout)/datasets/template/template.en.mdx
+++ b/web/app/(commonLayout)/datasets/template/template.en.mdx
@@ -873,7 +873,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
---
<Heading
- url='/datasets/{dataset_id}/segments/{segment_id}'
+ url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
method='DELETE'
title='delete document segment'
name='#delete_segment'
@@ -894,7 +894,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
<CodeGroup
title="Request"
tag="DELETE"
- label="/datasets/{dataset_id}/segments/{segment_id}"
+ label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}"
targetCode={`curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}/segments/{segment_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'`}
>
```bash {{ title: 'cURL' }}
@@ -916,7 +916,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
---
<Heading
- url='/datasets/{dataset_id}/segments/{segment_id}'
+ url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
method='POST'
title='update document segment'
name='#update_segment'
@@ -947,7 +947,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
<CodeGroup
title="Request"
tag="POST"
- label="/datasets/{dataset_id}/segments/{segment_id}"
+ label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}"
targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'\\\n--data-raw '{\"segments\": {\"content\": \"1\",\"answer\": \"1\", \"keywords\": [\"a\"], \"enabled\": false}}'`}
>
```bash {{ title: 'cURL' }}
diff --git a/web/app/(commonLayout)/datasets/template/template.zh.mdx b/web/app/(commonLayout)/datasets/template/template.zh.mdx
index 11bcd5a7608..c1760419254 100644
--- a/web/app/(commonLayout)/datasets/template/template.zh.mdx
+++ b/web/app/(commonLayout)/datasets/template/template.zh.mdx
@@ -873,7 +873,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
---
<Heading
- url='/datasets/{dataset_id}/segments/{segment_id}'
+ url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
method='DELETE'
title='删除文档分段'
name='#delete_segment'
@@ -894,7 +894,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
<CodeGroup
title="Request"
tag="DELETE"
- label="/datasets/{dataset_id}/segments/{segment_id}"
+ label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}"
targetCode={`curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'`}
>
```bash {{ title: 'cURL' }}
@@ -916,7 +916,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
---
<Heading
- url='/datasets/{dataset_id}/segments/{segment_id}'
+ url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
method='POST'
title='更新文档分段'
name='#update_segment'
@@ -947,7 +947,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
<CodeGroup
title="Request"
tag="POST"
- label="/datasets/{dataset_id}/segments/{segment_id}"
+ label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}"
targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'\\\n--data-raw '{\"segments\": {\"content\": \"1\",\"answer\": \"1\", \"keywords\": [\"a\"], \"enabled\": false}}'`}
>
```bash {{ title: 'cURL' }}