mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +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 config = JSON.parse(configJSON);
|
||||
|
||||
const helper = new HelperClient(config.server);
|
||||
const helper = new HelperClient(config);
|
||||
|
||||
helper.connect();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import EventEmitter from 'node:events';
|
||||
class HelperClient extends EventEmitter {
|
||||
constructor({ server }) {
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ export default async function trainAI() {
|
||||
},
|
||||
serializeTo: join(global.__dirname, global.config.fasttext.loadModel).replace('.bin', ''),
|
||||
trainFile: join(global.__dirname, global.config.fasttext.trainFile),
|
||||
bin: join(global.__dirname, global.config.fasttext.bin)
|
||||
});
|
||||
|
||||
global.ft.unload();
|
||||
|
||||
Reference in New Issue
Block a user