Updates a document library. You can update the library name, description, and index configuration.
Operation description
Prerequisites
- You have activated Alibaba Cloud Model Studio and Tongyi Dianjin.
- Obtain the workspace ID. For more information, see Get the workspace ID.
Try it now
Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.
RAM authorization
The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:
-
Action: The actions can be used in the
Actionelement of RAM permission policy statements to grant permissions to perform the operation. - API: The API that you can call to perform the action.
- Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.
-
Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.
- For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the
Resourceelement of the policy. - For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the
Resourceelement of the policy.
- For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the
- Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.
- Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.
Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
dianjin:UpdateLibrary | update | *All Resource
| None | None |
Request syntax
Path Parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | Workspace ID | llm-xxxxx |
Request parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| 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 | Enhance images | true |
| enhanceTable | boolean | No | Enhance tables | true |
| overlap | integer | No | Chunk overlap length | 20 |
| sentenceSplit | boolean | No | Split by sentence. Default is true | true |
| sentenceSplitSize | integer | No | Average sentence-based chunking length | 160 |
| size | integer | No | Fixed-length chunking size | 256 |
| split | boolean | No | Enable chunking | true |
| modelConfig | object | No | Model configuration | |
| temperature | number | No | Temperature | 0.8 |
| topP | number | No | Top P | 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 | Use Large Language Models (LLMs) to decompose queries | true |
| enableOpenQa | boolean | No | Use Large Language Models (LLMs) to answer queries | true |
| enableQueryRewrite | boolean | No | Rewrite queries using domain knowledge | true |
| enableSession | boolean | No | Record session history | true |
| localKnowledgeId | string | No | Document library ID used for query rewriting | sjdhgfc |
| withDocumentReference | boolean | No | Include document references in responses | true |
| recallStrategy | object | No | Retrieval strategy | |
| documentRankType | string | No | Merge and sort strategy Valid values:
| model |
| limit | integer | No | Number of results from two-way merge and summarization | 10 |
| textIndexSetting | object | No | Text index settings | |
| category | string | No | Text index type | ElasticSearch |
| enable | boolean | No | Enable text indexing | true |
| indexAnalyzer | string | No | Text index analyzer: Standard, IkMaxWord, or IkSmart | Standard |
| rankThreshold | number | No | Text index ranking threshold | 0.5 |
| searchAnalyzer | string | No | Text index search analyzer: Standard, IkMaxWord, or IkSmart | Standard |
| topK | integer | No | Number of final summarized results from text indexing | 50 |
| vectorIndexSetting | object | No | Vector index settings | |
| category | string | No | Vector index source. We recommend ADB | ADB |
| embeddingType | string | No | Text embedding model for vector indexing | DashScope |
| enable | boolean | No | Enable vector indexing | true |
| rankThreshold | number | No | Vector index ranking threshold | 0.5 |
| topK | integer | No | Number of final summarized results from vector indexing | 10 |
| libraryId | string | Yes | Document library ID | dsfbashdbb |
| libraryName | string | No | Document library name | Test document library |
Response elements
Element | Type | Description | Example |
|---|---|---|---|
object | ResultCode<string> | ||
| cost | integer | Processing time | 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 | Operation succeeded | true |
| time | string | Timestamp | 2024-04-24 11:54:34 |
Examples
Success response
JSON format