Skip to content

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

@hongmaoxiao

Description

@hongmaoxiao
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})

天坑
浪费我好几个小时

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions