local.js 870 B

123456789101112131415161718192021
  1. import { commercialApiHold } from "../model-policy.js";
  2. /** Historical SDK symbol. Construction is blocked by the commercial-only policy. */
  3. export class LocalLlamaCppProvider {
  4. kind = "local";
  5. constructor(_config = {}) {
  6. throw commercialApiHold("LocalLlamaCppProvider is disabled; configure an approved commercial API");
  7. }
  8. getModelId() { return "disabled-local-provider"; }
  9. getDimensions() { return undefined; }
  10. getLastError() { return "QMD_COMMERCIAL_API_HOLD"; }
  11. async healthcheck(_signal) {
  12. throw commercialApiHold("local provider healthcheck is disabled");
  13. }
  14. async embed(_text, _options = {}) {
  15. throw commercialApiHold("local embedding is disabled");
  16. }
  17. async embedBatch(_texts, _options = {}) {
  18. throw commercialApiHold("local batch embedding is disabled");
  19. }
  20. async dispose() { }
  21. }