backend-manager 3.2.95 → 3.2.96
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": "backend-manager",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.96",
|
|
4
4
|
"description": "Quick tools for developing Firebase functions",
|
|
5
5
|
"main": "src/manager/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"uid-generator": "^2.0.0",
|
|
68
68
|
"ultimate-jekyll-poster": "^1.0.1",
|
|
69
69
|
"uuid": "^9.0.1",
|
|
70
|
-
"wonderful-fetch": "^1.1.
|
|
70
|
+
"wonderful-fetch": "^1.1.4",
|
|
71
71
|
"wonderful-log": "^1.0.5",
|
|
72
72
|
"yargs": "^17.7.2"
|
|
73
73
|
}
|
|
74
|
-
}
|
|
74
|
+
}
|
|
@@ -218,7 +218,9 @@ OpenAI.prototype.request = function (options) {
|
|
|
218
218
|
url: '',
|
|
219
219
|
method: 'post',
|
|
220
220
|
response: 'json',
|
|
221
|
+
// response: 'raw',
|
|
221
222
|
// log: true,
|
|
223
|
+
attachResponseHeaders: true,
|
|
222
224
|
tries: 1,
|
|
223
225
|
timeout: options.timeout,
|
|
224
226
|
headers: {
|
|
@@ -297,7 +299,7 @@ OpenAI.prototype.request = function (options) {
|
|
|
297
299
|
|
|
298
300
|
// Request
|
|
299
301
|
await fetch(request.url, request)
|
|
300
|
-
.then((r) => {
|
|
302
|
+
.then(async (r) => {
|
|
301
303
|
// Set token counts
|
|
302
304
|
self.tokens.total.count += r?.usage?.total_tokens || 0;
|
|
303
305
|
self.tokens.input.count += r?.usage?.prompt_tokens || 0;
|