|
...
|
...
|
@@ -66,12 +66,17 @@ class GeoQuestionRes extends Command |
|
|
|
echo '执行数据详情:'.$q_item.'/'.$p_item.PHP_EOL;
|
|
|
|
$keywords = [];//命中的关键词
|
|
|
|
$urls = [];//命中的网址
|
|
|
|
try {
|
|
|
|
$result_data = $geoService->setWebSearchChatAction($q_item,$p_item);
|
|
|
|
echo 'success:'.$result_data['code'].PHP_EOL;
|
|
|
|
if(isset($result_data) && $result_data['code'] == 200){
|
|
|
|
$keywords = $this->getKeywords($keywordArr,$result_data['text'] ?? []);
|
|
|
|
$urls = $this->getUrl($urlArr,$result_data['annotations'] ?? []);
|
|
|
|
}
|
|
|
|
}catch (\Exception $e){
|
|
|
|
echo $e->getMessage().PHP_EOL;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
//保存一条结果记录
|
|
|
|
$data = [
|
|
|
|
'project_id'=>$info['project_id'],
|
...
|
...
|
|