nothumanallowed 13.2.41 → 13.2.42
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/package.json +1 -1
- package/src/constants.mjs +1 -1
- package/src/services/llm.mjs +12 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.42",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/constants.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
|
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = path.dirname(__filename);
|
|
7
7
|
|
|
8
|
-
export const VERSION = '13.2.
|
|
8
|
+
export const VERSION = '13.2.42';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
package/src/services/llm.mjs
CHANGED
|
@@ -521,7 +521,7 @@ export async function callLLMStream(config, systemPrompt, userMessage, onToken,
|
|
|
521
521
|
{ role: 'system', content: sanitize(systemPrompt) },
|
|
522
522
|
{ role: 'user', content: sanitize(userMessage) },
|
|
523
523
|
],
|
|
524
|
-
stream:
|
|
524
|
+
stream: false,
|
|
525
525
|
chat_template_kwargs: { enable_thinking: thinkingEnabled },
|
|
526
526
|
};
|
|
527
527
|
const nhaRes = await fetch('https://nothumanallowed.com/api/v1/liara/chat', {
|
|
@@ -533,10 +533,13 @@ export async function callLLMStream(config, systemPrompt, userMessage, onToken,
|
|
|
533
533
|
const err = await nhaRes.text();
|
|
534
534
|
throw new Error(`NHA Free ${nhaRes.status}: ${err}`);
|
|
535
535
|
}
|
|
536
|
-
//
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
536
|
+
// Non-streaming: vLLM returns complete text — no BPE subword splitting issues
|
|
537
|
+
const nhaJson = await nhaRes.json();
|
|
538
|
+
let fullNhaText = nhaJson.choices?.[0]?.message?.content || '';
|
|
539
|
+
// Strip <think>...</think> blocks
|
|
540
|
+
fullNhaText = fullNhaText.replace(/<think>[\s\S]*?<\/think>/g, '').trim();
|
|
541
|
+
if (onToken) onToken(fullNhaText);
|
|
542
|
+
return fullNhaText;
|
|
540
543
|
}
|
|
541
544
|
|
|
542
545
|
const format = provider === 'anthropic' ? 'anthropic' : 'openai';
|
|
@@ -648,6 +651,7 @@ function parseSSEText(text, format, onToken) {
|
|
|
648
651
|
let thinkBuf = '';
|
|
649
652
|
let inThink = false;
|
|
650
653
|
let isHtmlOutput = false;
|
|
654
|
+
let chunkCount = 0;
|
|
651
655
|
|
|
652
656
|
for (const line of text.split('\n')) {
|
|
653
657
|
if (!line.startsWith('data: ')) continue;
|
|
@@ -681,6 +685,8 @@ function parseSSEText(text, format, onToken) {
|
|
|
681
685
|
}
|
|
682
686
|
}
|
|
683
687
|
if (out) {
|
|
688
|
+
chunkCount++;
|
|
689
|
+
if (chunkCount <= 3) process.stderr.write(`[QWEN3 CHUNK ${chunkCount}] len=${out.length} repr=${JSON.stringify(out.slice(0,60))}\n`);
|
|
684
690
|
// Detect HTML output on first meaningful token
|
|
685
691
|
if (!isHtmlOutput && (out.includes('<div') || out.includes('<!DOCTYPE') || out.includes('<html'))) {
|
|
686
692
|
isHtmlOutput = true;
|
|
@@ -698,7 +704,7 @@ function parseSSEText(text, format, onToken) {
|
|
|
698
704
|
}
|
|
699
705
|
} catch {}
|
|
700
706
|
}
|
|
701
|
-
|
|
707
|
+
process.stderr.write(`[QWEN3 TOTAL CHUNKS] ${chunkCount}, fullText len=${fullText.length}\n`);
|
|
702
708
|
return fullText;
|
|
703
709
|
}
|
|
704
710
|
|