获取SDK

npm install @alicloud/nlp-automl-2019-11-11

使用示例

const NlpAutomlClient = require('@alicloud/nlp-automl-2019-11-11');

async function demo() {
  const client = new NlpAutomlClient({
    endpoint: 'nlp-automl.cn-hangzhou.aliyuncs.com',
    accessKeyId: 'your access key id',
    accessKeySecret: 'your access key secret'
  });

  const res = await client.getPredictResult({
    ModelId: 1818,
    Content: '中华人民共和国解放军'
  });
}

demo();