isAuth = false; parent::__construct(); // $this->client = XunFeiAiClientV2::getInstance(); $this->client = XunFeiAiClientV1::getInstance(); } public function genSign(string $time, $dayDesc, $version = 1) { // 构建提示词 $prompt = $this->client->genSignPrompt($time, $dayDesc, $version); // $prompt = $this->client->buildPrescriptionPrompt($userInfo, $drugModel->toArray()); // 发送请求(模拟) $requestResult = $this->client->sendRequest($prompt, 'text'); if ($requestResult['code'] !== 0) { throw new Exception('AI请求失败: ' . ($requestResult['message'] ?? '未知错误')); } // 解析响应(模拟) $response = $this->client->parseResponse($requestResult); return $response; } }