From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001
From: wwf <yearningwang@iqtogether.com>
Date: 星期三, 04 六月 2025 15:17:49 +0800
Subject: [PATCH] 初始化

---
 app/components/develop/template/template_advanced_chat.ja.mdx |  243 +-----------------------------------------------
 1 files changed, 8 insertions(+), 235 deletions(-)

diff --git a/app/components/develop/template/template_advanced_chat.ja.mdx b/app/components/develop/template/template_advanced_chat.ja.mdx
index 75c69a4..08255b8 100644
--- a/app/components/develop/template/template_advanced_chat.ja.mdx
+++ b/app/components/develop/template/template_advanced_chat.ja.mdx
@@ -88,9 +88,6 @@
 
     ### ChatCompletionResponse
     瀹屽叏銇偄銉椼儶绲愭灉銈掕繑銇椼伨銇欍�俙Content-Type`銇痐application/json`銇с仚銆�
-    - `event` (string) 銈ゃ儥銉炽儓銈裤偆銉椼�佸浐瀹氥仹 `message`
-    - `task_id` (string) 銈裤偣銈疘D銆併儶銈偍銈广儓杩借贰銇ㄤ互涓嬨伄Stop Generate API銇娇鐢�
-    - `id` (string) 銉︺儖銉笺偗ID
     - `message_id` (string) 涓�鎰忋伄銉°儍銈汇兗銈窱D
     - `conversation_id` (string) 浼氳┍ID
     - `mode` (string) 銈€儣銉儮銉笺儔銆乣chat`銇ㄣ仐銇﹀浐瀹�
@@ -246,8 +243,6 @@
     ```json {{ title: '蹇滅瓟' }}
     {
         "event": "message",
-        "task_id": "c3800678-a077-43df-a102-53f23ed20b88", 
-        "id": "9da23599-e713-473b-982c-4328d4f5c78a",
         "message_id": "9da23599-e713-473b-982c-4328d4f5c78a",
         "conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2",
         "mode": "chat",
@@ -295,8 +290,8 @@
       data: {"event": "message", "message_id": "5ad4cb98-f0c7-4085-b384-88c403be6290", "conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2", "answer": "'m", "created_at": 1679586595}
       data: {"event": "message", "message_id": "5ad4cb98-f0c7-4085-b384-88c403be6290", "conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2", "answer": " glad", "created_at": 1679586595}
       data: {"event": "message", "message_id": "5ad4cb98-f0c7-4085-b384-88c403be6290", "conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2", "answer": " to", "created_at": 1679586595}
-      data: {"event": "message", "message_id" : "5ad4cb98-f0c7-4085-b384-88c403be6290", "conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2", "answer": " meet", "created_at": 1679586595}
-      data: {"event": "message", "message_id" : "5ad4cb98-f0c7-4085-b384-88c403be6290", "conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2", "answer": " you", "created_at": 1679586595}
+      data: {"event": "message", "message_id": : "5ad4cb98-f0c7-4085-b384-88c403be6290", "conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2", "answer": " meet", "created_at": 1679586595}
+      data: {"event": "message", "message_id": : "5ad4cb98-f0c7-4085-b384-88c403be6290", "conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2", "answer": " you", "created_at": 1679586595}
       data: {"event": "message_end", "id": "5e52ce04-874b-4d27-9045-b3bc80def685", "conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2", "metadata": {"usage": {"prompt_tokens": 1033, "prompt_unit_price": "0.001", "prompt_price_unit": "0.001", "prompt_price": "0.0010330", "completion_tokens": 135, "completion_unit_price": "0.002", "completion_price_unit": "0.001", "completion_price": "0.0002700", "total_tokens": 1168, "total_price": "0.0013030", "currency": "USD", "latency": 1.381760165997548}, "retriever_resources": [{"position": 1, "dataset_id": "101b4c97-fc2e-463c-90b1-5261a4cdcafb", "dataset_name": "iPhone", "document_id": "8dd1ad74-0b5f-4175-b735-7d98bbbb4e00", "document_name": "iPhone List", "segment_id": "ed599c7f-2766-4294-9d1d-e5235a61270a", "score": 0.98457545, "content": "\"Model\",\"Release Date\",\"Display Size\",\"Resolution\",\"Processor\",\"RAM\",\"Storage\",\"Camera\",\"Battery\",\"Operating System\"\n\"iPhone 13 Pro Max\",\"September 24, 2021\",\"6.7 inch\",\"1284 x 2778\",\"Hexa-core (2x3.23 GHz Avalanche + 4x1.82 GHz Blizzard)\",\"6 GB\",\"128, 256, 512 GB, 1TB\",\"12 MP\",\"4352 mAh\",\"iOS 15\""}]}}
       data: {"event": "tts_message", "conversation_id": "23dd85f3-1a41-4ea0-b7a9-062734ccfaf9", "message_id": "a8bdc41c-13b2-4c18-bfd9-054b9803038c", "created_at": 1721205487, "task_id": "3bf8a0bb-e73b-4690-9e66-4e429bad8ee7", "audio": "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"}
       data: {"event": "tts_message_end", "conversation_id": "23dd85f3-1a41-4ea0-b7a9-062734ccfaf9", "message_id": "a8bdc41c-13b2-4c18-bfd9-054b9803038c", "created_at": 1721205487, "task_id": "3bf8a0bb-e73b-4690-9e66-4e429bad8ee7", "audio": ""}
@@ -486,70 +481,6 @@
 </Row>
 
 ---
-
-<Heading
-  url='/app/feedbacks'
-  method='GET'
-  title='銈€儣銉伄銉°儍銈汇兗銈搞伄銆屻亜銇勩伃銆嶃仺銉曘偅銉笺儔銉愩儍銈倰鍙栧緱'
-  name='#app-feedbacks'
-/>
-<Row>
-  <Col>
-    銈€儣銉伄銈ㄣ兂銉夈儲銉笺偠銉笺亱銈夈伄銉曘偅銉笺儔銉愩儍銈倓銆屻亜銇勩伃銆嶃倰鍙栧緱銇椼伨銇欍��
-
-    ### 銈偍銉�
-    <Properties>
-      <Property name='page' type='string' key='page'>
-       锛堜换鎰忥級銉氥兗銈哥暘鍙枫�傘儑銉曘偐銉儓鍊わ細1
-      </Property>
-    </Properties>
-
-    <Properties>
-      <Property name='limit' type='string' key='limit'>
-       锛堜换鎰忥級1銉氥兗銈搞亗銇熴倞銇欢鏁般�傘儑銉曘偐銉儓鍊わ細20
-      </Property>
-    </Properties>
-
-    ### 銉偣銉濄兂銈�
-    - `data` (銉偣銉�) 銇撱伄銈€儣銉伄銆屻亜銇勩伃銆嶃仺銉曘偅銉笺儔銉愩儍銈伄涓�瑕с倰杩斻仐銇俱仚銆�
-  </Col>
-  <Col sticky>
-
-    <CodeGroup title="Request" tag="GET" label="/app/feedbacks" targetCode={`curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20'`}>
-
-    ```bash {{ title: 'cURL' }}
-    curl -X GET '${props.appDetail.api_base_url}/app/feedbacks?page=1&limit=20' \
-    --header 'Authorization: Bearer {api_key}' \
-    --header 'Content-Type: application/json'
-    ```
-
-    </CodeGroup>
-
-    <CodeGroup title="Response">
-    ```json {{ title: 'Response' }}
-        {
-        "data": [
-            {
-                "id": "8c0fbed8-e2f9-49ff-9f0e-15a35bdd0e25",
-                "app_id": "f252d396-fe48-450e-94ec-e184218e7346",
-                "conversation_id": "2397604b-9deb-430e-b285-4726e51fd62d",
-                "message_id": "709c0b0f-0a96-4a4e-91a4-ec0889937b11",
-                "rating": "like",
-                "content": "message feedback information-3",
-                "from_source": "user",
-                "from_end_user_id": "74286412-9a1a-42c1-929c-01edb1d381d5",
-                "from_account_id": null,
-                "created_at": "2025-04-24T09:24:38",
-                "updated_at": "2025-04-24T09:24:38"
-            }
-        ]
-        }
-    ```
-    </CodeGroup>
-  </Col>
-</Row>
----
-
 
 <Heading
   url='/messages/{message_id}/suggested'
@@ -828,8 +759,10 @@
     </CodeGroup>
 
     <CodeGroup title="蹇滅瓟">
-    ```text {{ title: '蹇滅瓟' }}
-    204 No Content
+    ```json {{ title: '蹇滅瓟' }}
+    {
+      "result": "success"
+    }
     ```
     </CodeGroup>
   </Col>
@@ -907,106 +840,6 @@
 ---
 
 <Heading
-  url='/conversations/:conversation_id/variables'
-  method='GET'
-  title='浼氳┍澶夋暟銇彇寰�'
-  name='#conversation-variables'
-/>
-<Row>
-  <Col>
-    鐗瑰畾銇細瑭便亱銈夊鏁般倰鍙栧緱銇椼伨銇欍�傘亾銇偍銉炽儔銉濄偆銉炽儓銇�佷細瑭变腑銇彇寰椼仌銈屻仧妲嬮�犲寲銉囥兗銈裤倰鎶藉嚭銇欍倠銇伀褰圭珛銇°伨銇欍��
-
-    ### 銉戙偣銉戙儵銉°兗銈�
-
-    <Properties>
-      <Property name='conversation_id' type='string' key='conversation_id'>
-        澶夋暟銈掑彇寰椼仚銈嬩細瑭便伄ID銆�
-      </Property>
-    </Properties>
-
-    ### 銈偍銉儜銉┿儭銉笺偪
-
-    <Properties>
-      <Property name='user' type='string' key='user'>
-        銉︺兗銈躲兗璀樺垾瀛愩�傞枊鐧鸿�呫伀銈堛仯銇﹀畾缇┿仌銈屻仧銉兗銉伀寰撱亜銆併偄銉椼儶銈便兗銈枫儳銉冲唴銇т竴鎰忋仹銇傘倠蹇呰銇屻亗銈娿伨銇欍��
-      </Property>
-      <Property name='last_id' type='string' key='last_id'>
-          (Optional)鐝惧湪銇儦銉笺偢銇渶寰屻伄瑷橀尣銇甀D銆併儑銉曘偐銉儓銇痭ull銇с仚銆�
-      </Property>
-      <Property name='limit' type='int' key='limit'>
-          (Optional)1鍥炪伄銉偗銈ㄣ偣銉堛仹杩斻仚瑷橀尣銇暟銆併儑銉曘偐銉儓銇渶鏂般伄20浠躲仹銇欍�傛渶澶�100銆佹渶灏�1銆�
-      </Property>
-    </Properties>
-
-    ### 銉偣銉濄兂銈�
-
-    - `limit` (int) 銉氥兗銈搞仈銇ㄣ伄銈€偆銉嗐儬鏁�
-    - `has_more` (bool) 銇曘倝銇偄銈ゃ儐銉犮亴銇傘倠銇嬨仼銇嗐亱
-    - `data` (array[object]) 澶夋暟銇儶銈广儓
-      - `id` (string) 澶夋暟ID
-      - `name` (string) 澶夋暟鍚�
-      - `value_type` (string) 澶夋暟銈裤偆銉楋紙鏂囧瓧鍒椼�佹暟鍊ゃ�佺湡鍋藉�ゃ仾銇╋級
-      - `value` (string) 澶夋暟鍊�
-      - `description` (string) 澶夋暟銇鏄�
-      - `created_at` (int) 浣滄垚銈裤偆銉犮偣銈裤兂銉�
-      - `updated_at` (int) 鏈�绲傛洿鏂般偪銈ゃ儬銈广偪銉炽儣
-
-    ### 銈ㄣ儵銉�
-    - 404, `conversation_not_exists`, 浼氳┍銇岃銇ゃ亱銈娿伨銇涖倱
-
-  </Col>
-  <Col sticky>
-
-    <CodeGroup title="Request" tag="GET" label="/conversations/:conversation_id/variables" targetCode={`curl -X GET '${props.appDetail.api_base_url}/conversations/{conversation_id}/variables?user=abc-123' \\\n--header 'Authorization: Bearer {api_key}'`}>
-
-    ```bash {{ title: 'cURL' }}
-    curl -X GET '${props.appDetail.api_base_url}/conversations/{conversation_id}/variables?user=abc-123' \
-    --header 'Authorization: Bearer {api_key}'
-    ```
-
-    </CodeGroup>
-
-    <CodeGroup title="Request with variable name filter">
-    ```bash {{ title: 'cURL' }}
-    curl -X GET '${props.appDetail.api_base_url}/conversations/{conversation_id}/variables?user=abc-123&variable_name=customer_name' \
-    --header 'Authorization: Bearer {api_key}'
-    ```
-    </CodeGroup>
-
-    <CodeGroup title="Response">
-    ```json {{ title: 'Response' }}
-    {
-      "limit": 100,
-      "has_more": false,
-      "data": [
-        {
-          "id": "variable-uuid-1",
-          "name": "customer_name",
-          "value_type": "string",
-          "value": "John Doe",
-          "description": "浼氳┍銇嬨倝鎶藉嚭銇曘倢銇熼¨瀹㈠悕",
-          "created_at": 1650000000000,
-          "updated_at": 1650000000000
-        },
-        {
-          "id": "variable-uuid-2",
-          "name": "order_details",
-          "value_type": "json",
-          "value": "{\"product\":\"Widget\",\"quantity\":5,\"price\":19.99}",
-          "description": "椤у銇敞鏂囪┏绱�",
-          "created_at": 1650000000000,
-          "updated_at": 1650000000000
-        }
-      ]
-    }
-    ```
-    </CodeGroup>
-  </Col>
-</Row>
-
----
-
-<Heading
   url='/audio-to-text'
   method='POST'
   title='闊冲0銇嬨倝銉嗐偔銈广儓銇�'
@@ -1046,7 +879,7 @@
     </CodeGroup>
 
     <CodeGroup title="蹇滅瓟">
-    ```json {{ title: '蹇滅瓟' }}
+    ```json {{ text: 'hello' }}
     {
       "text": ""
     }
@@ -1070,7 +903,7 @@
     ### 銉偗銈ㄣ偣銉堛儨銉囥偅
 
     <Properties>
-      <Property name='message_id' type='str' key='message_id'>
+      <Property name='message_id' type='str' key='text'>
         Dify銇倛銇c仸鐢熸垚銇曘倢銇熴儐銈偣銉堛儭銉冦偦銉笺偢銇牬鍚堛�佺敓鎴愩仌銈屻仧銉°儍銈汇兗銈窱D銈掔洿鎺ユ浮銇椼伨銇欍�傘儛銉冦偗銈ㄣ兂銉夈伅銉°儍銈汇兗銈窱D銈掍娇鐢ㄣ仐銇﹀蹇溿仚銈嬪唴瀹广倰妞滅储銇椼�侀煶澹版儏鍫便倰鐩存帴鍚堟垚銇椼伨銇欍�俶essage_id銇╰ext銇屽悓鏅傘伀鎻愪緵銇曘倢銈嬪牬鍚堛�乵essage_id銇屽劒鍏堛仌銈屻伨銇欍��
       </Property>
       <Property name='text' type='str' key='text'>
@@ -1303,63 +1136,3 @@
     </CodeGroup>
   </Col>
 </Row>
-
----
-
-<Heading
-  url='/site'
-  method='GET'
-  title='銈€儣銉伄WebApp瑷畾銈掑彇寰�'
-  name='#site'
-/>
-<Row>
-  <Col>
-  銈€儣銉伄WebApp瑷畾銈掑彇寰椼仚銈嬨仧銈併伀浣跨敤銇椼伨銇欍��
-  ### 蹇滅瓟
-  - `title` (string) WebApp鍚�
-  - `chat_color_theme` (string) 銉併儯銉冦儓銇壊銉嗐兗銉炪��16閫叉暟褰㈠紡
-  - `chat_color_theme_inverted` (bool) 銉併儯銉冦儓銇壊銉嗐兗銉炪倰鍙嶈虎銇欍倠銇嬨仼銇嗐亱
-  - `icon_type` (string) 銈€偆銈炽兂銈裤偆銉椼�乣emoji`-绲垫枃瀛椼�乣image`-鐢诲儚
-  - `icon` (string) 銈€偆銈炽兂銆俙emoji`銈裤偆銉椼伄鍫村悎銇档鏂囧瓧銆乣image`銈裤偆銉椼伄鍫村悎銇敾鍍廢RL
-  - `icon_background` (string) 16閫叉暟褰㈠紡銇儗鏅壊
-  - `icon_url` (string) 銈€偆銈炽兂銇甎RL
-  - `description` (string) 瑾槑
-  - `copyright` (string) 钁椾綔妯╂儏鍫�
-  - `privacy_policy` (string) 銉椼儵銈ゃ儛銈枫兗銉濄儶銈枫兗銇儶銉炽偗
-  - `custom_disclaimer` (string) 銈偣銈裤儬鍏嶈铂浜嬮爡
-  - `default_language` (string) 銉囥儠銈┿儷銉堣█瑾�
-  - `show_workflow_steps` (bool) 銉兗銈儠銉兗銇┏绱般倰琛ㄧず銇欍倠銇嬨仼銇嗐亱
-  - `use_icon_as_answer_icon` (bool) WebApp銇偄銈ゃ偝銉炽倰銉併儯銉冦儓鍐呫伄馃銇疆銇嶆彌銇堛倠銇嬨仼銇嗐亱
-  </Col>
-  <Col>
-  <CodeGroup title="Request" tag="POST" label="/meta" targetCode={`curl -X GET '${props.appDetail.api_base_url}/site' \\\n-H 'Authorization: Bearer {api_key}'`}>
-    ```bash {{ title: 'cURL' }}
-    curl -X GET '${props.appDetail.api_base_url}/site' \
-    -H 'Authorization: Bearer {api_key}'
-    ```
-
-    </CodeGroup>
-
-    <CodeGroup title="Response">
-    ```json {{ title: 'Response' }}
-    {
-      "title": "My App",
-      "chat_color_theme": "#ff4a4a",
-      "chat_color_theme_inverted": false,
-      "icon_type": "emoji",
-      "icon": "馃槃",
-      "icon_background": "#FFEAD5",
-      "icon_url": null,
-      "description": "This is my app.",
-      "copyright": "all rights reserved",
-      "privacy_policy": "",
-      "custom_disclaimer": "All generated by AI",
-      "default_language": "en-US",
-      "show_workflow_steps": false,
-      "use_icon_as_answer_icon": false,
-    }
-    ```
-    </CodeGroup>
-  </Col>
-</Row>
-___

--
Gitblit v1.8.0