Files
openclaw/extensions/ollama/src/setup.ts
Vincent Koc 2fc2fc930b improve(ollama): reduce inactive startup cost (#119745)
* improve(ollama): defer optional runtime imports

Punchcard-Session: coral-workshop-workshop-3f

* improve(ollama): isolate lazy runtime modules

* improve(ollama): preserve lazy runtime boundaries
2026-08-06 07:40:22 +08:00

20 lines
928 B
TypeScript

import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
export { resolveOllamaSetupDefaultBaseUrl } from "./defaults.js";
export { buildOllamaProvider } from "./provider-models.js";
type OllamaSetupRuntime = typeof import("./setup.runtime.js");
const loadOllamaSetupRuntime = createLazyRuntimeModule(() => import("./setup.runtime.js"));
export const promptAndConfigureOllama: OllamaSetupRuntime["promptAndConfigureOllama"] = async (
...args
) => await (await loadOllamaSetupRuntime()).promptAndConfigureOllama(...args);
export const configureOllamaNonInteractive: OllamaSetupRuntime["configureOllamaNonInteractive"] =
async (...args) => await (await loadOllamaSetupRuntime()).configureOllamaNonInteractive(...args);
export const ensureOllamaModelPulled: OllamaSetupRuntime["ensureOllamaModelPulled"] = async (
...args
) => await (await loadOllamaSetupRuntime()).ensureOllamaModelPulled(...args);