dataLists(new ConversationLists()); } /** * 添加会话 * @return Json * @author L * @data 2024/6/11 12:03 */ public function add():Json { $params = (new GptThreadValidate())->post()->goCheck('add'); $add = GptThreadLogic::add($params, $this->userId); return $add ? $this->success() : $this->fail(GptThreadLogic::getError()); } /** * 删除 * @return Json * @throws Exception * @author L * @data 2024/6/11 15:17 */ public function delete(): Json { $threadId = $this->request->post('id/d'); if (empty($threadId)) { return $this->fail('参数丢失'); } $delete = GptThreadLogic::delete($threadId, $this->userId); return $delete ? $this->success() : $this->fail(GptThreadLogic::getError()); } }