mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-17 16:23:58 +00:00
fix: trainAI not using the bin location
This commit is contained in:
@@ -5,7 +5,7 @@ import HelperClient from '../../client/index.js';
|
|||||||
const configJSON = readFileSync('../config.json', 'utf-8');
|
const configJSON = readFileSync('../config.json', 'utf-8');
|
||||||
const config = JSON.parse(configJSON);
|
const config = JSON.parse(configJSON);
|
||||||
|
|
||||||
const helper = new HelperClient(config.server);
|
const helper = new HelperClient(config);
|
||||||
|
|
||||||
helper.connect();
|
helper.connect();
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import EventEmitter from 'node:events';
|
|||||||
class HelperClient extends EventEmitter {
|
class HelperClient extends EventEmitter {
|
||||||
constructor({ server }) {
|
constructor({ server }) {
|
||||||
super();
|
super();
|
||||||
if (!server.port) throw new Error('You did not specify the server port.');
|
if (!server?.port) throw new Error('You did not specify the server port.');
|
||||||
this.server = server;
|
this.server = server;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export default async function trainAI() {
|
|||||||
},
|
},
|
||||||
serializeTo: join(global.__dirname, global.config.fasttext.loadModel).replace('.bin', ''),
|
serializeTo: join(global.__dirname, global.config.fasttext.loadModel).replace('.bin', ''),
|
||||||
trainFile: join(global.__dirname, global.config.fasttext.trainFile),
|
trainFile: join(global.__dirname, global.config.fasttext.trainFile),
|
||||||
|
bin: join(global.__dirname, global.config.fasttext.bin)
|
||||||
});
|
});
|
||||||
|
|
||||||
global.ft.unload();
|
global.ft.unload();
|
||||||
|
|||||||
Reference in New Issue
Block a user