SCAI workshop @ EMNLP 2020
Bots are connected to the evaluation system via simplified version of Telegram Bot API. There are only two methods are available: getUpdates
and sendMessage
. Only text messages are allowed. The method sendMessage
ignores all other fields besides chat_id
and text
(and additionally out unique field msg_evaluation
described below). The method getUpdates
allows to use only limit
and timeout
fields. The system provides updates only of type message
.
https://2258.lnsigo.mipt.ru/bot
https://2242.lnsigo.mipt.ru/bot
curl https://2258.lnsigo.mipt.ru/bot<bot_token>/getUpdates
Reply, a new chat is started:
{
"ok":true,
"result":[
{
"update_id":88,
"message":{
"message_id":0,
"from":{
"id":954017548,
"is_bot":true,
"first_name":"0"
},
"chat":{
"id":954017548,
"first_name":"0",
"type":"private"
},
"date":1530526222,
"text":"/start\nmy cats are very special to me.\ni'm a construction worker.\ni enjoy building houses.\ni have 5 cats.\nmy dad taught me everything i know."
}
}
]
}
curl --request POST --header "Content-Type: application/json" --data '{"chat_id":327392578,"text":"{\"text\":\"Hello!\"}"}' https://2258.lnsigo.mipt.ru/bot<bot_token>/sendMessage
Optionally, a message could include field msg_evaluation
with evaluation of counterpart’s message. This field should contain 0 or 1 if you are evaluating the previous counterpart’s message. Also it could contain object with fields message_id
and score
, in that case the evaluation will be attached to message with message_id. Example:
Evaluation of the last message:
{
"text": "message text",
"msg_evaluation": 1
}
Evaluation of a specific message:
{
"text": "message text",
"msg_evaluation": {"score": 0, "message_id": 12}
}
A limitation for sendMessage is applied. If a bot send more than a predefined number of malformed messages then a dialog will be forced to end.
Maximum number of invalid messages sent by a bot: 10