Updates a document library. You can update the library name, description, and index configuration.
Operation description
Prerequisites
- Alibaba Cloud Model Studio and Tongyi Dianjin are activated.
- You have obtained the workspaceId: Obtain the workspace identifier.
Debugging
You can run this API directly in OpenAPI Explorer, which saves you the trouble of calculating signatures. After the operation succeeds, OpenAPI Explorer can automatically generate SDK code examples.
Try it now
RAM authorization
The following table describes the authorization information for this API. You can use the Action element in RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
- Action: refers to the specific permission point.
- Access level: refers to the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: refers to the resource types that support authorization in the operation. Details are as follows:
- Required resource types are marked with a leading asterisk (*).
- For operations that do not support resource-level authorization,
All Resourcesis used.
- Condition key: refers to the condition keys defined by the cloud service itself.
- Dependent action: refers to other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions before the operation can succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dianjin:UpdateLibrary | update | *All Resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | Workspace ID | llm-xxxxx |
| body | object | No | Request body parameters. | |
| description | string | No | Document library description | Document library description |
| indexSetting | object | No | Document library index configuration | |
| chunkStrategy | object | No | Chunking strategy | |
| docTreeSplit | boolean | No | Layout-based chunking | true |
| docTreeSplitSize | integer | No | Layout-based chunking size | 160 |
| enhanceGraph | boolean | No | Whether to enhance images | true |
| enhanceTable | boolean | No | Whether to enhance tables | true |
| overlap | integer | No | Chunk overlap length | 20 |
| sentenceSplit | boolean | No | Whether to split by sentence: default is true | true |
| sentenceSplitSize | integer | No | Average length for sentence-based splitting | 160 |
| size | integer | No | Fixed-length chunk size | 256 |
| split | boolean | No | Whether to perform chunking | true |
| modelConfig | object | No | Model configuration | |
| temperature | double | No | Temperature | 0.8 |
| topP | double | No | topP | 0.8 |
| promptRoleStyle | string | No | Prompt role style | You are a document analysis expert, skilled at finding key points from given knowledge and answering questions clearly, like a teacher lecturing to students. Your answers are logical, and when facing complex problems, you are good at thinking step by step. |
| queryEnhancer | object | No | Query enhancement | |
| enableFollowUp | boolean | No | Multi-turn enhancement | true |
| enableMultiQuery | boolean | No | Whether to use large language model (LLM) knowledge to decompose questions | true |
| enableOpenQa | boolean | No | Whether to use large language model (LLM) knowledge to answer questions | true |
| enableQueryRewrite | boolean | No | Whether to rewrite questions based on domain knowledge | true |
| enableSession | boolean | No | Record session | true |
| localKnowledgeId | string | No | Document library ID used for knowledge rewriting | sjdhgfc |
| withDocumentReference | boolean | No | Whether to include document references | true |
| recallStrategy | object | No | Retrieval strategy | |
| documentRankType | string | No | Merge and sort strategy Valid values:
| model |
| limit | integer | No | Number of results after two-way merge and summarization | 10 |
| textIndexSetting | object | No | Text index settings | |
| category | string | No | Text index type | ElasticSearch |
| enable | boolean | No | Whether text indexing is enabled | true |
| indexAnalyzer | string | No | Index analyzer for the text index: (Standard, IkMaxWord, IkSmart) | Standard |
| rankThreshold | double | No | Text index ranking threshold | 0.5 |
| searchAnalyzer | string | No | Search analyzer for the text index: (Standard, IkMaxWord, IkSmart) | Standard |
| topK | integer | No | Number of final summarized results for the text index | 50 |
| vectorIndexSetting | object | No | Vector index settings | |
| category | string | No | Vector index source: ADB is recommended | ADB |
| embeddingType | string | No | Text embedding model for the vector index | DashScope |
| enable | boolean | No | Whether to enable | true |
| rankThreshold | double | No | Vector index ranking threshold | 0.5 |
| topK | integer | No | Number of final summarized results for the vector index | 10 |
| libraryId | string | Yes | Document library ID | dsfbashdbb |
| libraryName | string | No | Document library name | Test document library |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | ResultCode | ||
| cost | long | Time consumed | null |
| data | string | Response data | null |
| dataType | string | Data type | null |
| errCode | string | Error code | 0 |
| message | string | Error message | ok |
| requestId | string | Request ID | eb2b6139-ddf1-91a0-a47f-df7617ae9032 |
| success | boolean | Whether the operation succeeded | true |
| time | string | Timestamp | 2024-04-24 11:54:34 |
Examples
Success response
JSON format