mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-18 00:33:59 +00:00
* feat: refactor and new features + Refactored the codebase + OCR support in bots + Server sends training data every minute + Not using collectors for Discord feedback buttons anymore + Fixed grammar mistakes + Configs are now seperated + Tokens are no longer in configs - Like feedback doesn't work for Discord yet * feat: remove feedback button once voted * feat: role blacklist * feat: thread name check * feat: error handler for training * fix: bot crashing when a webhook msg is sent * refactor: remove debugging lines * feat: allow fixing mistake at votes in discord bot
18 lines
427 B
JavaScript
18 lines
427 B
JavaScript
export default async function trainAI(data) {
|
|
fetch('https://api.wit.ai/utterances', {
|
|
headers: {
|
|
authorization: `Bearer ${process.env.WIT_AI_TOKEN}`
|
|
},
|
|
body: JSON.stringify([
|
|
{
|
|
text: data.text,
|
|
intent: data.label,
|
|
entities: [],
|
|
traits: []
|
|
}
|
|
]),
|
|
method: 'POST'
|
|
});
|
|
return;
|
|
}
|