mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
2fc2fc930b
* improve(ollama): defer optional runtime imports Punchcard-Session: coral-workshop-workshop-3f * improve(ollama): isolate lazy runtime modules * improve(ollama): preserve lazy runtime boundaries
20 lines
928 B
TypeScript
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);
|