diff --git a/digital_doctor/application/api/controller/Reportty.php b/digital_doctor/application/api/controller/Reportty.php index 2f91cd5..9f47369 100644 --- a/digital_doctor/application/api/controller/Reportty.php +++ b/digital_doctor/application/api/controller/Reportty.php @@ -30,6 +30,7 @@ class Reportty * author:wh */ function createReport(){ + Tools::log_to_write_txt(['input'=>input()]); //header('Content-Type: text/event-stream'); //header('Cache-Control: no-cache'); //header('Connection: keep-alive'); @@ -73,6 +74,9 @@ class Reportty $chatobj->setBefore($content); $chatobj->returnAnswer($question,$config,$answer_json_arr); + + Tools::log_to_write_txt($chatobj->post_msg_body); + $res_content = []; //把返回的报告保存起来 foreach ($answer_json_arr as $josn){ diff --git a/digital_doctor/vendor/wanghua/general-utility-tools-php/src/gpt/chat/ChatGPT.php b/digital_doctor/vendor/wanghua/general-utility-tools-php/src/gpt/chat/ChatGPT.php index 87e048a..eca785e 100644 --- a/digital_doctor/vendor/wanghua/general-utility-tools-php/src/gpt/chat/ChatGPT.php +++ b/digital_doctor/vendor/wanghua/general-utility-tools-php/src/gpt/chat/ChatGPT.php @@ -8,6 +8,7 @@ class ChatGPT extends BaseChat public $apiKey = ''; public $model = ''; private $messages = []; + public $post_msg_body; public function __construct() { @@ -94,6 +95,7 @@ class ChatGPT extends BaseChat } $post_msg_body['messages'] = $this->messages; $postData = json_encode($post_msg_body); + $this->post_msg_body = $post_msg_body; $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); diff --git a/digital_doctor_admin/public/assets/js/backend/ttmedicalreport.js b/digital_doctor_admin/public/assets/js/backend/ttmedicalreport.js index 43fb8ca..56f75e6 100644 --- a/digital_doctor_admin/public/assets/js/backend/ttmedicalreport.js +++ b/digital_doctor_admin/public/assets/js/backend/ttmedicalreport.js @@ -45,6 +45,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin let dataid = $('#add_follow_report').attr('data-id'); //添加随访记录 layer.msg(111); + let url = 'tt/Followup/addfollowup'; + $.post(url,{report_dataid:dataid},function (res) { + + },'html'); }); Controller.api.bindevent();