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.
- package/package.json +1 -1
- package/src/ChatGpt.js +4 -1
package/package.json
CHANGED
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
|
-
|
|
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) {
|