def predict(self, image: str | Path, prompt: Prompt) -> str:
        """Predict whether an image contains anomalies.

        Args:
            image (str | Path): Path to the image to analyze
            prompt (Prompt): Prompt object containing few-shot and prediction prompts

        Returns:
            str: Model's prediction response

        Raises:
            ImportError: If Ollama package is not installed
        """
        if not chat:
            msg = "Ollama is not installed. Please install it using `pip install ollama`."
            raise ImportError(msg)
        image_encoded = Image(value=image)
        messages = []

        # few-shot
        if len(self._ref_images_encoded) > 0:
            messages.append(self._generate_message(content=prompt.few_shot, images=self._ref_images_encoded))

        messages.append(self._generate_message(content=prompt.predict, images=[image_encoded]))

        response = chat(
            model=self.model_name,
            messages=messages,
        )
        return response["message"]["content"].strip()
Predict whether an image contains anomalies.

        Args:
            image (str | Path): Path to the image to analyze
            prompt (Prompt): Prompt object containing few-shot and prediction prompts

        Returns:
            str: Model's prediction response

        Raises:
            ImportError: If Ollama package is not installed
        
src/anomalib/models/image/vlm_ad/backends/ollama.py