2.5.1-Paragraph Text Knowledge Upload
1. Overview
Interface name: Paragraph text knowledge import
Version number: v1.0.0
2. Information
Request method: POST
Request URL: https://DOMAIN/openapi/v1/knowledge/text/
Domain: Refer to "Service address description"
3. Request parameters
Request header http header field:
Content-Type
string
Yes
Fixedapplication/json
cybertron-robot-key
string
Yes
Robot key
cybertron-robot-token
string
Yes
Robot token
Request body field:
username
string
Yes
User account
knowledge_base_id
string
Yes
Knowledge Base id
folder_id
string
Yes
Folder id needs to be imported
text_content
string
Yes
Paragraph text
knowledge_image
array
No
Knowledge-related pictures (returned image name is required through the uploading platform for the image upload interface)
knowledge_attachment
array
No
Knowledge-related attachments
4. Response field description
HTTP status code: 200 OK
Response field description:
code
string
"000000" is normal, other exceptions
message
string
Status description
data
object
message body
id
int
paragraph text id
5. Example
Request Example:
curl 'https://_DOMAIN_/openapi/v1/knowledge/text/' \
-H 'Content-Type: application/json' \
-H 'cybertron-robot-key: l8ia2IOc************Z724%2BU%3D' \
-H 'cybertron-robot-token: MTc0Mzk5************************************************cGRCUTg9' \
-X POST -d '{
"username": "me@host.com",
"knowledge_base_id": "324",
"folder_id": "2902",
"text_content": "****Return**[[--ContentED.LRyG4bM8gq7xI9cnNfEsX5||2022 Foreign Currency Exchange Discount Activities Overview||KM1109505||Article--]]**\n---\n**Abstract**\nThis article introduces the discount details of 2Q liquid financial management or online financial management foreign exchange transactions in 2022 effective from April 1 - June 30, 2022.\n**Detailed information**\n**Promotion period**|\n* April 1 - June 30, 2022\n",
"knowledge_image": [
"172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg"
],
"knowledge_attachment": [
"172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg"
]
}'Response example:
{
"code": "000000",
"message": "The data has been imported and is being studied...",
"data": {
"id": 3033,
"response_create_time": "2024-07-24 16:57",
"response_update_time": "2024-07-24 16:57",
"response_knowledge_provider": "zhengdong.zhou",
"response_editor": null,
"response_data_source": "Manual entry",
"response_knowledge_image": [
"api/app/cybertron/knowledge_file/image/knowledge/paragraph_text_img/172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg"
],
"text_content": "****Return**[[--ContentED.LRyG4bM8gq7xI9cnNfEsX5||2022 Foreign Currency Exchange Discount Activities Overview||KM1109505||Article--]]**\n---\n**Abstract**\nThis article introduces the discount details of 2Q liquid financial management or online financial management foreign exchange transactions in 2022 effective from April 1 - June 30, 2022.\n**Detailed information**\n**Promotion period**|\n* April 1 - June 30, 2022\n",
"data_source": 1,
"create_time": "2024-07-24 16:57:31",
"update_time": "2024-07-24 16:57:31",
"knowledge_image": "{\"172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg\": \"172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg\"}",
"emb_status": 1,
"folder": "2902",
"knowledge_base": 324,
"knowledge_provider": 61,
"editor": null
}
}Last updated