blun-king-cli 7.3.3 → 7.3.4
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/lib/chat.js +8 -1
- package/lib/client.js +10 -1
- package/package.json +1 -1
package/lib/chat.js
CHANGED
|
@@ -341,7 +341,14 @@ function startChat() {
|
|
|
341
341
|
// Show thinking indicator
|
|
342
342
|
printToScrollArea(chalk.dim(" ⠋ Thinking..."));
|
|
343
343
|
|
|
344
|
-
client.sendMessage(input, {
|
|
344
|
+
client.sendMessage(input, {
|
|
345
|
+
model: settings.model || "auto",
|
|
346
|
+
latencyMode: settings.latencyMode || "fast",
|
|
347
|
+
styleMode: settings.styleMode || "normal",
|
|
348
|
+
toolMode: settings.toolMode || "smart",
|
|
349
|
+
historyWindow: settings.historyWindow || 8,
|
|
350
|
+
language: settings.language || "de",
|
|
351
|
+
})
|
|
345
352
|
.then(function (res) {
|
|
346
353
|
if (res.status === 200 && res.data) {
|
|
347
354
|
var text = res.data.answer || res.data.response || res.data.text || res.data.message || JSON.stringify(res.data);
|
package/lib/client.js
CHANGED
|
@@ -39,7 +39,16 @@ function request(method, urlPath, body) {
|
|
|
39
39
|
|
|
40
40
|
function sendMessage(message, options) {
|
|
41
41
|
options = options || {};
|
|
42
|
-
var body = {
|
|
42
|
+
var body = {
|
|
43
|
+
message: message,
|
|
44
|
+
model: options.model || "auto",
|
|
45
|
+
stream: false,
|
|
46
|
+
latency_mode: options.latencyMode || "fast",
|
|
47
|
+
style_mode: options.styleMode || "normal",
|
|
48
|
+
tool_mode: options.toolMode || "smart",
|
|
49
|
+
history_window: options.historyWindow || 8,
|
|
50
|
+
language: options.language || "de",
|
|
51
|
+
};
|
|
43
52
|
return request("POST", "/api/king/chat", body);
|
|
44
53
|
}
|
|
45
54
|
|