1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- let Parse = require('parse/node');
- Parse.initialize("dev");
- Parse.serverURL = "https://dev.fmode.cn/parse";
- Parse.masterKey = "devmk";
- global.Parse = Parse
- const {IndexesService} = require("../indexes.service")
- main()
- async function main(){
- let docs
-
- docs = await testApiLoad("https://file-cloud.fmode.cn/Svehl6FceL/20240422/063634869.docx","1bcd2a1b5d47fb3f53ff6adc4066c15e")
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- async function testApiLoad(filelink,md5){
- console.log(filelink)
-
-
- let host = "https://test.fmode.cn"
- let response = await fetch(host+"/api/aiagent/indexes/loader",{
- method:"POST",
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify({
- url: filelink,
- md5: md5
- })
- })
- let json = await response.json()
- console.log(json)
- return json
- }
- async function testLoad(filelink,msg){
- let indexes = new IndexesService();
- docs = await indexes.load(filelink)
- if(docs?.length>0){
- docOutput = await indexes.split(docs)
- console.log(docOutput)
- }
- }
|