prompts->render('vision_analyze'); $response = $this->ollama->generateWithImage($this->model, $prompt, $imagePath); return [ 'manufacturer' => $this->extractField($response, 'MANUFACTURER'), 'model' => $this->extractField($response, 'MODEL'), 'serial' => $this->extractField($response, 'SERIAL'), ]; } private function extractField(string $response, string $field): string { if (preg_match('/^'.$field.':\s*(.+)$/m', $response, $matches)) { return trim($matches[1]); } return ''; } }