Use DashScopeCloudIndex and DashScopeCloudRetriever to easily manage cloud document indexes in Alibaba Cloud Model Studio and build retrievers with the LlamaIndex framework.
Prerequisites
- Obtain and configure an API key and set the API key as a system environment variable.
-
Obtain a workspace ID and set it as a system environment variable named
DASHSCOPE_WORKSPACE_ID.
Build a cloud knowledge base from local files
- Install the following dependencies:
-
Prepare the files for parsing. This example uses the Alibaba Cloud Model Studio Product Introduction (Fictional).zip file. You can upload and parse local files using the DashScopeParse module.
Intelligent document parsing in DashScopeParse supports the PDF, DOC, DOCX, TXT, MD, PPT, PPTX, XLS, and XLSX formats. A single document can be up to 100 MB or 1,000 pages. You can upload a maximum of 200 files at a time.Only PDF, DOC, and DOCX files are intelligently parsed. Other file types are uploaded to the cloud as-is without parsing.
Obtain the category ID (category_id) for the documents you want to upload.
Obtain the category ID (category_id) for the documents you want to upload.
Go to Application Data > Files to obtain the category ID (category_id).
