getFile() 该接口用于获取存储于 AI 类向量数据库文件的完整内容,以及系统分配的文件 ID、关键字、文件大小、预处理进度与状态等信息。
支持根据文件名获取文件内容。
支持根据文件 ID 获取文件内容。
请求示例
// link database, client 为 VectorDBClient() 创建的客户端对象AIDatabase db = client.aiDatabase("db-test-ai");// link collectionViewCollectionView collection = db.describeCollectionView("coll-ai-files");String fileId="";String fileName = "腾讯云向量数据库.md";System.out.println(collection.getFile(fileName,fileId).toString());
// link database, client 为 VectorDBClient() 创建的客户端对象AIDatabase db = client.aiDatabase("db-test-ai");// link collectionViewCollectionView collection = db.describeCollectionView("coll-ai-files");String fileId="11822484427********";String fileName = "";System.out.println(collection.getFile(fileName,fileId).toString());
请求参数
参数名 | 是否必选 | 参数含义 | 获取方式 |
fileId | 否 | 文件上传在数据库之后,系统分配的文件 ID | 第一次使用可使用文件名获取文件 ID。 |
fileName
| 否 | 文件名 | - |
返回参数
参数名 | 子参数 | 参数含义 |
documnetSetId | - | 文件 ID。 |
documnetSetName | - | 文件名。 |
textPrefix | - | 文件内容前 200个字符。 |
text | - | 文件完整内容。 |
documentSetInfo | textLength | 文件的字符数。 |
| byteLength | 文件的字节数。 |
| indexedProgress | 文件被预处理、Embedding 向量化的进度。 |
|
indexedStatus
| 文件预处理、Embedding 向量化的状态。 New:等待解析。 Loading:文件解析中。 Failure:文件解析、写入出错。 Ready:文件解析、写入完成。 |
| createTime | 文件创建时间。 |
| lastUpdateTime | 文件最后更新时间。 |
| keywords | 文件关键字。 |
splitterPreprocess | appendTitleToChunk | 在对文件拆分时,配置是否将 Title 追加到切分后的段落后面一并 Embedding。取值如下所示: false:不追加。 true:将段落 Title 追加到切分后的段落。 |
| appendKeywordsToChunk | 在对文件拆分时,配置是否将关键字 keywords 追加到切分后的段落一并 Embedding。取值如下所示: false:不追加。 true:将全文的 keywords 追加到切分后的段落。 |
author | - | 自定义的文件 Metadata 信息的字段。显示创建 CollectionView 时设置为 Filter 索引的字段,同时显示上传文件时或使用 update 新增的字段,但新增的字段不会构建索引。 说明: 显示创建 CollectionView 时设置为 Filter 索引的字段,同时显示上传文件时或使用 pdate 新增的字段,但新增的字段不会构建索引。 |