utilitas 1998.1.18 → 1998.1.20
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/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/alan.mjs +4 -2
- package/lib/manifest.mjs +1 -1
- package/package.json +1 -1
package/lib/alan.mjs
CHANGED
|
@@ -358,10 +358,10 @@ const init = async (options) => {
|
|
|
358
358
|
}
|
|
359
359
|
break;
|
|
360
360
|
case OLLAMA:
|
|
361
|
-
|
|
361
|
+
clients[provider] || (options?.host && (clients[provider] = {
|
|
362
362
|
client: new (await need('ollama', { raw: true })).Ollama(options),
|
|
363
363
|
model: options?.model || DEFAULT_MODELS[OLLAMA],
|
|
364
|
-
});
|
|
364
|
+
}));
|
|
365
365
|
break;
|
|
366
366
|
default:
|
|
367
367
|
throwError(`Invalid AI provider: ${options?.provider || 'null'}`);
|
|
@@ -543,6 +543,8 @@ const packResp = async (resp, options) => {
|
|
|
543
543
|
if (lines[0] === '<think>' && indexOfEnd !== -1) {
|
|
544
544
|
lines[0] = '```think';
|
|
545
545
|
lines[indexOfEnd] = '```';
|
|
546
|
+
lines.slice(0, indexOfEnd - 1).join('').trim()
|
|
547
|
+
|| (lines = lines.slice(indexOfEnd + 1));
|
|
546
548
|
richText = lines.join('\n');
|
|
547
549
|
}
|
|
548
550
|
}
|
package/lib/manifest.mjs
CHANGED