mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-18 00:33:59 +00:00
16 lines
283 B
JavaScript
16 lines
283 B
JavaScript
import { serialize } from 'bson';
|
|
|
|
export default async function runAI(client, data) {
|
|
const predictions = await global.ft.predict(data.text);
|
|
const jsonData = {
|
|
op: 2,
|
|
id: data.id,
|
|
predictions
|
|
};
|
|
|
|
const bsonData = serialize(jsonData);
|
|
client.write(bsonData);
|
|
|
|
return;
|
|
}
|