@digipair/skill-openai 0.116.3 → 0.116.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/dist/index.cjs.js CHANGED
@@ -4,11 +4,11 @@ var openai = require('@langchain/openai');
4
4
 
5
5
  let OpenAIService = class OpenAIService {
6
6
  async model(params, _pinsSettingsList, context) {
7
- const { modelName = 'gpt-4o-mini', temperature = 0, baseURL = context.privates.OPENAI_SERVER ?? process.env['OPENAI_SERVER'], openAIApiKey = context.privates.OPENAI_API_KEY ?? process.env['OPENAI_API_KEY'], configuration = {} } = params;
7
+ const { modelName = 'gpt-4o-mini', temperature = 0, baseURL = context.privates.OPENAI_SERVER ?? process.env['OPENAI_SERVER'], apiKey = context.privates.OPENAI_API_KEY ?? process.env['OPENAI_API_KEY'], configuration = {} } = params;
8
8
  const model = new openai.ChatOpenAI({
9
9
  modelName,
10
10
  temperature,
11
- openAIApiKey,
11
+ apiKey,
12
12
  configuration: {
13
13
  baseURL
14
14
  },
@@ -29,13 +29,13 @@ let OpenAIService = class OpenAIService {
29
29
  return model;
30
30
  }
31
31
  async embeddings(params, _pinsSettingsList, context) {
32
- const { modelName = 'text-embedding-3-small', baseURL = context.privates.OPENAI_SERVER ?? process.env['OPENAI_SERVER'], openAIApiKey = context.privates.OPENAI_API_KEY ?? process.env['OPENAI_API_KEY'], dimensions, configuration = {} } = params;
32
+ const { modelName = 'text-embedding-3-small', baseURL = context.privates.OPENAI_SERVER ?? process.env['OPENAI_SERVER'], apiKey = context.privates.OPENAI_API_KEY ?? process.env['OPENAI_API_KEY'], dimensions, configuration = {} } = params;
33
33
  const config = {
34
34
  configuration: {
35
35
  baseURL
36
36
  },
37
37
  modelName,
38
- openAIApiKey,
38
+ apiKey,
39
39
  ...configuration
40
40
  };
41
41
  const modelInstance = new openai.OpenAIEmbeddings(!!dimensions ? {
package/dist/index.esm.js CHANGED
@@ -116328,11 +116328,11 @@ var _class;
116328
116328
 
116329
116329
  let OpenAIService = class OpenAIService {
116330
116330
  async model(params, _pinsSettingsList, context) {
116331
- const { modelName = 'gpt-4o-mini', temperature = 0, baseURL = context.privates.OPENAI_SERVER ?? process.env['OPENAI_SERVER'], openAIApiKey = context.privates.OPENAI_API_KEY ?? process.env['OPENAI_API_KEY'], configuration = {} } = params;
116331
+ const { modelName = 'gpt-4o-mini', temperature = 0, baseURL = context.privates.OPENAI_SERVER ?? process.env['OPENAI_SERVER'], apiKey = context.privates.OPENAI_API_KEY ?? process.env['OPENAI_API_KEY'], configuration = {} } = params;
116332
116332
  const model = new ChatOpenAI({
116333
116333
  modelName,
116334
116334
  temperature,
116335
- openAIApiKey,
116335
+ apiKey,
116336
116336
  configuration: {
116337
116337
  baseURL
116338
116338
  },
@@ -116353,13 +116353,13 @@ let OpenAIService = class OpenAIService {
116353
116353
  return model;
116354
116354
  }
116355
116355
  async embeddings(params, _pinsSettingsList, context) {
116356
- const { modelName = 'text-embedding-3-small', baseURL = context.privates.OPENAI_SERVER ?? process.env['OPENAI_SERVER'], openAIApiKey = context.privates.OPENAI_API_KEY ?? process.env['OPENAI_API_KEY'], dimensions, configuration = {} } = params;
116356
+ const { modelName = 'text-embedding-3-small', baseURL = context.privates.OPENAI_SERVER ?? process.env['OPENAI_SERVER'], apiKey = context.privates.OPENAI_API_KEY ?? process.env['OPENAI_API_KEY'], dimensions, configuration = {} } = params;
116357
116357
  const config = {
116358
116358
  configuration: {
116359
116359
  baseURL
116360
116360
  },
116361
116361
  modelName,
116362
- openAIApiKey,
116362
+ apiKey,
116363
116363
  ...configuration
116364
116364
  };
116365
116365
  const modelInstance = new OpenAIEmbeddings(!!dimensions ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-openai",
3
- "version": "0.116.3",
3
+ "version": "0.116.4",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",