nothumanallowed 11.3.0 → 11.4.0
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 +14 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 53 tools. Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, GitHub, Notion, Slack, voice chat, 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 = '11.
|
|
8
|
+
export const VERSION = '11.4.0';
|
|
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
|
@@ -237,15 +237,22 @@ export async function streamSSE(res, format) {
|
|
|
237
237
|
* Connects to the NHA-hosted Qwen3 + LoRA on Hetzner GPU.
|
|
238
238
|
* OpenAI-compatible format. Slower than paid providers (5-15 seconds).
|
|
239
239
|
*/
|
|
240
|
+
/**
|
|
241
|
+
* NHA Free (Liara) — free LLM tier, no API key required.
|
|
242
|
+
* Connects to the NHA-hosted Qwen3 32B on Hetzner GPU.
|
|
243
|
+
* OpenAI-compatible format. Slower than paid providers (5-15 seconds).
|
|
244
|
+
* Supports thinking mode (Qwen3 native reasoning).
|
|
245
|
+
*/
|
|
240
246
|
export async function callNHA(apiKey, model, systemPrompt, userMessage, stream = false) {
|
|
241
247
|
const body = {
|
|
242
|
-
model: model || '
|
|
248
|
+
model: model || '/opt/models/qwen3-32b',
|
|
243
249
|
max_tokens: 4096,
|
|
244
250
|
messages: [
|
|
245
251
|
{ role: 'system', content: systemPrompt },
|
|
246
252
|
{ role: 'user', content: userMessage },
|
|
247
253
|
],
|
|
248
254
|
stream,
|
|
255
|
+
chat_template_kwargs: { enable_thinking: false }, // OFF by default for speed
|
|
249
256
|
};
|
|
250
257
|
const res = await fetch('https://liara.nothumanallowed.com/v1/chat/completions', {
|
|
251
258
|
method: 'POST',
|
|
@@ -258,9 +265,12 @@ export async function callNHA(apiKey, model, systemPrompt, userMessage, stream =
|
|
|
258
265
|
const err = await res.text();
|
|
259
266
|
throw new Error(`NHA Free ${res.status}: ${err}`);
|
|
260
267
|
}
|
|
261
|
-
if (stream) return streamSSE(res, 'openai');
|
|
268
|
+
if (stream) return streamSSE(res, 'openai');
|
|
262
269
|
const data = await res.json();
|
|
263
|
-
|
|
270
|
+
let content = data.choices?.[0]?.message?.content || '';
|
|
271
|
+
// Strip thinking tags if present
|
|
272
|
+
content = content.replace(/<think>[\s\S]*?<\/think>/g, '').trim();
|
|
273
|
+
return content;
|
|
264
274
|
}
|
|
265
275
|
|
|
266
276
|
const PROVIDERS = {
|
|
@@ -452,7 +462,7 @@ function buildRequestBody(provider, model, systemPrompt, userMessage, stream) {
|
|
|
452
462
|
}
|
|
453
463
|
// OpenAI-compatible format (OpenAI, DeepSeek, Grok, Mistral)
|
|
454
464
|
const modelDefaults = {
|
|
455
|
-
nha: '
|
|
465
|
+
nha: '/opt/models/qwen3-32b',
|
|
456
466
|
openai: 'gpt-4o',
|
|
457
467
|
deepseek: 'deepseek-chat',
|
|
458
468
|
grok: 'grok-3-latest',
|