From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +0800
Subject: [PATCH] 修改
---
app/components/develop/template/template_advanced_chat.zh.mdx | 541 -----------------------------------------------------
1 files changed, 9 insertions(+), 532 deletions(-)
diff --git a/app/components/develop/template/template_advanced_chat.zh.mdx b/app/components/develop/template/template_advanced_chat.zh.mdx
index 9077f54..8d181d7 100644
--- a/app/components/develop/template/template_advanced_chat.zh.mdx
+++ b/app/components/develop/template/template_advanced_chat.zh.mdx
@@ -88,9 +88,6 @@
### ChatCompletionResponse
杩斿洖瀹屾暣鐨� App 缁撴灉锛宍Content-Type` 涓� `application/json`銆�
- - `event` (string) 浜嬩欢绫诲瀷锛屽浐瀹氫负 `message`
- - `task_id` (string) 浠诲姟 ID锛岀敤浜庤姹傝窡韪拰涓嬫柟鐨勫仠姝㈠搷搴旀帴鍙�
- - `id` (string) 鍞竴ID
- `message_id` (string) 娑堟伅鍞竴 ID
- `conversation_id` (string) 浼氳瘽 ID
- `mode` (string) App 妯″紡锛屽浐瀹氫负 chat
@@ -256,8 +253,6 @@
```json {{ title: 'Response' }}
{
"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",
@@ -305,8 +300,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": ""}
@@ -494,71 +489,6 @@
---
<Heading
- url='/app/feedbacks'
- method='GET'
- title='鑾峰彇APP鐨勬秷鎭偣璧炲拰鍙嶉'
- name='#app-feedbacks'
-/>
-<Row>
- <Col>
- 鑾峰彇搴旂敤鐨勭粓绔敤鎴峰弽棣堛�佺偣璧炪��
-
- ### Query
- <Properties>
- <Property name='page' type='string' key='page'>
- 锛堥�夊~锛夊垎椤碉紝榛樿鍊硷細1
- </Property>
- </Properties>
-
- <Properties>
- <Property name='limit' type='string' key='limit'>
- 锛堥�夊~锛夋瘡椤垫暟閲忥紝榛樿鍊硷細20
- </Property>
- </Properties>
-
- ### Response
- - `data` (List) 杩斿洖璇PP鐨勭偣璧炪�佸弽棣堝垪琛ㄣ��
- </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'
method='GET'
title='鑾峰彇涓嬩竴杞缓璁棶棰樺垪琛�'
@@ -588,7 +518,7 @@
<CodeGroup title="Request" tag="GET" label="/messages/{message_id}/suggested" targetCode={`curl --location --request GET '${props.appDetail.api_base_url}/messages/{message_id}/suggested?user=abc-123 \\\n--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \\\n--header 'Content-Type: application/json'`}>
```bash {{ title: 'cURL' }}
- curl --location --request GET '${props.appDetail.api_base_url}/messages/{message_id}/suggested?user=abc-123' \
+ curl --location --request GET '${props.appDetail.api_base_url}/messages/{message_id}/suggested'?user=abc-123 \
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
--header 'Content-Type: application/json' \
```
@@ -864,8 +794,10 @@
</CodeGroup>
<CodeGroup title="Response">
- ```text {{ title: 'Response' }}
- 204 No Content
+ ```json {{ title: 'Response' }}
+ {
+ "result": "success"
+ }
```
</CodeGroup>
</Col>
@@ -945,106 +877,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'>
- 锛堥�夊~锛夊綋鍓嶉〉鏈�鍚庨潰涓�鏉¤褰曠殑 ID锛岄粯璁� null
- </Property>
- <Property name='limit' type='int' key='limit'>
- 锛堥�夊~锛変竴娆¤姹傝繑鍥炲灏戞潯璁板綍锛岄粯璁� 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='璇煶杞枃瀛�'
@@ -1105,7 +937,7 @@
### Request Body
<Properties>
- <Property name='message_id' type='str' key='message_id'>
+ <Property name='message_id' type='str' key='text'>
Dify 鐢熸垚鐨勬枃鏈秷鎭紝閭d箞鐩存帴浼犻�掔敓鎴愮殑message-id 鍗冲彲锛屽悗鍙颁細閫氳繃 message_id 鏌ユ壘鐩稿簲鐨勫唴瀹圭洿鎺ュ悎鎴愯闊充俊鎭�傚鏋滃悓鏃朵紶 message_id 鍜� text锛屼紭鍏堜娇鐢� message_id銆�
</Property>
<Property name='text' type='str' key='text'>
@@ -1130,7 +962,7 @@
"user": "abc-123"
}'
```
-
+
</CodeGroup>
<CodeGroup title="headers">
@@ -1322,361 +1154,6 @@
"content": "\ud83d\ude01"
}
}
- }
- ```
- </CodeGroup>
- </Col>
-</Row>
----
-
-<Heading
- url='/site'
- method='GET'
- title='鑾峰彇搴旂敤 WebApp 璁剧疆'
- name='#site'
-/>
-<Row>
- <Col>
- 鐢ㄤ簬鑾峰彇搴旂敤鐨� WebApp 璁剧疆
- ### Response
- - `title` (string) WebApp 鍚嶇О
- - `chat_color_theme` (string) 鑱婂ぉ棰滆壊涓婚, hex 鏍煎紡
- - `chat_color_theme_inverted` (bool) 鑱婂ぉ棰滆壊涓婚鏄惁鍙嶈浆
- - `icon_type` (string) 鍥炬爣绫诲瀷, `emoji`-琛ㄦ儏, `image`-鍥剧墖
- - `icon` (string) 鍥炬爣, 濡傛灉鏄� `emoji` 绫诲瀷, 鍒欐槸 emoji 琛ㄦ儏绗﹀彿, 濡傛灉鏄� `image` 绫诲瀷, 鍒欐槸鍥剧墖 URL
- - `icon_background` (string) hex 鏍煎紡鐨勮儗鏅壊
- - `icon_url` (string) 鍥炬爣 URL
- - `description` (string) 鎻忚堪
- - `copyright` (string) 鐗堟潈淇℃伅
- - `privacy_policy` (string) 闅愮鏀跨瓥閾炬帴
- - `custom_disclaimer` (string) 鑷畾涔夊厤璐e0鏄�
- - `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>
-___
-
-<Heading
- url='/apps/annotations'
- method='GET'
- title='鑾峰彇鏍囨敞鍒楄〃'
- name='#annotation_list'
-/>
-<Row>
- <Col>
- ### Query
- <Properties>
- <Property name='page' type='string' key='page'>
- 椤电爜
- </Property>
- <Property name='limit' type='string' key='limit'>
- 姣忛〉鏁伴噺
- </Property>
- </Properties>
- </Col>
- <Col sticky>
- <CodeGroup
- title="Request"
- tag="GET"
- label="/apps/annotations"
- targetCode={`curl --location --request GET '${props.appDetail.api_base_url}/apps/annotations?page=1&limit=20' \\\n--header 'Authorization: Bearer {api_key}'`}
- >
- ```bash {{ title: 'cURL' }}
- curl --location --request GET '${props.appDetail.api_base_url}/apps/annotations?page=1&limit=20' \
- --header 'Authorization: Bearer {api_key}'
- ```
- </CodeGroup>
-
- <CodeGroup title="Response">
- ```json {{ title: 'Response' }}
- {
- "data": [
- {
- "id": "69d48372-ad81-4c75-9c46-2ce197b4d402",
- "question": "What is your name?",
- "answer": "I am Dify.",
- "hit_count": 0,
- "created_at": 1735625869
- }
- ],
- "has_more": false,
- "limit": 20,
- "total": 1,
- "page": 1
- }
- ```
- </CodeGroup>
- </Col>
-</Row>
----
-
-<Heading
- url='/apps/annotations'
- method='POST'
- title='鍒涘缓鏍囨敞'
- name='#create_annotation'
-/>
-<Row>
- <Col>
- ### Query
- <Properties>
- <Property name='question' type='string' key='question'>
- 闂
- </Property>
- <Property name='answer' type='string' key='answer'>
- 绛旀鍐呭
- </Property>
- </Properties>
- </Col>
- <Col sticky>
- <CodeGroup
- title="Request"
- tag="POST"
- label="/apps/annotations"
- targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/apps/annotations' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"question": "What is your name?","answer": "I am Dify."}'`}
- >
- ```bash {{ title: 'cURL' }}
- curl --location --request POST '${props.appDetail.api_base_url}/apps/annotations' \
- --header 'Authorization: Bearer {api_key}' \
- --header 'Content-Type: application/json' \
- --data-raw '{
- "question": "What is your name?",
- "answer": "I am Dify."
- }'
- ```
- </CodeGroup>
-
- <CodeGroup title="Response">
- ```json {{ title: 'Response' }}
- {
- "id": "69d48372-ad81-4c75-9c46-2ce197b4d402",
- "question": "What is your name?",
- "answer": "I am Dify.",
- "hit_count": 0,
- "created_at": 1735625869
- }
- ```
- </CodeGroup>
- </Col>
-</Row>
----
-
-<Heading
- url='/apps/annotations/{annotation_id}'
- method='PUT'
- title='鏇存柊鏍囨敞'
- name='#update_annotation'
-/>
-<Row>
- <Col>
- ### Query
- <Properties>
- <Property name='annotation_id' type='string' key='annotation_id'>
- 鏍囨敞 ID
- </Property>
- <Property name='question' type='string' key='question'>
- 闂
- </Property>
- <Property name='answer' type='string' key='answer'>
- 绛旀鍐呭
- </Property>
- </Properties>
- </Col>
- <Col sticky>
- <CodeGroup
- title="Request"
- tag="PUT"
- label="/apps/annotations/{annotation_id}"
- targetCode={`curl --location --request PUT '${props.appDetail.api_base_url}/apps/annotations/{annotation_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"question": "What is your name?","answer": "I am Dify."}'`}
- >
- ```bash {{ title: 'cURL' }}
- curl --location --request PUT '${props.appDetail.api_base_url}/apps/annotations/{annotation_id}' \
- --header 'Authorization: Bearer {api_key}' \
- --header 'Content-Type: application/json' \
- --data-raw '{
- "question": "What is your name?",
- "answer": "I am Dify."
- }'
- ```
- </CodeGroup>
-
- <CodeGroup title="Response">
- ```json {{ title: 'Response' }}
- {
- "id": "69d48372-ad81-4c75-9c46-2ce197b4d402",
- "question": "What is your name?",
- "answer": "I am Dify.",
- "hit_count": 0,
- "created_at": 1735625869
- }
- ```
- </CodeGroup>
- </Col>
-</Row>
----
-
-<Heading
- url='/apps/annotations/{annotation_id}'
- method='DELETE'
- title='鍒犻櫎鏍囨敞'
- name='#delete_annotation'
-/>
-<Row>
- <Col>
- ### Query
- <Properties>
- <Property name='annotation_id' type='string' key='annotation_id'>
- 鏍囨敞 ID
- </Property>
- </Properties>
- </Col>
- <Col sticky>
- <CodeGroup
- title="Request"
- tag="PUT"
- label="/apps/annotations/{annotation_id}"
- targetCode={`curl --location --request DELETE '${props.appDetail.api_base_url}/apps/annotations/{annotation_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'`}
- >
- ```bash {{ title: 'cURL' }}
- curl --location --request DELETE '${props.appDetail.api_base_url}/apps/annotations/{annotation_id}' \
- --header 'Authorization: Bearer {api_key}'
- ```
- </CodeGroup>
-
- <CodeGroup title="Response">
- ```text {{ title: 'Response' }}
- 204 No Content
- ```
- </CodeGroup>
- </Col>
-</Row>
----
-
-<Heading
- url='/apps/annotation-reply/{action}'
- method='POST'
- title='鏍囨敞鍥炲鍒濆璁剧疆'
- name='#initial_annotation_reply_settings'
-/>
-<Row>
- <Col>
- ### Query
- <Properties>
- <Property name='action' type='string' key='action'>
- 鍔ㄤ綔锛屽彧鑳芥槸 'enable' 鎴� 'disable'
- </Property>
- <Property name='embedding_provider_name' type='string' key='embedding_provider_name'>
- 鎸囧畾鐨勫祵鍏ユā鍨嬫彁渚涘晢, 蹇呴』鍏堝湪绯荤粺鍐呰瀹氬ソ鎺ュ叆鐨勬ā鍨嬶紝瀵瑰簲鐨勬槸provider瀛楁
- </Property>
- <Property name='embedding_model_name' type='string' key='embedding_model_name'>
- 鎸囧畾鐨勫祵鍏ユā鍨嬶紝瀵瑰簲鐨勬槸model瀛楁
- </Property>
- <Property name='score_threshold' type='number' key='score_threshold'>
- 鐩镐技搴﹂槇鍊硷紝褰撶浉浼煎害澶т簬璇ラ槇鍊兼椂锛岀郴缁熶細鑷姩鍥炲锛屽惁鍒欎笉鍥炲
- </Property>
- </Properties>
- </Col>
- <Col sticky>
- 宓屽叆妯″瀷鐨勬彁渚涘晢鍜屾ā鍨嬪悕绉板彲浠ラ�氳繃浠ヤ笅鎺ュ彛鑾峰彇锛歷1/workspaces/current/models/model-types/text-embedding锛� 鍏蜂綋瑙侊細閫氳繃 API 缁存姢鐭ヨ瘑搴撱�� 浣跨敤鐨凙uthorization鏄疍ataset鐨凙PI Token銆�
- <CodeGroup
- title="Request"
- tag="POST"
- label="/apps/annotation-reply/{action}"
- targetCode={`curl --location --request POST '${props.appDetail.api_base_url}/apps/annotation-reply/{action}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"score_threshold": 0.9, "embedding_provider_name": "zhipu", "embedding_model_name": "embedding_3"}'`}
- >
- ```bash {{ title: 'cURL' }}
- curl --location --request POST 'https://api.dify.ai/v1/apps/annotation-reply/{action}' \
- --header 'Authorization: Bearer {api_key}' \
- --header 'Content-Type: application/json' \
- --data-raw '{
- "score_threshold": 0.9,
- "embedding_provider_name": "zhipu",
- "embedding_model_name": "embedding_3"
- }'
- ```
- </CodeGroup>
-
- <CodeGroup title="Response">
- ```json {{ title: 'Response' }}
- {
- "job_id": "b15c8f68-1cf4-4877-bf21-ed7cf2011802",
- "job_status": "waiting"
- }
- ```
- </CodeGroup>
- 璇ユ帴鍙f槸寮傛鎵ц锛屾墍浠ヤ細杩斿洖涓�涓猨ob_id锛岄�氳繃鏌ヨjob鐘舵�佹帴鍙e彲浠ヨ幏鍙栧埌鏈�缁堢殑鎵ц缁撴灉銆�
- </Col>
-</Row>
----
-
-<Heading
- url='/apps/annotation-reply/{action}/status/{job_id}'
- method='GET'
- title='鏌ヨ鏍囨敞鍥炲鍒濆璁剧疆浠诲姟鐘舵��'
- name='#initial_annotation_reply_settings_task_status'
-/>
-<Row>
- <Col>
- ### Query
- <Properties>
- <Property name='action' type='string' key='action'>
- 鍔ㄤ綔锛屽彧鑳芥槸 'enable' 鎴� 'disable'锛屽苟涓斿繀椤诲拰鏍囨敞鍥炲鍒濆璁剧疆鎺ュ彛鐨勫姩浣滀竴鑷�
- </Property>
- <Property name='job_id' type='string' key='job_id'>
- 浠诲姟 ID锛屼粠鏍囨敞鍥炲鍒濆璁剧疆鎺ュ彛杩斿洖鐨� job_id
- </Property>
- </Properties>
- </Col>
- <Col sticky>
- <CodeGroup
- title="Request"
- tag="GET"
- label="/apps/annotations"
- targetCode={`curl --location --request GET '${props.appDetail.api_base_url}/apps/annotation-reply/{action}/status/{job_id}' \\\n--header 'Authorization: Bearer {api_key}'`}
- >
- ```bash {{ title: 'cURL' }}
- curl --location --request GET '${props.appDetail.api_base_url}/apps/annotation-reply/{action}/status/{job_id}' \
- --header 'Authorization: Bearer {api_key}'
- ```
- </CodeGroup>
-
- <CodeGroup title="Response">
- ```json {{ title: 'Response' }}
- {
- "job_id": "b15c8f68-1cf4-4877-bf21-ed7cf2011802",
- "job_status": "waiting",
- "error_msg": ""
}
```
</CodeGroup>
--
Gitblit v1.8.0