INNER CODE UNIT · Python
_load_replicate_module
CassiopeiaCode/q2api · app.py:77
def _load_replicate_module():
mod_path = BASE_DIR / "replicate.py"
spec = importlib.util.spec_from_file_location("v2_replicate", str(mod_path))
module = importlib.util.module_from_spec(spec) # type: ignore[arg-type]
assert spec is not None and spec.loader is not None
spec.loader.exec_module(module) # type: ignore[attr-defined]
return module
_replicate = _load_replicate_module()
send_chat_request = _replicate.send_chat_request
# ------------------------------------------------------------------------------
# Dynamic import of Claude modules
# ------------------------------------------------------------------------------
def _load_claude_modules():
# claude_types
spec_types = importlib.util.spec_from_file_location("v2_claude_types", str(BASE_DIR / "claude_types.py"))