nodejs-sdk icon indicating copy to clipboard operation
nodejs-sdk copied to clipboard

【文档错误】nodejs关于自定义模板文字识别的文档有误

Open hongmaoxiao opened this issue 3 years ago • 0 comments

var fs = require('fs');

var image = fs.readFileSync("assets/example.jpg").toString("base64");
var templateSign = "Nsdax2424asaAS791823112";

// 调用自定义模板文字识别
client.custom(image, templateSign).then(function(result) {
    console.log(JSON.stringify(result));
}).catch(function(err) {
    // 如果发生网络错误
    console.log(err);
});

其中这里边的

client.custom(image, templateSign)

应该改为

client.custom(image, {templateSign})

天坑 浪费我好几个小时

hongmaoxiao avatar Mar 15 '21 11:03 hongmaoxiao