UNIT问答对快速配置功能正式发布
Ta的回复 :没有回答,自己这两天研究了下。还可以。导入格式限制太多,一些空格换行,括号都会出错。手工录入的不能有括号。完成后,主要按下面选择,不用样本,百十条的基本是秒好。测试效果表示基本满意。数遍帖个php调用代码client_id不是appid,是后面那个 $url="https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=xxxxx&client_secret=xxx"; $b=file_get_contents($url); $c=json_decode($b); $token=$c->access_token; $keyword="xxxxx"; $ch = curl_init(); $post=array("query"=>"{$keyword}","scene_id"=>"13209","session_id"=>""); $post=json_encode($post); $url1 ="https://aip.baidubce.com/rpc/2.0/solution/v1/unit_utterance?access_token={$token}"; curl_setopt($ch, CURLOPT_URL, $url1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $a=curl_exec($ch); $d=json_decode($a); $answer=$d->result->action_list[0]->say; echo $answer; [图片]