File tree 2 files changed +46
-6
lines changed
2 files changed +46
-6
lines changed Original file line number Diff line number Diff line change @@ -397,15 +397,15 @@ client.task.fraud_spamicity({
397
397
}
398
398
```
399
399
400
- #### ➡️ Spam Classify
400
+ #### ➡️ Spam Conversation
401
401
402
- * ** Method:** ` client.task.spam_classify (data) `
403
- * ** Reference:** [ Spam Classify ] ( https://docs.mirage-ai.com/references/api/v1/#spam-classify )
402
+ * ** Method:** ` client.task.spam_conversation (data) `
403
+ * ** Reference:** [ Spam Conversation ] ( https://docs.mirage-ai.com/references/api/v1/#spam-conversation )
404
404
405
405
* ** Request:**
406
406
407
407
``` python
408
- client.task.spam_classify ({
408
+ client.task.spam_conversation ({
409
409
" sender" : {
410
410
" name" : " John Doe" ,
411
411
@@ -442,6 +442,43 @@ client.task.spam_classify({
442
442
}
443
443
```
444
444
445
+ #### ➡️ Spam Document
446
+
447
+ * ** Method:** ` client.task.spam_document(data) `
448
+ * ** Reference:** [ Spam Document] ( https://docs.mirage-ai.com/references/api/v1/#spam-document )
449
+
450
+ * ** Request:**
451
+
452
+ ``` python
453
+ client.task.spam_document({
454
+ " name" : " Spammy Domain" ,
455
+ " domain" : " spammy-domain.crisp.help" ,
456
+ " title" : " Spammy title" ,
457
+ " content" : " Spammy content"
458
+ });
459
+ ```
460
+
461
+ * ** Response:**
462
+
463
+ ``` json
464
+ {
465
+ "reason" : " processed" ,
466
+
467
+ "data" : {
468
+ "class" : " spam" ,
469
+ "confidence" : 0.82 ,
470
+ "logprob" : -0.10 ,
471
+
472
+ "scores" : {
473
+ "gibberish" : 0.0 ,
474
+ "marketing" : 0.0 ,
475
+ "regular" : 0.0 ,
476
+ "spam" : 0.82
477
+ }
478
+ }
479
+ }
480
+ ```
481
+
445
482
### Data API
446
483
447
484
#### ➡️ Context Ingest
Original file line number Diff line number Diff line change @@ -36,5 +36,8 @@ def translate_text(self, data):
36
36
def fraud_spamicity (self , data ):
37
37
return self .parent .post ("/task/fraud/spamicity" , data )
38
38
39
- def spam_classify (self , data ):
40
- return self .parent .post ("/task/spam/classify" , data )
39
+ def spam_conversation (self , data ):
40
+ return self .parent .post ("/task/spam/conversation" , data )
41
+
42
+ def spam_document (self , data ):
43
+ return self .parent .post ("/task/spam/document" , data )
You can’t perform that action at this time.
0 commit comments