option('model')) { $modelId = $this->ask('请输入 llm model id'); } else { $modelId = $this->option('model'); } $this->aiTermService->setModel($modelId); $this->model = $this->modelService->getModelById($modelId); $this->info("model:{$this->model['model']}"); $this->modelToken = AuthService::getUserToken($modelId); if ($this->option('id')) { $terms = [['guid' => $this->option('id'), 'word' => 'word']]; } else { $terms = $this->termService->getCommunityGlossary('zh-Hans')['items']->toArray(); } foreach ($terms as $key => $term) { $this->info("[{$term['word']}] running"); $result = $this->aiTermService->update($term['guid']); $this->info("[{$term['word']}]content " . substr($result, 0, 30)); } return 0; } }