wingbot 3.71.5 → 3.71.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/package.json +1 -1
- package/src/LLM.js +1 -1
- package/src/Responder.js +0 -9
- package/src/resolvers/message.js +11 -3
package/package.json
CHANGED
package/src/LLM.js
CHANGED
package/src/Responder.js
CHANGED
|
@@ -339,15 +339,6 @@ class Responder {
|
|
|
339
339
|
...LLM.anonymizeTranscript(transcript, transcriptAnonymize)
|
|
340
340
|
];
|
|
341
341
|
|
|
342
|
-
// eslint-disable-next-line no-console
|
|
343
|
-
console.log({
|
|
344
|
-
transcript,
|
|
345
|
-
transcriptLength,
|
|
346
|
-
transcriptFlag,
|
|
347
|
-
transcriptAnonymize,
|
|
348
|
-
chat
|
|
349
|
-
});
|
|
350
|
-
|
|
351
342
|
return new LLMSession(this.llm, chat, this._llmSend.bind(this));
|
|
352
343
|
}
|
|
353
344
|
|
package/src/resolvers/message.js
CHANGED
|
@@ -20,6 +20,7 @@ const {
|
|
|
20
20
|
FEATURE_SSML, FEATURE_TEXT, FEATURE_VOICE
|
|
21
21
|
} = require('../features');
|
|
22
22
|
const { vars, VAR_TYPES } = require('../utils/stateVariables');
|
|
23
|
+
const LLM = require('../LLM');
|
|
23
24
|
|
|
24
25
|
/** @typedef {import('../Responder').VoiceControl} VoiceControl */
|
|
25
26
|
/** @typedef {import('./utils').Translations} Translations */
|
|
@@ -417,10 +418,11 @@ function message (params, context = {}) {
|
|
|
417
418
|
}
|
|
418
419
|
|
|
419
420
|
if (params.type === 'prompt') {
|
|
421
|
+
res.typingOn()
|
|
422
|
+
.wait(1000);
|
|
420
423
|
const session = await res.llmSessionWithHistory(params.llmContextType);
|
|
421
424
|
|
|
422
425
|
await session.systemPrompt(text)
|
|
423
|
-
.debug()
|
|
424
426
|
.generate();
|
|
425
427
|
|
|
426
428
|
// if (!response.content) {
|
|
@@ -429,17 +431,23 @@ function message (params, context = {}) {
|
|
|
429
431
|
|
|
430
432
|
const messages = session.messagesToSend();
|
|
431
433
|
|
|
434
|
+
res.setFlag(LLM.GPT_FLAG);
|
|
435
|
+
|
|
432
436
|
const lastMessageI = messages.length - 1;
|
|
433
437
|
messages.forEach((m, i) => {
|
|
434
438
|
if (lastMessageI === i) {
|
|
435
439
|
text = m.content;
|
|
436
440
|
} else {
|
|
437
|
-
res.text(m.content
|
|
441
|
+
res.text(m.content, null, null, {
|
|
442
|
+
disableAutoTyping: true
|
|
443
|
+
});
|
|
438
444
|
}
|
|
439
445
|
});
|
|
440
446
|
}
|
|
441
447
|
|
|
442
|
-
res.text(text, sendReplies, voiceControl
|
|
448
|
+
res.text(text, sendReplies, voiceControl, {
|
|
449
|
+
disableAutoTyping: params.type === 'prompt'
|
|
450
|
+
});
|
|
443
451
|
|
|
444
452
|
if (isLastMessage && !req.actionData()._resolverTag) {
|
|
445
453
|
res.finalMessageSent = true;
|