mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-20 17:53:57 +00:00
Add OCR, add configuration
This commit is contained in:
@@ -8,7 +8,7 @@ Sending the server this JSON (BSON) will send you back the AI predictions.
|
||||
|
||||
```json
|
||||
{
|
||||
"event": "ai",
|
||||
"op": 1,
|
||||
"id": "String",
|
||||
"text": "How do i download ReVanced?"
|
||||
}
|
||||
@@ -18,7 +18,7 @@ And the server would return something like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"event": "ai_response",
|
||||
"op": 2,
|
||||
"id": "String",
|
||||
"predictions": [
|
||||
{
|
||||
@@ -29,17 +29,13 @@ And the server would return something like this:
|
||||
}
|
||||
```
|
||||
|
||||
# OCR
|
||||
|
||||
Soon:tm:
|
||||
|
||||
# Training the AI
|
||||
|
||||
To add data to the train data, send a BSON (JSON) like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"event": "add_train_data",
|
||||
"op": 3,
|
||||
"label": "FALSEPOSITIVE",
|
||||
"text": "how"
|
||||
}
|
||||
@@ -49,6 +45,28 @@ To train the AI and to re-load it, send this BSON (JSON):
|
||||
|
||||
```json
|
||||
{
|
||||
"event": "train_ai"
|
||||
"event": 4
|
||||
}
|
||||
```
|
||||
|
||||
# OCR
|
||||
|
||||
Sending the server this JSON (BSON) will send you back the read text.
|
||||
|
||||
```json
|
||||
{
|
||||
"op": 5,
|
||||
"id": "String",
|
||||
"url": "https://cdn.discordapp.com/attachments/1033338556493606963/1033338557231796224/Screenshot_20221022-121318.jpg"
|
||||
}
|
||||
```
|
||||
|
||||
And the server would return something like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"op": 6,
|
||||
"id": "String",
|
||||
"ocrText": "..."
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user