Closed padilhalucas closed 10 months ago
@padilhalucas Can you share the AppID? And how about sending the request with curl
(Refer to the doc: https://wit.ai/docs/http/20200513/#post__utterances_link)? Did curl
request work?
If curl
request works, the problem should be in your python code.
@padilhalucas Can you try using the new train
method? It's in the master branch.
I want to train the bot via https request. I am using python to do so. But I encounter problems (400 ERROR), which means that I am doing something wrong here. I want to train a simple sentence, only with an intention and without entities.
My code: endpoint = "https://api.wit.ai/utterances?v=20210508&q/" TOKEN = "###" headers = { 'Authorization': f"Bearer {TOKEN}", 'Content-Type': 'application/json' } data = '[{ "text": "São Paulo", "intent": "conversa_cidade", "entities": [ { "entity":"", "start":"", "end":"", "body":"", "entities":[]}], "traits":[]]' response = requests.post(endpoint,headers,data)
Thank you!