@tiledesk/tiledesk-tybot-connector 0.2.66-rc1 → 0.2.66-rc2
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -196,11 +196,11 @@ class DirAskGPTV2 {
|
|
|
196
196
|
else if (resbody.success === true) {
|
|
197
197
|
|
|
198
198
|
if (publicKey === true) {
|
|
199
|
-
let
|
|
199
|
+
let tokens_usage = {
|
|
200
200
|
tokens: resbody.prompt_token_size,
|
|
201
201
|
model: json.model
|
|
202
202
|
}
|
|
203
|
-
this.updateQuote(server_base_url,
|
|
203
|
+
this.updateQuote(server_base_url, tokens_usage);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
if (trueIntent) {
|
|
@@ -427,7 +427,7 @@ class DirAskGPTV2 {
|
|
|
427
427
|
})
|
|
428
428
|
}
|
|
429
429
|
|
|
430
|
-
async updateQuote(server_base_url,
|
|
430
|
+
async updateQuote(server_base_url, tokens_usage) {
|
|
431
431
|
return new Promise((resolve) => {
|
|
432
432
|
|
|
433
433
|
const HTTPREQUEST = {
|
|
@@ -436,7 +436,7 @@ class DirAskGPTV2 {
|
|
|
436
436
|
'Content-Type': 'application/json',
|
|
437
437
|
'Authorization': 'JWT ' + this.context.token
|
|
438
438
|
},
|
|
439
|
-
json:
|
|
439
|
+
json: tokens_usage,
|
|
440
440
|
method: "POST"
|
|
441
441
|
}
|
|
442
442
|
if (this.log) { console.log("DirAskGPT check quote availability HTTPREQUEST", HTTPREQUEST); }
|