@openfn/language-chatgpt 2.1.2 → 2.2.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.
@@ -15,6 +15,21 @@
15
15
  "type": "string",
16
16
  "minLength": 1,
17
17
  "examples": ["sk-proj-api03-YOUR_SECRET_KEY"]
18
+ },
19
+ "baseUrl": {
20
+ "title": "Base URL",
21
+ "anyOf": [
22
+ {
23
+ "type": "string"
24
+ },
25
+ {
26
+ "type": "null"
27
+ }
28
+ ],
29
+ "description": "The URL for the OpenAI-compatible endpoint of the LLM provider",
30
+ "type": "string",
31
+ "minLength": 1,
32
+ "examples": ["https://api.openai.com/v1"]
18
33
  }
19
34
  },
20
35
  "type": "object",
package/dist/index.cjs CHANGED
@@ -75,9 +75,10 @@ var import_openai = __toESM(require("openai"), 1);
75
75
  var import_language_common2 = require("@openfn/language-common");
76
76
  var client;
77
77
  function createClient(state) {
78
- const { apiKey } = state.configuration;
78
+ const { apiKey, baseUrl } = state.configuration;
79
79
  client = new import_openai.default({
80
- apiKey
80
+ apiKey,
81
+ baseUrl
81
82
  });
82
83
  return state;
83
84
  }
package/dist/index.js CHANGED
@@ -49,9 +49,10 @@ import {
49
49
  } from "@openfn/language-common";
50
50
  var client;
51
51
  function createClient(state) {
52
- const { apiKey } = state.configuration;
52
+ const { apiKey, baseUrl } = state.configuration;
53
53
  client = new OpenAI({
54
- apiKey
54
+ apiKey,
55
+ baseUrl
55
56
  });
56
57
  return state;
57
58
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-chatgpt",
3
3
  "label": "ChatGPT",
4
- "version": "2.1.2",
4
+ "version": "2.2.0",
5
5
  "description": "OpenFn adaptor for ChatGPT",
6
6
  "type": "module",
7
7
  "exports": {
@@ -28,7 +28,6 @@
28
28
  "assertion-error": "2.0.0",
29
29
  "chai": "4.3.6",
30
30
  "deep-eql": "4.1.1",
31
- "mocha": "^10.8.2",
32
31
  "rimraf": "3.0.2",
33
32
  "undici": "^7.28.0"
34
33
  },