backend-manager 4.0.3 → 4.0.4

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": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -213,10 +213,10 @@ BackendAssistant.prototype.init = function (ref, options) {
213
213
  self.constant.pastTime.timestampUNIX = 915148800;
214
214
 
215
215
  // Schema
216
- self.schema = {
217
- dir: '',
218
- name: '',
219
- }
216
+ // self.schema = {
217
+ // dir: '',
218
+ // name: '',
219
+ // }
220
220
 
221
221
  // Log options
222
222
  if (
@@ -100,8 +100,8 @@ Middleware.prototype.run = function (libPath, options) {
100
100
  // Resolve settings
101
101
  try {
102
102
  // Attach schema to assistant
103
- assistant.schema.dir = schemasDir;
104
- assistant.schema.name = options.schema;
103
+ // assistant.schema.dir = schemasDir;
104
+ // assistant.schema.name = options.schema;
105
105
  assistant.settings = Manager.Settings().resolve(assistant, undefined, data, {dir: schemasDir, schema: options.schema});
106
106
  } catch (e) {
107
107
  return assistant.respond(new Error(`Unable to resolve schema ${options.schema}: ${e.message}`), {code: 500, sentry: true});
@@ -7,56 +7,86 @@ const JSON5 = require('json5');
7
7
  // Constants
8
8
  const DEFAULT_MODEL = 'gpt-4o';
9
9
  const TOKEN_COST_TABLE = {
10
- // Sept 21st, 2024
10
+ // Oct 7th, 2024
11
11
  'gpt-4o': {
12
- input: 0.00500,
13
- output: 0.01500,
12
+ input: 0.002500,
13
+ output: 0.010000,
14
14
  },
15
15
  'gpt-4o-mini': {
16
16
  input: 0.000150,
17
17
  output: 0.000600,
18
18
  },
19
19
  'o1-preview': {
20
- input: 0.01500,
21
- output: 0.06000,
20
+ input: 0.015000,
21
+ output: 0.060000,
22
22
  },
23
23
  'o1-mini': {
24
- input: 0.00300,
25
- output: 0.01200,
24
+ input: 0.003000,
25
+ output: 0.012000,
26
26
  },
27
27
  'gpt-4-turbo': {
28
- input: 0.01000,
29
- output: 0.03000,
28
+ input: 0.010000,
29
+ output: 0.030000,
30
30
  },
31
31
  'gpt-4': {
32
- input: 0.03000,
33
- output: 0.06000,
32
+ input: 0.030000,
33
+ output: 0.060000,
34
34
  },
35
35
  'gpt-3.5-turbo': {
36
- input: 0.00050,
37
- output: 0.00150,
36
+ input: 0.000500,
37
+ output: 0.001500,
38
38
  },
39
39
 
40
+ // // Sept 21st, 2024
41
+ // 'gpt-4o': {
42
+ // input: 0.005000,
43
+ // output: 0.015000,
44
+ // },
45
+ // 'gpt-4o-mini': {
46
+ // input: 0.000150,
47
+ // output: 0.000600,
48
+ // },
49
+ // 'o1-preview': {
50
+ // input: 0.015000,
51
+ // output: 0.060000,
52
+ // },
53
+ // 'o1-mini': {
54
+ // input: 0.003000,
55
+ // output: 0.012000,
56
+ // },
57
+ // 'gpt-4-turbo': {
58
+ // input: 0.010000,
59
+ // output: 0.030000,
60
+ // },
61
+ // 'gpt-4': {
62
+ // input: 0.030000,
63
+ // output: 0.060000,
64
+ // },
65
+ // 'gpt-3.5-turbo': {
66
+ // input: 0.000500,
67
+ // output: 0.001500,
68
+ // },
69
+
40
70
  // // Jul 18th, 2024
41
71
  // 'gpt-4o': {
42
- // input: 0.00500,
43
- // output: 0.01500,
72
+ // input: 0.005000,
73
+ // output: 0.015000,
44
74
  // },
45
75
  // 'gpt-4o-mini': {
46
76
  // input: 0.000150,
47
77
  // output: 0.000600,
48
78
  // },
49
79
  // 'gpt-4-turbo': {
50
- // input: 0.01000,
51
- // output: 0.03000,
80
+ // input: 0.010000,
81
+ // output: 0.030000,
52
82
  // },
53
83
  // 'gpt-4': {
54
- // input: 0.03000,
55
- // output: 0.06000,
84
+ // input: 0.030000,
85
+ // output: 0.060000,
56
86
  // },
57
87
  // 'gpt-3.5-turbo': {
58
- // input: 0.00050,
59
- // output: 0.00150,
88
+ // input: 0.000500,
89
+ // output: 0.001500,
60
90
  // },
61
91
 
62
92
  // // May 13th, 2024