Skip to content

Instantly share code, notes, and snippets.

@brianlow
Created August 18, 2016 19:52
Show Gist options
  • Save brianlow/e5c2af9da7ac53c4f561830284295048 to your computer and use it in GitHub Desktop.
Save brianlow/e5c2af9da7ac53c4f561830284295048 to your computer and use it in GitHub Desktop.
curl -X "GET" "https://api.wit.ai/message?q=hi" \
	-H "Authorization: Bearer [token]" \
	-H "Accept: application/vnd.wit.20160526+json"

Sometimes returns this (good):

{
  "msg_id": "afdab86b-57ca-4ec5-a37f-f97f107c4d4a",
  "_text": "hi",
  "entities": {
    "intent": [
      {
        "confidence": 0.8752180130826223,
        "value": "hello"
      }
    ]
  }
}

and sometimes returns this (bad):

{
  "msg_id": "b0d7e451-1c64-4e34-991e-4f8ee173d685",
  "_text": "hi",
  "entities": {}
}
@brianlow
Copy link
Author

FYI... this bot was trained using the HTTP api

https://gist.github.com/brianlow/657052ccc013ae944933cad5d2495658

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment