diff --git a/web/app/components/develop/template/template.en.mdx b/web/app/components/develop/template/template.en.mdx index f3e1e2fe0f..1a9b9a1920 100644 --- a/web/app/components/develop/template/template.en.mdx +++ b/web/app/components/develop/template/template.en.mdx @@ -271,7 +271,7 @@ The text generation application offers non-session support and is ideal for tran --- ### Request Example - + ```bash {{ title: 'cURL' }} - curl -X POST 'https://cloud.dify.ai/v1/chat-messages/:task_id/stop' \ + curl -X POST 'https://cloud.dify.ai/v1/completion-messages/:task_id/stop' \ -H 'Authorization: Bearer {api_key}' \ -H 'Content-Type: application/json' \ --data-raw '{ @@ -314,7 +314,7 @@ The text generation application offers non-session support and is ideal for tran --- - + ```bash {{ title: 'cURL' }} - curl -X POST '${props.appDetail.api_base_url}/messages/{message_id}/feedbacks' \ + curl -X POST '${props.appDetail.api_base_url}/messages/:message_id/feedbacks' \ --header 'Authorization: Bearer {api_key}' \ --header 'Content-Type: application/json' \ --data-raw '{ diff --git a/web/app/components/develop/template/template.zh.mdx b/web/app/components/develop/template/template.zh.mdx index c3591836b5..f50f2bfeda 100644 --- a/web/app/components/develop/template/template.zh.mdx +++ b/web/app/components/develop/template/template.zh.mdx @@ -248,7 +248,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' --- - + ```bash {{ title: 'cURL' }} - curl -X POST 'https://cloud.dify.ai/v1/chat-messages/:task_id/stop' \ + curl -X POST 'https://cloud.dify.ai/v1/completion-messages/:task_id/stop' \ -H 'Authorization: Bearer {api_key}' \ -H 'Content-Type: application/json' \ --data-raw '{ @@ -290,7 +290,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' --- - + ```bash {{ title: 'cURL' }} - curl -X POST '${props.appDetail.api_base_url}/messages/{message_id}/feedbacks' \ + curl -X POST '${props.appDetail.api_base_url}/messages/:message_id/feedbacks' \ --header 'Authorization: Bearer {api_key}' \ --header 'Content-Type: application/json' \ --data-raw '{ diff --git a/web/app/components/develop/template/template_chat.en.mdx b/web/app/components/develop/template/template_chat.en.mdx index 6335e376f7..f36dd7bd54 100644 --- a/web/app/components/develop/template/template_chat.en.mdx +++ b/web/app/components/develop/template/template_chat.en.mdx @@ -369,7 +369,7 @@ Chat applications support session persistence, allowing previous chat history to --- - + ```bash {{ title: 'cURL' }} - curl -X POST '${props.appDetail.api_base_url}/messages/{message_id}/feedbacks' \ + curl -X POST '${props.appDetail.api_base_url}/messages/:message_id/feedbacks' \ --header 'Authorization: Bearer {api_key}' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -675,7 +675,7 @@ Chat applications support session persistence, allowing previous chat history to --- - + ```bash {{ title: 'cURL' }} curl -X DELETE '${props.appDetail.api_base_url}/conversations/{convsation_id}' \ @@ -726,7 +726,7 @@ Chat applications support session persistence, allowing previous chat history to --- - + ```bash {{ title: 'cURL' }} - curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \ + curl -X POST '${props.appDetail.api_base_url}/conversations/:conversation_id/name' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {api_key}' \ --data-raw '{ diff --git a/web/app/components/develop/template/template_chat.zh.mdx b/web/app/components/develop/template/template_chat.zh.mdx index 7f3a18832e..11f5c18133 100644 --- a/web/app/components/develop/template/template_chat.zh.mdx +++ b/web/app/components/develop/template/template_chat.zh.mdx @@ -342,7 +342,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' --- - + ```bash {{ title: 'cURL' }} - curl -X POST '${props.appDetail.api_base_url}/messages/{message_id}/feedbacks' \ + curl -X POST '${props.appDetail.api_base_url}/messages/:message_id/feedbacks' \ --header 'Authorization: Bearer {api_key}' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -608,69 +608,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' ---- - - - - 获取当前用户的会话列表,默认返回最近的 20 条。 - - ### Query - - - - 当前页最后面一条记录的 ID,默认 none - - - 一次请求返回多少条记录 - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - - - - - - - ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/conversations?user=abc-123&last_id=&limit=20' \ - --header 'Authorization: Bearer {api_key}' - ``` - - - - - ```json {{ title: 'Response' }} - { - "limit": 20, - "has_more": false, - "data": [ - { - "id": "10799fb8-64f7-4296-bbf7-b42bfbe0ae54", - "name": "New chat", - "inputs": { - "book": "book", - "myName": "Lucy" - }, - "status": "normal", - "created_at": 1679667915 - }, - { - "id": "hSIhXBhNe8X1d8Et" - // ... - } - ] - } - ``` - - - - --- - + ```bash {{ title: 'cURL' }} curl -X DELETE '${props.appDetail.api_base_url}/conversations/{convsation_id}' \ @@ -803,7 +740,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' --- - + ```bash {{ title: 'cURL' }} - curl -X POST '${props.appDetail.api_base_url}/conversations/{conversation_id}/name' \ + curl -X POST '${props.appDetail.api_base_url}/conversations/:conversation_id/name' \ --header 'Authorization: Bearer {api_key}' \ --header 'Content-Type: application/json' \ --data-raw '{