A I Hub Knowledge Base
Create a document from text
This api is based on an 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
name*string
Document name
text*string
Document content
indexing_technique?string
- "high_quality": embedding using embedding model, built as vector database index. 2. "economy": Build using inverted index of Keyword Table Index
process_rule?
File processing rules
Response Body
application/json
application/json
curl -X POST "https://example.com/datasets/string/document/create_by_text" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "text": "string" }'"{\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"Create documents from files POST
This API is based on existing knowledge and creates a new document through text based on this Knowledge.
Delete knowledge DELETE
This API allows users to remove a specified knowledge base permanently. It ensures that all associated data within the knowledge base is deleted, streamlining data management and maintaining a clean workspace.