@xuda.io/ai_module 1.1.4813 → 1.1.4814
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +6 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2525,10 +2525,12 @@ const upload_agent_files = async function (uid, agent_doc) {
|
|
|
2525
2525
|
tool.youtube.file_id = uploadedFile.id;
|
|
2526
2526
|
|
|
2527
2527
|
if (!tool.youtube.vector_file_id) {
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2528
|
+
try {
|
|
2529
|
+
const ret = await client.vectorStores.files.create(_conf.OPENAI_VECTOR_STORE_ID, {
|
|
2530
|
+
file_id: tool.youtube.file_id,
|
|
2531
|
+
});
|
|
2532
|
+
tool.youtube.vector_store_id = ret.vector_store_id;
|
|
2533
|
+
} catch (error) {}
|
|
2532
2534
|
}
|
|
2533
2535
|
await save_agent_status(uid, agent_doc._id, 3, agentConfig);
|
|
2534
2536
|
|