1

I am exploring on how to train a dataset for the intent model, but I am running into some issue, which I hope someone would be able to provide some guidance.

I have some Apex code that will upload a dataset for training. I am trying to model after this csv file --> http://einstein.ai/text/case_routing_intent.csv, which I found while reading this --> https://metamind.readme.io/docs/intent-quick-start-custom-classifier, by adding some additional data using a text editor just to try and see if I am able to train with my own dataset. This data set is placed in my dropbox where I have created a link to it.

When I tried to upload the dataset from my dropbox with the generated link, I received the following messages in the debug log:

System.HttpResponse[Status=Bad Request, StatusCode=400] File content must contain one of the supported file formats: [json, csv, tab-separated-values, zip, octet-stream, binary]

Since I am sure I created a csv file, I went ahead and downloaded http://einstein.ai/text/case_routing_intent.csv and placed it in my dropbox just to see if I really have a problem with my csv file. However, uploading this file also fail with the same message above. I am wondering if there is a specific way or place where I can upload files from.

0

could you share the link to your csv file (thru google drive or dropbox) . Since you are failing with our sample file, which should definitely success, and I just tried myself using curl. So I suspect it could be the link you are using is not correct.

  • I also tried to use curl and I received a message saying "Invalid file format". This is the URL to the sample file that is stored on my google drive --> drive.google.com/open?id=1CZDCeuZJ9V87mo25LxKJQZlmkwagpVbg – Wilson Kwok Nov 29 '17 at 18:00
  • could you past the command you used with curl, you can remove the access token, also grant me permission to your file, i just requested access to the file (leo.zhu@salesforce.com) – Leo Nov 29 '17 at 21:39
  • I have already granted you access to the file and the command I used was curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "path=drive.google.com/open?id=1CZDCeuZJ9V87mo25LxKJQZlmkwagpVbg" -F "type=text-intent" api.einstein.ai/v2/language/datasets/upload – Wilson Kwok Nov 30 '17 at 18:46
  • The path part actually has https:// in front of drive.google... when I executed the command, but it's not showing here. – Wilson Kwok Nov 30 '17 at 18:48
  • Hey Wilson the reason it fails, is the google drive link is not right. You have to login to get that file, so when our system try to download it, it will fail. The link has to be the one which if you shared with me, i can direct download it without ask permission. You have to set this file to be public then use the shareable link first. – Leo Dec 1 '17 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.