Skip to content

Instantly share code, notes, and snippets.

@brianlow
Last active August 18, 2016 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianlow/657052ccc013ae944933cad5d2495658 to your computer and use it in GitHub Desktop.
Save brianlow/657052ccc013ae944933cad5d2495658 to your computer and use it in GitHub Desktop.
  1. Create new bot using the wit.ai website

  2. Run commands below, waiting for green training indicator between each step.

  3. Create intent

curl -X "POST" "https://api.wit.ai/entities" \
	-H "Accept: application/vnd.wit.20160526+json" \
	-H "Authorization: Bearer [token]" \
	-H "Content-Type: text/plain; charset=utf-8" \
	-d $'{
  "id": "intent",
  "doc": "Describe the users overall intention",
  "lookups": [
    "trait"
  ]
}'

Last, training:

curl -X "POST" "https://api.wit.ai/entities/intent/values" \
	-H "Accept: application/vnd.wit.20160526+json" \
	-H "Authorization: Bearer [token]" \
	-H "Content-Type: text/plain; charset=utf-8" \
	-d $'{
  "value": "hello",
  "expressions": [
    "hi",
    "hi!",
    "hi there",
    "hello",
    "hey",
    "oi",
    "yo",
    "greetings",
    "cheers",
    "wassup",
    "bonjour",
	"aloha"
  ]
}'


curl -X "POST" "https://api.wit.ai/entities/intent/values" \
	-H "Accept: application/vnd.wit.20160526+json" \
	-H "Authorization: Bearer [token]" \
	-H "Content-Type: text/plain; charset=utf-8" \
	-d $'{
  "value": "ok",
  "expressions": [
    "ok",
    "next",
    "proceed",
    "sounds good",
    "continue",
    "please continue",
    "yes",
    "yeah",
    "yes please",
    "yup",
    "hell yeah",
    "okay",
    "okie dokie",
    "yis",
    "k"
  ]
}'


curl -X "POST" "https://api.wit.ai/entities/intent/values" \
	-H "Accept: application/vnd.wit.20160526+json" \
	-H "Authorization: Bearer [token]" \
	-H "Content-Type: text/plain; charset=utf-8" \
	-d $'{
  "value": "no",
  "expressions": [
    "no",
    "nah",
    "nope",
    "never",
    "no thanks",
    "no thank you",
    "I don\'t want",
    "thumbs down",
    "not really"
  ]
}'


curl -X "POST" "https://api.wit.ai/entities/intent/values" \
	-H "Accept: application/vnd.wit.20160526+json" \
	-H "Authorization: Bearer [token]" \
	-H "Content-Type: text/plain; charset=utf-8" \
	-d $'{
  "value": "stop",
  "expressions": [
    "stop",
    "cancel",
    "unsubscribe",
    "stop talking to me",
    "please stop",
    "shutup",
    "quit",
    "leave me alone"
  ]
}'


curl -X "POST" "https://api.wit.ai/entities/intent/values" \
	-H "Accept: application/vnd.wit.20160526+json" \
	-H "Authorization: Bearer [token]" \
	-H "Content-Type: text/plain; charset=utf-8" \
	-d $'{
  "value": "heavy",
  "expressions": [
    "heavy",
    "it feels heavy",
    "it weighs a lot",
    "it is not light"
  ]
}'


curl -X "POST" "https://api.wit.ai/entities/intent/values" \
	-H "Accept: application/vnd.wit.20160526+json" \
	-H "Authorization: Bearer [token]" \
	-H "Content-Type: text/plain; charset=utf-8" \
	-d $'{
  "value": "light",
  "expressions": [
    "light",
    "it feels lights",
    "it does not weigh much",
    "it is light",
    "feels light"
  ]
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment