You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
724 B

import json
# 文件路径
file_path = r"d:\dsWork\dsProject\dsLightRag\Topic\ChuZhongShuXue\vdb_chunks.json"
# 读取并解析JSON文件
with open(file_path, 'r', encoding='utf-8') as f:
data = json.load(f)
# 提取所有块信息
chunks = data.get('data', [])
# 打印块数量和详细信息
print(f"共找到 {len(chunks)} 个块:")
for i, chunk in enumerate(chunks, 1):
print(f"{i}:")
print(f"ID: {chunk.get('__id__')}")
print(f"创建时间: {chunk.get('__created_at__')}")
print(f"文档ID: {chunk.get('full_doc_id')}")
print(f"文件路径: {chunk.get('file_path')}")
print(f"内容预览: {chunk.get('content', '')}") # 显示前100字符
print("---")