utilitas 2000.2.4 → 2000.2.6
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 +9 -6
- package/lib/manifest.mjs +1 -1
- package/package.json +1 -1
package/lib/alan.mjs
CHANGED
|
@@ -51,10 +51,10 @@ const [
|
|
|
51
51
|
GPT_51_CODEX, GPT_5_IMAGE, GEMMA_3_27B, ANTHROPIC, v8k, ais,
|
|
52
52
|
MAX_TOOL_RECURSION, LOG, name, user, system, assistant, MODEL, JSON_OBJECT,
|
|
53
53
|
tokenSafeRatio, CONTENT_IS_REQUIRED, OPENAI_HI_RES_SIZE, k, kT, m, minute,
|
|
54
|
-
hour, gb, trimTailing, GEMINI_30_PRO_IMAGE, IMAGE, JINA,
|
|
55
|
-
SILICONFLOW, SF_DEEPSEEK_R1, MAX_TIRE, OPENROUTER_API,
|
|
56
|
-
TOOL, S_OPENAI, S_GOOGLE, S_ANTHROPIC, ONLINE,
|
|
57
|
-
GEMINI_25_FLASH,
|
|
54
|
+
hour, gb, trimTailing, trimBeginning, GEMINI_30_PRO_IMAGE, IMAGE, JINA,
|
|
55
|
+
JINA_DEEPSEARCH, SILICONFLOW, SF_DEEPSEEK_R1, MAX_TIRE, OPENROUTER_API,
|
|
56
|
+
OPENROUTER, AUTO, TOOL, S_OPENAI, S_GOOGLE, S_ANTHROPIC, ONLINE,
|
|
57
|
+
GEMINI_30_PRO, GEMINI_25_FLASH,
|
|
58
58
|
] = [
|
|
59
59
|
'OpenAI', 'Gemini', 'Ollama', 'nova', 'deepseek-r1', '```',
|
|
60
60
|
'claude-sonnet-4.5', 'audio', 'wav', '[ATTACHMENTS]', 'OPENAI_VOICE',
|
|
@@ -65,8 +65,9 @@ const [
|
|
|
65
65
|
'json_object', 1.1, 'Content is required.', 2048 * 2048, x => 1024 * x,
|
|
66
66
|
x => 1000 * x, x => 1024 * 1024 * x, x => 60 * x, x => 60 * 60 * x,
|
|
67
67
|
x => 1024 * 1024 * 1024 * x, x => x.replace(/[\.\s]*$/, ''),
|
|
68
|
-
'gemini-3-pro-image-preview', 'image',
|
|
69
|
-
'
|
|
68
|
+
x => x.replace(/^[\.\s]*/, ''), 'gemini-3-pro-image-preview', 'image',
|
|
69
|
+
'Jina', 'jina-deepsearch-v1', 'SiliconFlow',
|
|
70
|
+
'Pro/deepseek-ai/DeepSeek-R1', 768 * 768,
|
|
70
71
|
'https://openrouter.ai/api/v1', 'OpenRouter', 'openrouter/auto', 'tool',
|
|
71
72
|
'openai', 'google', 'anthropic', ':online', 'gemini-3-pro-preview',
|
|
72
73
|
'gemini-2.5-flash-preview-09-2025',
|
|
@@ -725,6 +726,8 @@ const buildPrompts = async (model, input, options = {}) => {
|
|
|
725
726
|
if (options.messages?.length) {
|
|
726
727
|
options.messages?.shift();
|
|
727
728
|
msgBuilder();
|
|
729
|
+
} else if (options.trimBeginning) {
|
|
730
|
+
content = '...' + trimBeginning(trimBeginning(content).slice(1));
|
|
728
731
|
} else {
|
|
729
732
|
content = trimTailing(trimTailing(content).slice(0, -1)) + '...';
|
|
730
733
|
} // @todo: audioCostTokens (needs to calculate the audio length):
|
package/lib/manifest.mjs
CHANGED