@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
@@ -5,6 +5,10 @@
5
5
  available on:
6
6
  ▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
7
7
 
8
+ # v0.2.66-rc2
9
+ - changed updateQuotes method
10
+ - fix missing model in updateQuote
11
+
8
12
  # v0.2.66-rc1
9
13
  - fix missing model in updateQuote
10
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "0.2.66-rc1",
3
+ "version": "0.2.66-rc2",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -196,11 +196,11 @@ class DirAskGPTV2 {
196
196
  else if (resbody.success === true) {
197
197
 
198
198
  if (publicKey === true) {
199
- let token_usage = {
199
+ let tokens_usage = {
200
200
  tokens: resbody.prompt_token_size,
201
201
  model: json.model
202
202
  }
203
- this.updateQuote(server_base_url, token_usage);
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, tokens) {
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: { tokens: tokens },
439
+ json: tokens_usage,
440
440
  method: "POST"
441
441
  }
442
442
  if (this.log) { console.log("DirAskGPT check quote availability HTTPREQUEST", HTTPREQUEST); }