Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openclaw/src/plugin-sdk/   (KI Agentensystem Version 22©)  Datei vom 26.3.2026 mit Größe 1 kB image not shown  

Quelle  lmstudio-runtime.test.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import { beforeEach, describe, expect, it, vi } from "vitest";

const loadBundledPluginPublicSurfaceModuleSync = vi.hoisted(() => vi.fn());

vi.mock("./facade-runtime.js", async () => {
  const actual = await vi.importActual<typeof import("./facade-runtime.js")>("./facade-runtime.js");
  return {
    ...actual,
    loadBundledPluginPublicSurfaceModuleSync,
  };
});

describe("plugin-sdk lmstudio-runtime", () => {
  beforeEach(() => {
    loadBundledPluginPublicSurfaceModuleSync.mockReset();
  });

  it("keeps the lmstudio runtime facade cold until a helper is used", async () => {
    const module = await import("./lmstudio-runtime.js");

    expect(loadBundledPluginPublicSurfaceModuleSync).not.toHaveBeenCalled();
    expect(module.LMSTUDIO_PROVIDER_ID).toBe("lmstudio");
    expect(module.LMSTUDIO_DEFAULT_EMBEDDING_MODEL).toBe("text-embedding-nomic-embed-text-v1.5");
    expect(loadBundledPluginPublicSurfaceModuleSync).not.toHaveBeenCalled();
  });

  it("delegates lmstudio helpers through the bundled runtime facade", async () => {
    const resolveLmstudioInferenceBase = vi.fn().mockReturnValue("http://localhost:1234/v1");
    loadBundledPluginPublicSurfaceModuleSync.mockReturnValue({
      resolveLmstudioInferenceBase,
    });

    const module = await import("./lmstudio-runtime.js");

    expect(module.resolveLmstudioInferenceBase("http://localhost:1234/api/v1/")).toBe(
      "http://localhost:1234/v1",
    );
    expect(loadBundledPluginPublicSurfaceModuleSync).toHaveBeenCalledWith({
      dirName: "lmstudio",
      artifactBasename: "runtime-api.js",
    });
    expect(resolveLmstudioInferenceBase).toHaveBeenCalledWith("http://localhost:1234/api/v1/");
  });
});

¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.