电商-通过百度AI接口实现智能补全地址方案

分享  收藏
1 / 652

电商销售的时候员工在录入客户地址时候只知道部分地区,导致快递打印信息显示无法寄送,现在可以利用百度 ai 的自然语言处理接口来填充地址

首先打开 https://ai.baidu.com/登录进去 点击开通应用,开通自然语言处理 获取到 API Key 和 | Secret Key

image.png

以我的按键触发为例子image.png
第二步获取 token
image.png
get 提交方式 https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=**API Key **&client_secret=Secret Key
点击运行 复制获取到的 token
第 3 步 post
https://aip.baidubce.com/rpc/2.0/nlp/v1/address?access_token=获取到的 token
Headers 填写 Content-Type application/json
image.png

第 4 步输出参数到地址信息就解决了