Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Reuben committed Nov 11, 2022
1 parent 2c30601 commit 26762b1
Showing 1 changed file with 51 additions and 25 deletions.
76 changes: 51 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,26 @@ intents["greets"] = []string{
"Za mchana",
"Za usiku",
"Hola",
}
}
intents["sajili"] = []string{
"nataka kujisajili",
"nataka kujiunga",
"add me",
}
intents["cancel"] = []string{
"sitisha",
"acha",
"cancel",
"sitaki",
}
}
intents["order_pizza"] = []string{
"Nataka pizza",
"I need pizza",
"I want Pizza",
}
}
```

Expand All @@ -96,49 +102,69 @@ stories["greets"] = map[string]interface{}{
"message": "Helo, Karibu nikusaidiaje?",
"choices": nil,
"next": nil, //nil means end
}
}
stories["goodbye"] = map[string]interface{}{
"message": "Karibu tena",
"choices": nil,
"next": nil,
}
}
stories["cancel"] = map[string]interface{}{
"message": "Karibu tena",
"choices": nil,
"next": nil,
}
}
stories["order_pizza"] = map[string]interface{}{
"message": "Unataka pizza gani?",
"order_pizza_choices": []string{
"1. Chicken Pizza",
"2. Cheese Pizza",
"3. Mixture Pizza",
"4. Skyline Pizza",
"order_pizza_choices": GoBot.GoBotChoice{
Header: "Unataka pizza gani?",
SuccessChoiceMessage: "Karibu tena!",
ErrorChoiceMessage: "Samahani pizza uliochagua haipo!",
Choices: []string{
"Chicken Pizza",
"Cheese Pizza",
"Mixture Pizza",
"Skyline Pizza",
},
"next": "soda",
"choice_fallback": "Sorry, hatuna aina hio ya pizza!",
}
IntentAction: intents["tuma"].([]string),
IntentCancel: intents["cancel"].([]string),
},
"type": "choices",
"next": nil, //nil means end
}
stories["soda"] = map[string]interface{}{
"message": "Unakata kinywaji gani?",
"soda_choices": []string{
"1. Pepsi",
"2. Cocacola",
"3. Sprite",
"4. Mirinda",
stories["sajili"] = map[string]interface{}{
"message": "Tafadhali nipe majibu ya haya maswali?",
"type": "form",
"sajili_form": GoBot.GoBotForm{
Header: "Karibu jaza maswali yafuatayo kwa usahihi",
Form: []GoBot.Form{
{
Variable: "name",
Hint: "Jina lako nani?",
},
{
Variable: "age",
Hint: "Una umri gani?",
},
},
IntentAction: intents["tuma"].([]string),
IntentCancel: intents["cancel"].([]string),
ConfirmMessage: "Tafadhali nijibu, nitume au nisitume?",
ActionMessage: "Asante, taarifa zako, zimetumwa",
CancelMessage: "Sijatuma taarifa zako, ukitaka kutuma tena, karibu sana!",
},
"choice_fallback": "Sorry, hatuna aina hio ya soda!",
}
}
stories["fallback"] = map[string]interface{}{
"message": "Sijaelewa unataka nini?",
"type":"default",
"choices": nil,
"next": nil,
}
}
```

Expand Down

0 comments on commit 26762b1

Please sign in to comment.