gptrans 1.3.4 → 1.3.6

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.
@@ -0,0 +1,11 @@
1
+ {
2
+ "hello_name_1987p1n": "Ciao, {name}!",
3
+ "topup_uzdh5y": "Ricarica",
4
+ "transf_176pc1a": "Trasferimento",
5
+ "deposi_wg2ec5": "Deposito",
6
+ "balanc_1rv8if7": "Saldo",
7
+ "transa_1wtqm5d": "Transazione",
8
+ "accoun_x1y0v8": "Account",
9
+ "card_yis1ox": "Carta",
10
+ "loadin_21q3nx": "Caricamento in corso..."
11
+ }
package/index.js CHANGED
@@ -4,8 +4,6 @@ import { ModelMix, MixOpenAI, MixAnthropic } from 'modelmix';
4
4
  import { isoAssoc, isLanguageAvailable } from './isoAssoc.js';
5
5
  import dotenv from 'dotenv';
6
6
 
7
- dotenv.config();
8
-
9
7
  class GPTrans {
10
8
  static #mmixInstance = null;
11
9
 
@@ -26,6 +24,13 @@ class GPTrans {
26
24
  }
27
25
 
28
26
  constructor({ from = 'en-US', target = 'es-AR', model = 'claude-3-7-sonnet-20250219', batchThreshold = 1000, debounceTimeout = 500, promptFile = null, context = '' }) {
27
+
28
+ try {
29
+ dotenv.config();
30
+ } catch (e) {
31
+ console.error(e);
32
+ }
33
+
29
34
  this.dbTarget = new DeepBase({ name: 'gptrans_' + target });
30
35
  this.dbFrom = new DeepBase({ name: 'gptrans_from_' + from });
31
36
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gptrans",
3
3
  "type": "module",
4
- "version": "1.3.4",
4
+ "version": "1.3.6",
5
5
  "description": "🚆 GPTrans - The smarter AI-powered way to translate.",
6
6
  "keywords": [
7
7
  "translate",