|
@@ -935,7 +935,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
|
|
|
|
|
|
### Request Body
|
|
|
<Properties>
|
|
|
- <Property name='segments' type='object list' key='segments'>
|
|
|
+ <Property name='segment' type='object list' key='segment'>
|
|
|
- <code>content</code> (text) text content/question content,required
|
|
|
- <code>answer</code> (text) Answer content, not required, passed if the Knowledge is in qa mode
|
|
|
- <code>keywords</code> (list) keyword, not required
|
|
@@ -948,13 +948,13 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
|
|
|
title="Request"
|
|
|
tag="POST"
|
|
|
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}}'`}
|
|
|
+ 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 '{\"segment\": {\"content\": \"1\",\"answer\": \"1\", \"keywords\": [\"a\"], \"enabled\": false}}'`}
|
|
|
>
|
|
|
```bash {{ title: 'cURL' }}
|
|
|
curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \
|
|
|
--header 'Content-Type: application/json' \
|
|
|
--data-raw '{
|
|
|
- "segments": {
|
|
|
+ "segment": {
|
|
|
"content": "1",
|
|
|
"answer": "1",
|
|
|
"keywords": ["a"],
|