V3 Release
This commit is contained in:
parent
b44f4595d9
commit
9ee5f4d121
15
worker.js
Normal file
15
worker.js
Normal file
@ -0,0 +1,15 @@
|
||||
const { parentPort, workerData } = require('worker_threads');
|
||||
|
||||
const { functionToEval, filePath, data, patterns, extensions, filenames, aimodel, aiprompt, llamaendpoint } = workerData;
|
||||
|
||||
async function runEval() {
|
||||
try {
|
||||
// Evaluate the function passed from index.js
|
||||
const result = eval(functionToEval);
|
||||
parentPort.postMessage(result);
|
||||
} catch (error) {
|
||||
parentPort.postMessage({ error: error.message });
|
||||
}
|
||||
}
|
||||
|
||||
runEval();
|
Loading…
x
Reference in New Issue
Block a user