| from __future__ import annotations | |
| from pathlib import Path | |
| from backends.base import InputType, OCRResult | |
| class _Stub: | |
| name = "apple" | |
| def health(self) -> bool: | |
| return False | |
| class AppleLLM(_Stub): | |
| accepts_images = True | |
| def complete_json(self, *, system: str, user: str, image_jpeg: bytes | None = None) -> str: | |
| raise NotImplementedError("Apple Vision / Foundation Models backend is Phase 2.") | |
| class AppleEmbed(_Stub): | |
| dim = 0 | |
| def embed(self, texts: list[str], *, input_type: InputType) -> list[list[float]]: | |
| raise NotImplementedError("Apple embed backend is Phase 2.") | |
| class AppleOCR(_Stub): | |
| def ocr(self, path: Path) -> OCRResult: | |
| raise NotImplementedError(f"Apple Vision OCR is Phase 2 (path={path}).") | |