作者 lyh

gx

... ... @@ -294,6 +294,17 @@ class GeoQuestionRes extends Command
}
/**
* @remark :预期结果对比
* @name :getExpectResult
* @author :lyh
* @method :post
* @time :2025/8/12 13:51
*/
public function getExpectResult($question,$answer,$expect){
$str = "客户提出的问题:{$question},客户得到的回复:{$answer},客户需要预期:{$expect},请分析得到的回复和预期是否一致,仅回复我是或者否";
}
/**
* 获取待执行任务ID
* @return mixed
*/
... ...
... ... @@ -50,17 +50,20 @@ class lyhDemo extends Command
protected $description = '更新路由';
public function handle(){
echo 'start.'. PHP_EOL;
$ticketModel = new Tickets();
$list = $ticketModel->list(['id'=>['!=',0]],'id',['id','plan_end_at']);
foreach ($list as $item){
echo '执行数据id:'.$item['id'].PHP_EOL;
$ticketLogModel = new TicketLog();
$ticketLogModel->edit(['plan_end_at'=>$item['plan_end_at']],['ticket_id'=>$item['id']]);
}
return $this->getExpectResult();
return true;
}
public function getExpectResult(){
$geo_service = new GeoService();
$question = 'Top AI Coffee Robot';
$answer = "Top AI Coffee Robot\" refers to advanced robotic systems that combine **precision automation, artificial intelligence, and specialty coffee expertise** to create high-quality beverages with minimal human intervention. Here's a breakdown of key features, leading examples, and benefits:\n\n### Core Features of Top AI Coffee Robots:\n1. **AI-Driven Customization** \n - Analyzes user preferences (strength, milk type, sweetness) via app profiles or voice commands. \n - Learns from feedback to refine future orders (e.g., \"less bitter than last time\"). \n2. **Robotic Precision Brewing** \n - Industrial arms handle grinding, tamping, steaming milk, and latte art with sub-millimeter accuracy. \n - Sensors monitor temperature, extraction time, and pressure for optimal flavor.";
$expect = "While I don't have specific information on the RobotAnno coffee machine, in general";
$str = "客户提出的问题:{$question},客户得到的回复:{$answer},客户需要预期:{$expect},请分析得到的回复和预期是否一致,仅回复我是或者否";
$data = $geo_service->getChatResult($str, 'gpt-4o-mini');
dd($data);
}
/**
* @remark :查看路由是否为空
* @name :_actionRoute
... ...