MCPcopy
hub / github.com/volcengine/OpenViking / check_native_engine

Function check_native_engine

openviking_cli/doctor.py:146–169  ·  view source on GitHub ↗

Check if the native vector engine (PersistStore) is available.

()

Source from the content-addressed store, hash-verified

144
145
146def check_native_engine() -> tuple[bool, str, Optional[str]]:
147 """Check if the native vector engine (PersistStore) is available."""
148 try:
149 from openviking.storage.vectordb.engine import (
150 AVAILABLE_ENGINE_VARIANTS,
151 ENGINE_VARIANT,
152 )
153 except ImportError as exc:
154 return (
155 False,
156 f"Cannot import engine module: {exc}",
157 "pip install openviking --upgrade --force-reinstall",
158 )
159
160 if ENGINE_VARIANT == "unavailable":
161 variants = ", ".join(AVAILABLE_ENGINE_VARIANTS) if AVAILABLE_ENGINE_VARIANTS else "none"
162 machine = platform.machine()
163 return (
164 False,
165 f"No compatible engine variant (platform: {machine}, packaged: {variants})",
166 'pip install openviking --upgrade --force-reinstall\n Alt: Use vectordb.backend = "volcengine" instead of "local"',
167 )
168
169 return True, f"variant={ENGINE_VARIANT}", None
170
171
172def check_agfs() -> tuple[bool, str, Optional[str]]:

Callers 2

Calls 1

joinMethod · 0.45

Tested by 2