@docupace/pipeline 1.0.0-alpha.65 → 1.0.0-alpha.67

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.65",
3
+ "version": "1.0.0-alpha.67",
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 openai from "openai";
7
+ import OpenAI from "openai";
8
8
 
9
9
 
10
10
  const program = new Command();
@@ -145,11 +145,11 @@ program
145
145
  const summary = jiraTicketData.fields.summary;
146
146
  console.log(`Jira ticket summary: ${summary}`);
147
147
 
148
- const openaiClient = new openai.OpenAIApi(new openai.Configuration({
149
- apiKey: process.env.OPENAI_API_KEY,
150
- }));
148
+ const openaiClient = new OpenAI({
149
+ apiKey: process.env['OPENAI_API_KEY'],
150
+ });
151
151
 
152
- const openAiResponse = await openaiClient.createChatCompletion({
152
+ const openAiResponse = await openaiClient.chat.completions.create({
153
153
  model: "gpt-4",
154
154
  messages: [
155
155
  {