@tiledesk/tiledesk-tybot-connector 2.0.43 → 2.0.45

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/logs/app.log CHANGED
@@ -1357,3 +1357,55 @@ error: DirAiPrompt error executing action: this is the error message
1357
1357
  error: (Tilebot) Redis connection error: connect ECONNREFUSED 127.0.0.1:6379 {"address":"127.0.0.1","code":"ECONNREFUSED","errno":-61,"port":6379,"stack":"Error: connect ECONNREFUSED 127.0.0.1:6379\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)","syscall":"connect"}
1358
1358
  error: [Iteration] Cannot initialize iteration: actionId is required
1359
1359
  error: [Iteration] Cannot initialize iteration: actionId is required
1360
+ error: Axios error response data: Integration not found for model undefined
1361
+ error: Error: DirAiPrompt llm key not found in integrations
1362
+ error: Axios error response data: {"detail":[{"loc":["string",0],"msg":"this is the error message","type":"string"}]}
1363
+ error: DirAiPrompt openai err: {"detail":[{"loc":["string",0],"msg":"this is the error message","type":"string"}]}
1364
+ error: DirAiPrompt error executing action: this is the error message
1365
+ error: Axios error response data: Integration not found for model undefined
1366
+ error: Error: DirAiPrompt llm key not found in integrations
1367
+ error: Axios error response data: {"detail":[{"loc":["string",0],"msg":"this is the error message","type":"string"}]}
1368
+ error: DirAiPrompt openai err: {"detail":[{"loc":["string",0],"msg":"this is the error message","type":"string"}]}
1369
+ error: DirAiPrompt error executing action: this is the error message
1370
+ error: (DirAskGPT) Error: gptkey is mandatory
1371
+ error: Axios error response data: {"error":"no knowledge base settings found"}
1372
+ error: DirAskGPT Get kb settings error {"error":"no knowledge base settings found"}
1373
+ error: (DirAskGPT) Error: gptkey is mandatory
1374
+ error: (DirAskGPT) Error: question attribute is mandatory. Executing condition false...
1375
+ error: (DirAskGPT) Error: kbid attribute is mandatory. Executing condition false...
1376
+ error: Axios error response data: <!DOCTYPE html>
1377
+ <html lang="en">
1378
+ <head>
1379
+ <meta charset="utf-8">
1380
+ <title>Error</title>
1381
+ </head>
1382
+ <body>
1383
+ <pre>AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:<br><br> &nbsp;assert(req.body.model.model === &quot;gemini-2.0&quot;)<br><br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/test/conversation-askgptv2_test.js:273:7<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at next (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/route.js:144:13)<br> &nbsp; &nbsp;at Route.dispatch (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/route.js:114:3)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:284:15<br> &nbsp; &nbsp;at Function.process_params (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:346:12)<br> &nbsp; &nbsp;at next (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:280:10)<br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/body-parser/lib/read.js:137:5<br> &nbsp; &nbsp;at AsyncResource.runInAsyncScope (node:async_hooks:203:9)<br> &nbsp; &nbsp;at invokeCallback (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:231:16)<br> &nbsp; &nbsp;at done (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:220:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:280:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (node:events:525:35)<br> &nbsp; &nbsp;at endReadableNT (node:internal/streams/readable:1358:12)<br> &nbsp; &nbsp;at processTicksAndRejections (node:internal/process/task_queues:83:21)</pre>
1384
+ </body>
1385
+ </html>
1386
+
1387
+ error: DirAskGPTV2 error: {"data":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:<br><br> &nbsp;assert(req.body.model.model === &quot;gemini-2.0&quot;)<br><br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/test/conversation-askgptv2_test.js:273:7<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at next (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/route.js:144:13)<br> &nbsp; &nbsp;at Route.dispatch (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/route.js:114:3)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:284:15<br> &nbsp; &nbsp;at Function.process_params (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:346:12)<br> &nbsp; &nbsp;at next (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:280:10)<br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/body-parser/lib/read.js:137:5<br> &nbsp; &nbsp;at AsyncResource.runInAsyncScope (node:async_hooks:203:9)<br> &nbsp; &nbsp;at invokeCallback (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:231:16)<br> &nbsp; &nbsp;at done (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:220:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:280:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (node:events:525:35)<br> &nbsp; &nbsp;at endReadableNT (node:internal/streams/readable:1358:12)<br> &nbsp; &nbsp;at processTicksAndRejections (node:internal/process/task_queues:83:21)</pre>\n</body>\n</html>\n","status":500,"statusText":"Internal Server Error"}
1388
+ error: Axios error response data: <!DOCTYPE html>
1389
+ <html lang="en">
1390
+ <head>
1391
+ <meta charset="utf-8">
1392
+ <title>Error</title>
1393
+ </head>
1394
+ <body>
1395
+ <pre>AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:<br><br> &nbsp;assert(req.body.reasoningLevel === &quot;low&quot;)<br><br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/test/conversation-ai_prompt_test.js:881:9<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at next (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/route.js:144:13)<br> &nbsp; &nbsp;at Route.dispatch (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/route.js:114:3)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:284:15<br> &nbsp; &nbsp;at Function.process_params (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:346:12)<br> &nbsp; &nbsp;at next (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:280:10)<br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/body-parser/lib/read.js:137:5<br> &nbsp; &nbsp;at AsyncResource.runInAsyncScope (node:async_hooks:203:9)<br> &nbsp; &nbsp;at invokeCallback (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:231:16)<br> &nbsp; &nbsp;at done (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:220:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:280:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (node:events:525:35)<br> &nbsp; &nbsp;at endReadableNT (node:internal/streams/readable:1358:12)<br> &nbsp; &nbsp;at processTicksAndRejections (node:internal/process/task_queues:83:21)</pre>
1396
+ </body>
1397
+ </html>
1398
+
1399
+ error: DirAiPrompt openai err:
1400
+ error: Axios error response data: <!DOCTYPE html>
1401
+ <html lang="en">
1402
+ <head>
1403
+ <meta charset="utf-8">
1404
+ <title>Error</title>
1405
+ </head>
1406
+ <body>
1407
+ <pre>AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:<br><br> &nbsp;assert(req.body.reasoningLevel === &quot;low&quot;)<br><br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/test/conversation-ai_prompt_test.js:882:9<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at next (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/route.js:144:13)<br> &nbsp; &nbsp;at Route.dispatch (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/route.js:114:3)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:284:15<br> &nbsp; &nbsp;at Function.process_params (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:346:12)<br> &nbsp; &nbsp;at next (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/express/lib/router/index.js:280:10)<br> &nbsp; &nbsp;at /Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/body-parser/lib/read.js:137:5<br> &nbsp; &nbsp;at AsyncResource.runInAsyncScope (node:async_hooks:203:9)<br> &nbsp; &nbsp;at invokeCallback (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:231:16)<br> &nbsp; &nbsp;at done (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:220:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/Users/johnny/Documents/Tiledesk/tiledesk-chatbot/tybotRoute/node_modules/raw-body/index.js:280:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (node:events:525:35)<br> &nbsp; &nbsp;at endReadableNT (node:internal/streams/readable:1358:12)<br> &nbsp; &nbsp;at processTicksAndRejections (node:internal/process/task_queues:83:21)</pre>
1408
+ </body>
1409
+ </html>
1410
+
1411
+ error: DirAiPrompt openai err:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "2.0.43",
3
+ "version": "2.0.45",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -158,6 +158,10 @@ class DirAddKbContent {
158
158
  name: filled_name,
159
159
  source: filled_name
160
160
  };
161
+
162
+ if (action.tags && Array.isArray(action.tags) && action.tags.every(tag => typeof tag === "string")) {
163
+ json .tags = action.tags;
164
+ }
161
165
 
162
166
  winston.debug("[DirAddKbContent] json:", json);
163
167
 
@@ -341,6 +341,10 @@ class DirAskGPTV2 {
341
341
  json.chat_history_dict = await this.transcriptToLLM(transcript);
342
342
  }
343
343
 
344
+ if (action.tags && Array.isArray(action.tags) && action.tags.every(tag => typeof tag === "string")) {
345
+ json.tags = action.tags;
346
+ }
347
+
344
348
  winston.debug("DirAskGPTV2 json:", json);
345
349
 
346
350
  let kb_endpoint = process.env.KB_ENDPOINT_QA;
@@ -362,7 +366,6 @@ class DirAskGPTV2 {
362
366
 
363
367
  httpUtils.request(
364
368
  HTTPREQUEST, async (err, resbody) => {
365
- console.log("resbody: ", JSON.stringify(resbody));
366
369
  if (err) {
367
370
  winston.error("DirAskGPTV2 error: ", {
368
371
  status: err.response?.status,
@@ -383,7 +386,6 @@ class DirAskGPTV2 {
383
386
  }
384
387
  else if (resbody.success === true) {
385
388
  winston.debug("DirAskGPTV2 resbody: ", resbody);
386
- console.log("Answer: ", resbody.answer);
387
389
  if (chunks_only) {
388
390
  await this.#assignAttributes(action, resbody.answer, resbody.source, resbody.chunks);
389
391
  if (trueIntent) {
@@ -395,7 +397,6 @@ class DirAskGPTV2 {
395
397
  return;
396
398
 
397
399
  } else {
398
- console.log("assign answer to ", action.assignReplyTo)
399
400
  await this.#assignAttributes(action, resbody.answer, resbody.source, resbody.content_chunks);
400
401
  if (publicKey === true && !chunks_only) {
401
402
  let tokens_usage = {
@@ -408,7 +409,6 @@ class DirAskGPTV2 {
408
409
  }
409
410
 
410
411
  if (trueIntent) {
411
- console.log("execute true intent");
412
412
  await this.#executeCondition(true, trueIntent, trueIntentAttributes, falseIntent, falseIntentAttributes);
413
413
  callback(true);
414
414
  return;
@@ -417,7 +417,6 @@ class DirAskGPTV2 {
417
417
  return;
418
418
  }
419
419
  } else {
420
- console.log("else case. Assign answer: ", answer);
421
420
  await this.#assignAttributes(action, answer, source);
422
421
  if (!skip_unanswered) {
423
422
  kbService.addUnansweredQuestion(this.projectId, json.namespace, json.question, this.token).catch((err) => {
@@ -430,7 +429,6 @@ class DirAskGPTV2 {
430
429
  })
431
430
  }
432
431
  if (falseIntent) {
433
- console.log("execute false intent");
434
432
  await this.#executeCondition(false, trueIntent, trueIntentAttributes, falseIntent, falseIntentAttributes);
435
433
  callback(true);
436
434
  return;
@@ -894,7 +894,7 @@ class TiledeskChatbotUtil {
894
894
  if (_bot.attributes && _bot.attributes.globals) {
895
895
  winston.debug("(TiledeskChatbotUtil) Got Globals: ", _bot.attributes.globals);
896
896
  _bot.attributes.globals.forEach(async (global_var) => {
897
- winston.error("(TiledeskChatbotUtil) Adding global: " + global_var.key + " value: " + global_var.value);
897
+ winston.debug("(TiledeskChatbotUtil) Adding global: " + global_var.key + " value: " + global_var.value);
898
898
  add(global_var.key, global_var.value);
899
899
  });
900
900
  }