修改节点脚本

This commit is contained in:
2025-12-22 22:33:18 +08:00
parent 75b32b4bcd
commit ae29ea2f6d
3 changed files with 34 additions and 3 deletions

View File

@@ -119,7 +119,21 @@ def main(scrape_json: list, DASHSCOPE_API_KEY: str) -> dict:
"chunk_index": idx,
"embedding": vectors[idx]
})
'''
JSON 格式
results:
[
{
"source_url": "https://example.com",
"title": "Example Title",
"content": "Example chunk content",
"chunk_index": 0,
"embedding": [0.123, 0.456, ...]
},
...
]
'''
return {
"results": result_list
"results": result_list,
"len_chunks": len(chunks)
}