@digipair/skill-dsp 0.8.22 → 0.8.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +9 -10
- package/index.esm.js +9 -10
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -23510,14 +23510,14 @@ function indent(str, spaces) {
|
|
|
23510
23510
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23511
23511
|
// match is required
|
|
23512
23512
|
if (!match) {
|
|
23513
|
-
return
|
|
23513
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
|
23514
23514
|
v: nextMatch1
|
|
23515
23515
|
};
|
|
23516
23516
|
}
|
|
23517
23517
|
var token = match.token, offset = match.offset;
|
|
23518
23518
|
i1 += offset;
|
|
23519
23519
|
if (token === " ") {
|
|
23520
|
-
return
|
|
23520
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
23521
23521
|
}
|
|
23522
23522
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23523
23523
|
token
|
|
@@ -23536,7 +23536,7 @@ function indent(str, spaces) {
|
|
|
23536
23536
|
if (contextKeys.some(function(el) {
|
|
23537
23537
|
return el.startsWith(name);
|
|
23538
23538
|
})) {
|
|
23539
|
-
return
|
|
23539
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
23540
23540
|
}
|
|
23541
23541
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23542
23542
|
return el === name;
|
|
@@ -23555,9 +23555,9 @@ function indent(str, spaces) {
|
|
|
23555
23555
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23556
23556
|
return el.startsWith(name);
|
|
23557
23557
|
})) {
|
|
23558
|
-
return
|
|
23558
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
23559
23559
|
}
|
|
23560
|
-
return
|
|
23560
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
|
23561
23561
|
v: nextMatch1
|
|
23562
23562
|
};
|
|
23563
23563
|
};
|
|
@@ -27463,12 +27463,11 @@ const preparePinsSettings = async (settings, context)=>{
|
|
|
27463
27463
|
});
|
|
27464
27464
|
};
|
|
27465
27465
|
|
|
27466
|
-
var _process_env_OLLAMA_SERVER;
|
|
27467
|
-
const OLLAMA_SERVER = (_process_env_OLLAMA_SERVER = process.env['OLLAMA_SERVER']) != null ? _process_env_OLLAMA_SERVER : 'http://localhost:11434';
|
|
27468
27466
|
let DspService = class DspService {
|
|
27469
|
-
async model(params, _pinsSettingsList,
|
|
27467
|
+
async model(params, _pinsSettingsList, context) {
|
|
27470
27468
|
const { AI } = await eval(`import('llmclient')`);
|
|
27471
|
-
|
|
27469
|
+
var _context_privates_OLLAMA_SERVER, _ref;
|
|
27470
|
+
const { apiKey = 'none', modelName = 'mistral', temperature = 0, keepAlive = 0, baseUrl = (_ref = (_context_privates_OLLAMA_SERVER = context.privates.OLLAMA_SERVER) != null ? _context_privates_OLLAMA_SERVER : process.env['OLLAMA_SERVER']) != null ? _ref : 'http://localhost:11434', debug = false } = params;
|
|
27472
27471
|
const model = AI('openai', {
|
|
27473
27472
|
apiKey,
|
|
27474
27473
|
apiURL: baseUrl + '/v1',
|
|
@@ -27485,7 +27484,7 @@ let DspService = class DspService {
|
|
|
27485
27484
|
}
|
|
27486
27485
|
async generate(params, _pinsSettingsList, context) {
|
|
27487
27486
|
const { Generate } = await eval(`import('llmclient')`);
|
|
27488
|
-
const { model = context.privates.
|
|
27487
|
+
const { model = context.privates.MODEL_DSP, signature, input } = params;
|
|
27489
27488
|
const modelInstance = await executePinsList(model, context);
|
|
27490
27489
|
const gen = new Generate(modelInstance, signature);
|
|
27491
27490
|
const result = await gen.forward(input);
|
package/index.esm.js
CHANGED
|
@@ -23488,14 +23488,14 @@ function indent(str, spaces) {
|
|
|
23488
23488
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23489
23489
|
// match is required
|
|
23490
23490
|
if (!match) {
|
|
23491
|
-
return
|
|
23491
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
23492
23492
|
v: nextMatch1
|
|
23493
23493
|
};
|
|
23494
23494
|
}
|
|
23495
23495
|
var token = match.token, offset = match.offset;
|
|
23496
23496
|
i1 += offset;
|
|
23497
23497
|
if (token === " ") {
|
|
23498
|
-
return
|
|
23498
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
23499
23499
|
}
|
|
23500
23500
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23501
23501
|
token
|
|
@@ -23514,7 +23514,7 @@ function indent(str, spaces) {
|
|
|
23514
23514
|
if (contextKeys.some(function(el) {
|
|
23515
23515
|
return el.startsWith(name);
|
|
23516
23516
|
})) {
|
|
23517
|
-
return
|
|
23517
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
23518
23518
|
}
|
|
23519
23519
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23520
23520
|
return el === name;
|
|
@@ -23533,9 +23533,9 @@ function indent(str, spaces) {
|
|
|
23533
23533
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23534
23534
|
return el.startsWith(name);
|
|
23535
23535
|
})) {
|
|
23536
|
-
return
|
|
23536
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
23537
23537
|
}
|
|
23538
|
-
return
|
|
23538
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
23539
23539
|
v: nextMatch1
|
|
23540
23540
|
};
|
|
23541
23541
|
};
|
|
@@ -27441,12 +27441,11 @@ const preparePinsSettings = async (settings, context)=>{
|
|
|
27441
27441
|
});
|
|
27442
27442
|
};
|
|
27443
27443
|
|
|
27444
|
-
var _process_env_OLLAMA_SERVER;
|
|
27445
|
-
const OLLAMA_SERVER = (_process_env_OLLAMA_SERVER = process.env['OLLAMA_SERVER']) != null ? _process_env_OLLAMA_SERVER : 'http://localhost:11434';
|
|
27446
27444
|
let DspService = class DspService {
|
|
27447
|
-
async model(params, _pinsSettingsList,
|
|
27445
|
+
async model(params, _pinsSettingsList, context) {
|
|
27448
27446
|
const { AI } = await eval(`import('llmclient')`);
|
|
27449
|
-
|
|
27447
|
+
var _context_privates_OLLAMA_SERVER, _ref;
|
|
27448
|
+
const { apiKey = 'none', modelName = 'mistral', temperature = 0, keepAlive = 0, baseUrl = (_ref = (_context_privates_OLLAMA_SERVER = context.privates.OLLAMA_SERVER) != null ? _context_privates_OLLAMA_SERVER : process.env['OLLAMA_SERVER']) != null ? _ref : 'http://localhost:11434', debug = false } = params;
|
|
27450
27449
|
const model = AI('openai', {
|
|
27451
27450
|
apiKey,
|
|
27452
27451
|
apiURL: baseUrl + '/v1',
|
|
@@ -27463,7 +27462,7 @@ let DspService = class DspService {
|
|
|
27463
27462
|
}
|
|
27464
27463
|
async generate(params, _pinsSettingsList, context) {
|
|
27465
27464
|
const { Generate } = await eval(`import('llmclient')`);
|
|
27466
|
-
const { model = context.privates.
|
|
27465
|
+
const { model = context.privates.MODEL_DSP, signature, input } = params;
|
|
27467
27466
|
const modelInstance = await executePinsList(model, context);
|
|
27468
27467
|
const gen = new Generate(modelInstance, signature);
|
|
27469
27468
|
const result = await gen.forward(input);
|