Knowledge base version operation
Function
Definition:
Knowledge base version management, version status and operation table:
Rebuild | Enable | Disable | Delete | Activate | Update | |
---|---|---|---|---|---|---|
In use | 1 | 1 | ||||
Available | 1 | 1 | 1 | 1 | 1 | |
Disabled | 1 | 1 | 1 |
If the version status is In use, the version can be rebuilt or updated.
If the version status is Available, the version can be rebuilt, disabled, deleted, activated, or updated.
If the version status is Disabled, the version can be enabled, deleted, or updated.
Value range:
N/A
URI
POST /v1/{project_id}/applications/{application_id}/uni-search/knowledge-repo/{repo_id}/versions/{version_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints: N/A Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
application_id |
Yes |
String |
Definition: Application ID. For details about how to obtain the application ID, see Obtaining an Application ID. Constraints: Character string Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
repo_id |
Yes |
String |
Definition: Knowledge base ID. How to obtain: Log in to the KooSearch experience platform. In the navigation tree on the left, choose Knowledge Bases to view knowledge base IDs. Each knowledge base has a unique ID stored in the vector database. Constraints: N/A Value range: Length: 1 to 64 characters. The value can contain only digits, letters, hyphens (-), and underscores (_). Default value: N/A |
version_id |
Yes |
String |
Definition: Knowledge base version ID. The value is a string of 1 to 64 characters, including only digits, letters, hyphens (-), and underscores (_). How to obtain: Log in to the KooSearch experience platform using a valid account. In the navigation pane on the left, choose Knowledge Base Management. Click the target knowledge base and click the Version Management tab. On the displayed page, obtain the value of Version ID, which uniquely identifies the knowledge base version. Constraints: N/A Value range: N/A Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
operation |
Yes |
String |
Definition: Knowledge base version operation. Constraints: N/A Value range:
Default value: N/A |
name |
No |
String |
Definition: Version name, which is mandatory for rebuilding. Constraints: N/A Value range: The value can contain 1 to 64 characters. It can only contain letters, digits, hyphens (-), and underscores (_), and must start with a letter or digit. Default value: N/A |
detail |
No |
String |
Definition: Knowledge base description, which can be rebuilt or updated. Constraints: N/A Value range: N/A Default value: N/A |
options |
No |
Definition: Version rebuilding options: source: Rebuild source. The value can be index or file (documents). Default value: file parser: Document parsing rule settings, which take effect when the rebuild source is file. The value can be inherit or latest. Default value: inherit active: Activate immediately. Value type: Boolean. Default value: false if the rebuild source is index; true if the rebuild source is file. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
source |
No |
String |
Definition: Rebuild source. Constraints: N/A Value range:
Default value: file |
parser |
No |
String |
Definition: Document parsing rule settings, which take effect when the rebuild source is file. Constraints: N/A Value range:
Default value: inherit |
active |
No |
Boolean |
Definition: Activate immediately. Constraints: N/A Value range: N/A Default value: false if the rebuild source is index; true if the rebuild source is file. |
embedding_model |
No |
String |
Definition: The embedding model name is selected from the embedding model set used during version rebuilding. If the version is not rebuilt, the embedding model of the knowledge base is used. Constraints: This parameter is supported only in clusters 25.7.T1 or later. Value range: The length of the embedding model name cannot exceed 32 characters. Default value: The value is the same as the value of embedding_model of the corresponding knowledge base. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
version_id |
String |
Definition: Version ID. If the rebuild operation is performed, the new index is returned. Value range: N/A |
Example Requests
Knowledge base version operation.
/v1/{project_id}/applications/{application_id}/uni-search/knowledge-repo/{repo_id}/versions//{version_id} { "operation" : "reindex", "name" : "chy_new", "detail" : "", "options" : { "embedding_model" : "embedding-zh-r3", "source" : "index", "active" : true } }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
Response body for modifying knowledge base version information. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot