Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Latest commit

 

History

History
68 lines (56 loc) · 1.06 KB

README.md

File metadata and controls

68 lines (56 loc) · 1.06 KB

Fake Server API

GET /networks

Returns a list of available networks

[{
  "name": "Network 1",
  "id": 1
}, {
  ...
}]

GET /networks/:network/models

Returns a list of available models for the specified network

[{
  "name": "Model 1 of Network 1",
  "id": 1,
  "description": "Some description",
  "vocab": ["John", "table", "football", ...],
  "samples": [{
    "C": "some story",
    "Q": "some question?"
  }, ...],
  "hyper_param1": 1,
  ...
}, {
  ...
}]

POST /networks/:network/models/:model/_predict

Predicts the answer for the specified story and question

Input

{
  "story": "some story",
  "question": "Where is football?"
}

Output

Explanation:

  • answer: the actual answer
  • confidence: confidence of the predicted answer
  • facts: array of extracted facts
  • episodes: 2-dimensional array of episodes and attention values for each episode
{
  "answer": "kitchen",
  "confidence": "0.99999123",
  "facts": ["fact1", "fact2", ... ],
  "episodes": [
    [0, 0.5, ...],
    [1, 0, ...],
    ...
  ]
}