A I Hub Knowledge Base
Create documents from files
This API is based on existing knowledge and creates a new document through text based on this Knowledge.
Authorization
bearerAuth AuthorizationBearer <token>
JWT access token returned by Signing In (POST /auth/v1/tokens/).
In: header
Path Parameters
dataset_id*string
Knowledge ID
Request Body
application/json
original_document_id?string
Source document ID (optional)
process_rule?
File processing rules
indexing_technique?string
- "high_quality": embedding using embedding model, built as vector database index. 2. "economy": Build using inverted index of Keyword Table Index
file?string
Files that need to be uploaded.
Format
jsonResponse Body
application/json
application/json
curl -X POST "https://example.com/datasets/string/document/create_by_file" \ -H "Content-Type: application/json" \ -d '{}'"{\n \"document\": {\n \"id\": \"\",\n \"position\": 1,\n \"data_source_type\": \"upload_file\",\n \"data_source_info\": {\n \"upload_file_id\": \"\"\n },\n \"dataset_process_rule_id\": \"\",\n \"name\": \"text.txt\",\n \"created_from\": \"api\",\n \"created_by\": \"\",\n \"created_at\": 1695690280,\n \"tokens\": 0,\n \"indexing_status\": \"waiting\",\n \"error\": null,\n \"enabled\": true,\n \"disabled_at\": null,\n \"disabled_by\": null,\n \"archived\": false,\n \"display_status\": \"queuing\",\n \"word_count\": 0,\n \"hit_count\": 0,\n \"doc_form\": \"text_model\"\n },\n \"batch\": \"\"\n}\n"Knowledge document list GET
This API fetches a list of all documents within a specified knowledge base, providing details such as document names, IDs, upload dates, and statuses for easy management and reference.
Create a document from text POST
This api is based on an existing Knowledge and creates a new document through text based on this Knowledge.