@memberjunction/ai-openrouter 3.3.0 → 4.0.0

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/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './models/openRouter';
1
+ export * from './models/openRouter.js';
2
2
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./models/openRouter"), exports);
1
+ export * from './models/openRouter.js';
18
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -5,5 +5,4 @@ import { OpenAILLM } from "@memberjunction/ai-openai";
5
5
  export declare class OpenRouterLLM extends OpenAILLM {
6
6
  constructor(apiKey: string);
7
7
  }
8
- export declare function LoadOpenRouterLLM(): void;
9
8
  //# sourceMappingURL=openRouter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openRouter.d.ts","sourceRoot":"","sources":["../../src/models/openRouter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAItD;;GAEG;AACH,qBACa,aAAc,SAAQ,SAAS;gBAC5B,MAAM,EAAE,MAAM;CAG7B;AAED,wBAAgB,iBAAiB,SAEhC"}
1
+ {"version":3,"file":"openRouter.d.ts","sourceRoot":"","sources":["../../src/models/openRouter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAItD;;GAEG;AACH,qBACa,aAAc,SAAQ,SAAS;gBAC5B,MAAM,EAAE,MAAM;CAG7B"}
@@ -1,30 +1,27 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
6
  };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.LoadOpenRouterLLM = exports.OpenRouterLLM = void 0;
10
- const ai_1 = require("@memberjunction/ai");
11
- const global_1 = require("@memberjunction/global");
12
- const ai_openai_1 = require("@memberjunction/ai-openai");
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { BaseLLM } from "@memberjunction/ai";
11
+ import { RegisterClass } from '@memberjunction/global';
12
+ import { OpenAILLM } from "@memberjunction/ai-openai";
13
13
  const __openRouterURL = 'https://openrouter.ai/api/v1';
14
14
  /**
15
15
  * OpenRouter implementation is just a sub-class of the OpenAILLM that overrides the base url
16
16
  */
17
- let OpenRouterLLM = class OpenRouterLLM extends ai_openai_1.OpenAILLM {
17
+ let OpenRouterLLM = class OpenRouterLLM extends OpenAILLM {
18
18
  constructor(apiKey) {
19
19
  super(apiKey, __openRouterURL);
20
20
  }
21
21
  };
22
- exports.OpenRouterLLM = OpenRouterLLM;
23
- exports.OpenRouterLLM = OpenRouterLLM = __decorate([
24
- (0, global_1.RegisterClass)(ai_1.BaseLLM, 'OpenRouterLLM')
22
+ OpenRouterLLM = __decorate([
23
+ RegisterClass(BaseLLM, 'OpenRouterLLM'),
24
+ __metadata("design:paramtypes", [String])
25
25
  ], OpenRouterLLM);
26
- function LoadOpenRouterLLM() {
27
- // this does nothing but prevents the class from being removed by the tree shaker
28
- }
29
- exports.LoadOpenRouterLLM = LoadOpenRouterLLM;
26
+ export { OpenRouterLLM };
30
27
  //# sourceMappingURL=openRouter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"openRouter.js","sourceRoot":"","sources":["../../src/models/openRouter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA6C;AAC7C,mDAAuD;AACvD,yDAAsD;AAEtD,MAAM,eAAe,GAAW,8BAA8B,CAAA;AAE9D;;GAEG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qBAAS;IACxC,YAAY,MAAc;QACtB,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACnC,CAAC;CACJ,CAAA;AAJY,sCAAa;wBAAb,aAAa;IADzB,IAAA,sBAAa,EAAC,YAAO,EAAE,eAAe,CAAC;GAC3B,aAAa,CAIzB;AAED,SAAgB,iBAAiB;IAC7B,iFAAiF;AACrF,CAAC;AAFD,8CAEC"}
1
+ {"version":3,"file":"openRouter.js","sourceRoot":"","sources":["../../src/models/openRouter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,MAAM,eAAe,GAAW,8BAA8B,CAAA;AAE9D;;GAEG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,SAAS;IACxC,YAAY,MAAc;QACtB,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACnC,CAAC;CACJ,CAAA;AAJY,aAAa;IADzB,aAAa,CAAC,OAAO,EAAE,eAAe,CAAC;;GAC3B,aAAa,CAIzB"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@memberjunction/ai-openrouter",
3
- "version": "3.3.0",
3
+ "type": "module",
4
+ "version": "4.0.0",
4
5
  "description": "MemberJunction Wrapper for OpenRouter AI inference services",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
@@ -9,19 +10,19 @@
9
10
  ],
10
11
  "scripts": {
11
12
  "start": "ts-node-dev src/index.ts",
12
- "build": "tsc",
13
+ "build": "tsc && tsc-alias -f",
13
14
  "test": "echo \"Error: no test specified\" && exit 1"
14
15
  },
15
16
  "author": "MemberJunction.com",
16
17
  "license": "ISC",
17
18
  "devDependencies": {
18
19
  "ts-node-dev": "^2.0.0",
19
- "typescript": "^5.4.5"
20
+ "typescript": "^5.9.3"
20
21
  },
21
22
  "dependencies": {
22
- "@memberjunction/ai": "3.3.0",
23
- "@memberjunction/ai-openai": "3.3.0",
24
- "@memberjunction/global": "3.3.0"
23
+ "@memberjunction/ai": "4.0.0",
24
+ "@memberjunction/ai-openai": "4.0.0",
25
+ "@memberjunction/global": "4.0.0"
25
26
  },
26
27
  "repository": {
27
28
  "type": "git",