I finally managed to do so by doing something like this:
{
"interactionModel": {
"languageModel": {
"invocationName": "test",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "CATCHALL",
"slots": [
{
"name": "any",
"type": "AMAZON.LITERAL"
}
],
"samples": [
"{hey|any}",
"{hey hey|any}",
"{hey hey hey|any}",
"{hey hey hey hey|any}",
"{hey hey hey hey hey|any}"
]
}
],
"types": []
}
}
}
the samples for the intent CATCHALL indicates the number of word you want to catch. So lige this, i will catch any sentence between one and this 5 words.
I'm not sure if this is going to be a problem when I'll submit the app, though.
Note that AMAZON.LITERAL is not supported for any language other than English (US), so this is not a solution for me as it's a french and english chatbot. So i'm back again at the beginning...
edit: Here is the solution without LITERAL:
{
"interactionModel": {
"languageModel": {
"invocationName": "mon invocation",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": [
"que puis-je faire"
]
},
{
"name": "AMAZON.StopIntent",
"samples": [
"je veux quitter"
]
},
{
"name": "CATCH_ALL",
"slots": [
{
"name": "any",
"type": "ANYTHING"
}
],
"samples": [
"{any}"
]
}
],
"types": [
{
"name": "ANYTHING",
"values": [
{
"name": {
"value": "hey"
}
},
{
"name": {
"value": "hey hey"
}
},
{
"name": {
"value": "hey hey hey"
}
},
{
"name": {
"value": "hey hey hey hey"
}
},
{
"name": {
"value": "hey hey hey hey hey"
}
},
{
"name": {
"value": "hey hey hey hey hey hey"
}
},
{
"name": {
"value": "hey hey hey hey hey hey hey"
}
},
{
"name": {
"value": "hey hey hey hey hey hey hey hey"
}
},
{
"name": {
"value": "hey hey hey hey hey hey hey hey hey"
}
},
{
"name": {
"value": "hey hey hey hey hey hey hey hey hey hey"
}
},
{
"name": {
"value": "hey hey hey hey hey hey hey hey hey hey hey"
}
},
{
"name": {
"value": "hey hey hey hey hey hey hey hey hey hey hey hey"
}
}
]
}
]
}
}
}