@docupace/pipeline 1.0.0-alpha.62 → 1.0.0-alpha.63

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": "@docupace/pipeline",
3
- "version": "1.0.0-alpha.62",
3
+ "version": "1.0.0-alpha.63",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -4,7 +4,7 @@ import { $ } from 'zx';
4
4
  import path from 'path';
5
5
  import {validateChangesets} from "./validate.js";
6
6
  import fs from 'fs';
7
- import { Configuration, OpenAIApi } from "openai";
7
+ import openai from "openai";
8
8
 
9
9
 
10
10
  const program = new Command();
@@ -149,9 +149,13 @@ program
149
149
  const openAiConfiguration = new Configuration({
150
150
  apiKey: process.env.OPENAI_API_KEY,
151
151
  });
152
- const openai = new OpenAIApi(openAiConfiguration);
153
152
 
154
- const openAiResponse = await openai.createChatCompletion({
153
+
154
+ const openaiClient = new openai.OpenAIApi(new openai.Configuration({
155
+ apiKey: process.env.OPENAI_API_KEY,
156
+ }));
157
+
158
+ const openAiResponse = await openaiClient.createChatCompletion({
155
159
  model: "gpt-4",
156
160
  messages: [
157
161
  {