wingbot 3.76.4-alpha.2 → 3.76.4-alpha.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/ChatGpt.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.76.4-alpha.2",
3
+ "version": "3.76.4-alpha.3",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
package/src/ChatGpt.js CHANGED
@@ -441,6 +441,7 @@ class ChatGpt {
441
441
 
442
442
  this._log('#GPT request', body);
443
443
 
444
+ const startTime = Date.now();
444
445
  const response = await this._fetch(apiUrl, {
445
446
  method: 'POST',
446
447
  headers: {
@@ -470,7 +471,9 @@ class ChatGpt {
470
471
 
471
472
  const [choice] = responseData.choices;
472
473
 
473
- this._log('#GPT response', { choice, responseData });
474
+ const durationMs = Date.now() - startTime;
475
+
476
+ this._log('#GPT response', { choice, responseData, durationMs });
474
477
 
475
478
  return choice;
476
479
  } catch (e) {