MCPcopy Create free account
hub / github.com/VitoHowe/glm-coding / _worker_analyze

Function _worker_analyze

app/services/ocr_service.py:88–101  ·  view source on GitHub ↗
(data: bytes, prompt_text: str, include_debug: bool)

Source from the content-addressed store, hash-verified

86 "available": not missing,
87 "missing_dependencies": missing,
88 "include_debug": self.settings.tencent_ocr_include_debug,
89 "workers": self.settings.tencent_ocr_workers,
90 "timeout_seconds": self.settings.tencent_ocr_timeout_seconds,
91 "executor_ready": self._executor is not None,
92 "engine_bootstrapped": self._engine_bootstrapped,
93 }
94
95 def warmup(self) -> None:
96 if not self.settings.tencent_ocr_enabled:
97 return
98 missing = self._missing_dependencies()
99 if missing:
100 raise BadRequestError(
101 "本地 OCR 依赖没装全,先运行 pip install -r requirements.txt,别让发动机缺缸还硬跑。",
102 details={"missing_dependencies": missing},
103 )
104 self._bootstrap_engine_once()

Callers

nothing calls this directly

Calls 4

_ignore_worker_sigintFunction · 0.85
_clear_proxy_envFunction · 0.85
_load_adapter_moduleFunction · 0.85

Tested by

no test coverage detected