60]); $data = [ 'question' => $this->question, 'sessionId' => $this->session_id, 'model' => $this->model ?: self::DEFAULT_MODEL, 'contextMsg' => $this->context_msg, 'gptType' => $this->gpt_type ?: self::DEFAULT_GPT_TYPE ]; $res = $client->request('POST', config('love_gpt.service_url'), ['form_params' => $data]); return json_decode($res->getBody()->getContents(), true); } public function setQuestion($value): LoveGPTService { $this->question = $value; return $this; } public function setSessionId($value): LoveGPTService { $this->session_id = $value; return $this; } public function setModel($value): LoveGPTService { $this->model = $value; return $this; } public function setContextMsg($value): LoveGPTService { $this->context_msg = $value; return $this; } public function setGptType($value): LoveGPTService { $this->gpt_type = $value; return $this; } }