SOBotics / Higgs

A generic dashboard for viewing and providing feedback to SOBotics bots.
GNU General Public License v3.0
4 stars 0 forks source link

Example request for HD #5

Closed rjrudman closed 6 years ago

rjrudman commented 6 years ago

Replicated from this report

Once the bot has been setup admin-wise, the bot will simply need to make the following POST request:

{
  "title": "new Answer(); Can this be considered as an object? [on hold]",
  "contentUrl": "https://stackoverflow.com/questions/49031290/new-answer-can-this-be-considered-as-an-object/49031322#comment85097884_49031322",
  "detectionScore": 5,

  // The following will likely have a short-hand:
  // "content": "Flagged it huh? Never down vote others answer if you don't follow your own rules, keep this in mind. This answer is useless for sure and it's not going to help future readers. Be the man of your own words"
  // The reasoning for fragments was brought up by Petter; HD does pre-processing, and also obfuscation. We'll want to show all, if possible, and depending on the user's access

  "contentFragments": [
    {
      "order": 0,
      "name": "Original",
      "content": "Flagged it huh? Never down vote others answer if you don't follow your own rules, keep this in mind. This answer is useless for sure and it's not going to help future readers. Be the man of your own words"
    }
  ],
  "authorName": "roundAbout",
  "contentCreationDate": "2018-03-01T09:40:30Z",
  "detectedDate": "2018-03-01 09:41:27Z",
  "reasons": [
    {
      "reasonName": "OpenNLP",
      "confidence": 1
    }, 
    { 
      "reasonName": "Perspective", 
      "confidence": 0.39
    }
  ],
  // This can maybe be optional, we'll see how it goes
  "allowedFeedback": [
    "tp", "fp"
  ]
}

Almost all the fields are optional. Indeed, the only required fields are the title and a link to the content. Anything else is down the discretion of the bot.

To see it in action, visit http://45.77.238.226:5555/report/2

This is still in a very MVP situations, so if there are any concerns, let me know.