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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.71.5",
3
+ "version": "3.71.6",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
package/src/LLM.js CHANGED
@@ -96,7 +96,7 @@ class LLM {
96
96
  const { provider, ...rest } = configuration;
97
97
 
98
98
  this._configuration = {
99
- transcriptFlag: 'gpt',
99
+ transcriptFlag: null,
100
100
  transcriptLength: 5,
101
101
  provider: null,
102
102
  logger: {
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
 
@@ -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;