Skip to main content

GetLibraryList

Retrieve the document library list. The list includes document names, descriptions, and unique identifiers.

Operation description

Prerequisites
  • You have activated Alibaba Cloud Model Studio and Tongyi Dianjin.
  • Obtain the workspaceId: Obtain the workspace identifier.

Debug

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Debug

Authorization information

The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. Details are as follows:
  • Action: the specific permission point.
  • Access level: the access level of each action. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization for the action. Details are as follows:
    • For required resource types, an asterisk (*) is added as a prefix.
    • For actions that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Related action: other permissions required to successfully perform the action. The caller must also have the permissions of the related actions for the operation to succeed.
ActionAccess levelResource typeCondition keyRelated action
dianjin:GetLibraryListget
*All resources
*
    None
None

Request syntax

GET /{workspaceId}/api/library/list HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

Path parameter, the business space ID.

llm-xxxxx
pageintegerNo

Page number

1
pageSizeintegerNo

Number of records per page

10
querystringNo

Search keyword. Supports document library names and descriptions.

Test document library

Response parameters

NameTypeDescriptionExample value
object

ResultCode<PageVO

>

costlong

Processing time

null
dataobject

Response data

currentPagelong

Page number

1
pageSizelong

Number of records per page

10
recordsarray<object>

Record list

recordobject

Record

descriptionstring

Document library description

Document library
documentCountlong

Document count

10
gmtCreatestring

Creation time

2024-01-01 00:00:00
gmtModifiedstring

Modification time

2024-01-01 00:00:00
idstring

Document library ID

24vs4aa42jv1rg7
indexSettingobject

Document library index settings

chunkStrategyobject

Chunking strategy

docTreeSplitboolean

Layout-based splitting

true
docTreeSplitSizeinteger

Layout-based split size

160
enhanceGraphboolean

Whether to enhance images

true
enhanceTableboolean

Whether to enhance tables

true
overlapinteger

Chunk overlap length

40
sentenceSplitboolean

Split by sentence

true
sentenceSplitSizeinteger

Sentence-based split size

160
sizeinteger

Chunk size

256
splitboolean

Whether to split into chunks

true
modelConfigobject

Model configuration

temperaturedouble

Temperature

0.8
topPdouble

topP

0.8
promptRoleStylestring

Prompt role style

You are an information processing expert.
queryEnhancerobject

Query enhancement

enableFollowUpboolean

Multi-turn enhancement

true
enableMultiQueryboolean

Whether to use LLM knowledge to decompose questions

true
enableOpenQaboolean

Whether to use LLM knowledge to answer questions

true
enableQueryRewriteboolean

Whether to rewrite questions based on domain knowledge

true
enableSessionboolean

Record session

true
localKnowledgeIdstring

Document library ID used for knowledge rewriting

sdbcjsbc
withDocumentReferenceboolean

Whether to include document references

true
recallStrategyobject

Recall strategy

documentRankTypestring

Merge & sort strategy

model
limitinteger

Number of results from two-way merge and summarization

10
textIndexSettingobject

Text index settings

categorystring

Text index type

ElasticSearch
enableboolean

Whether to enable the text index

true
indexAnalyzerstring

Index analyzer of the text index: (Standard, IkMaxWord, IkSmart)

Standard
rankThresholddouble

Text index ranking threshold

null
searchAnalyzerstring

Search analyzer of the text index: (Standard, IkMaxWord, IkSmart)

Standard
topKinteger

Number of final text index summary results

10
vectorIndexSettingobject

Vector index settings

categorystring

Vector index source: ADB is recommended

ADB
embeddingTypestring

Text Embedding model of the vector index

DashScope
enableboolean

Whether to enable

true
rankThresholddouble

Vector index ranking threshold

null
topKinteger

Number of final vector index summary results

10
libraryNamestring

Document library name

Test document library
totalPageslong

Total pages

10
totalRecordslong

Total records

100
dataTypestring

Data type

null
errCodestring

Error code

0
messagestring

Error message

ok
requestIdstring

Request ID

0a06dfe817156528535968405edce3
successboolean

Whether the operation is successful

true
timestring

Timestamp

2024-01-01 00:00:00

Examples

Success response JSON format
{
  "cost": 0,
  "data": {
    "currentPage": 1,
    "pageSize": 10,
    "records": [
      {
        "description": "文档库",
        "documentCount": 10,
        "gmtCreate": "2024-01-01 00:00:00\n",
        "gmtModified": "2024-01-01 00:00:00\n",
        "id": "24vs4aa42jv1rg7",
        "indexSetting": {
          "chunkStrategy": {
            "docTreeSplit": true,
            "docTreeSplitSize": 160,
            "enhanceGraph": true,
            "enhanceTable": true,
            "overlap": 40,
            "sentenceSplit": true,
            "sentenceSplitSize": 160,
            "size": 256,
            "split": true
          },
          "modelConfig": {
            "temperature": 0.8,
            "topP": 0.8
          },
          "promptRoleStyle": "你是一个信息处理专家。\n",
          "queryEnhancer": {
            "enableFollowUp": true,
            "enableMultiQuery": true,
            "enableOpenQa": true,
            "enableQueryRewrite": true,
            "enableSession": true,
            "localKnowledgeId": "sdbcjsbc",
            "withDocumentReference": true
          },
          "recallStrategy": {
            "documentRankType": "model",
            "limit": 10
          },
          "textIndexSetting": {
            "category": "ElasticSearch",
            "enable": true,
            "indexAnalyzer": "Standard",
            "rankThreshold": 0,
            "searchAnalyzer": "Standard",
            "topK": 10
          },
          "vectorIndexSetting": {
            "category": "ADB",
            "embeddingType": "DashScope",
            "enable": true,
            "rankThreshold": 0,
            "topK": 10
          }
        },
        "libraryName": "测试文档库"
      }
    ],
    "totalPages": 10,
    "totalRecords": 100
  },
  "dataType": null,
  "errCode": 0,
  "message": "ok",
  "requestId": "0a06dfe817156528535968405edce3",
  "success": true,
  "time": "2024-01-01 00:00:00"
}

Error codes

Visit the Error Center to view more error codes.