作者 lyh

gx

@@ -294,6 +294,17 @@ class GeoQuestionRes extends Command @@ -294,6 +294,17 @@ class GeoQuestionRes extends Command
294 } 294 }
295 295
296 /** 296 /**
  297 + * @remark :预期结果对比
  298 + * @name :getExpectResult
  299 + * @author :lyh
  300 + * @method :post
  301 + * @time :2025/8/12 13:51
  302 + */
  303 + public function getExpectResult($question,$answer,$expect){
  304 + $str = "客户提出的问题:{$question},客户得到的回复:{$answer},客户需要预期:{$expect},请分析得到的回复和预期是否一致,仅回复我是或者否";
  305 + }
  306 +
  307 + /**
297 * 获取待执行任务ID 308 * 获取待执行任务ID
298 * @return mixed 309 * @return mixed
299 */ 310 */
@@ -50,17 +50,20 @@ class lyhDemo extends Command @@ -50,17 +50,20 @@ class lyhDemo extends Command
50 protected $description = '更新路由'; 50 protected $description = '更新路由';
51 51
52 public function handle(){ 52 public function handle(){
53 - echo 'start.'. PHP_EOL;  
54 - $ticketModel = new Tickets();  
55 - $list = $ticketModel->list(['id'=>['!=',0]],'id',['id','plan_end_at']);  
56 - foreach ($list as $item){  
57 - echo '执行数据id:'.$item['id'].PHP_EOL;  
58 - $ticketLogModel = new TicketLog();  
59 - $ticketLogModel->edit(['plan_end_at'=>$item['plan_end_at']],['ticket_id'=>$item['id']]);  
60 - } 53 + return $this->getExpectResult();
61 return true; 54 return true;
62 } 55 }
63 56
  57 + public function getExpectResult(){
  58 + $geo_service = new GeoService();
  59 + $question = 'Top AI Coffee Robot';
  60 + $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.";
  61 + $expect = "While I don't have specific information on the RobotAnno coffee machine, in general";
  62 + $str = "客户提出的问题:{$question},客户得到的回复:{$answer},客户需要预期:{$expect},请分析得到的回复和预期是否一致,仅回复我是或者否";
  63 + $data = $geo_service->getChatResult($str, 'gpt-4o-mini');
  64 + dd($data);
  65 + }
  66 +
64 /** 67 /**
65 * @remark :查看路由是否为空 68 * @remark :查看路由是否为空
66 * @name :_actionRoute 69 * @name :_actionRoute