ddemszky commited on
Commit
abd286b
1 Parent(s): ba5a35c

update handler

Browse files
Files changed (2) hide show
  1. handler.py +1 -1
  2. test.py +1 -1
handler.py CHANGED
@@ -56,7 +56,7 @@ class EndpointHandler():
56
  A :obj:`list` | `dict`: will be serialized and returned
57
  """
58
  # get inputs
59
- utterances = data.pop("utterances", data)
60
  params = data.pop("parameters", None)
61
 
62
  print("EXAMPLES")
 
56
  A :obj:`list` | `dict`: will be serialized and returned
57
  """
58
  # get inputs
59
+ utterances = data.pop("inputs", data)
60
  params = data.pop("parameters", None)
61
 
62
  print("EXAMPLES")
test.py CHANGED
@@ -5,7 +5,7 @@ my_handler = EndpointHandler(path=".")
5
 
6
  # prepare sample payload
7
  example = {
8
- "utterances": [
9
  {"id": 1, "speaker": "Alice", "text": "How much is the fish?" },
10
  {"id": 2, "speaker": "Bob", "text": "I have no idea, ask Alice" }
11
  ],
 
5
 
6
  # prepare sample payload
7
  example = {
8
+ "inputs": [
9
  {"id": 1, "speaker": "Alice", "text": "How much is the fish?" },
10
  {"id": 2, "speaker": "Bob", "text": "I have no idea, ask Alice" }
11
  ],