QVAC Logo

close( )

Closes the SDK client connection and releases all associated resources (RPC worker, IPC server). Safe to call multiple times — subsequent calls are a no-op if already closed.

function close(): Promise

Returns

Promise

Example

import { loadModel, completion, close } from "@qvac/sdk";

const modelId = await loadModel({
  modelSrc: "/path/to/model.gguf",
  modelType: "llm",
});

const result = completion({
  modelId,
  history: [{ role: "user", content: "Hello" }],
});

console.log(await result.text);

await close();

On this page