@docupace/pipeline 1.0.0-alpha.60 → 1.0.0-alpha.61

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.60",
3
+ "version": "1.0.0-alpha.61",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -143,6 +143,26 @@ program
143
143
  const summary = jiraTicketData.fields.summary;
144
144
  console.log(`Jira ticket summary: ${summary}`);
145
145
 
146
+ const body = JSON.stringify({
147
+ schema: {
148
+ name: 'change_request',
149
+ strict: true,
150
+ schema: {
151
+ type: 'object',
152
+ properties: {
153
+ change_type: { type: 'string', enum: ['patch', 'minor'] },
154
+ summary: { type: 'string' },
155
+ jira_ticket_id: { type: 'string' },
156
+ },
157
+ required: ['change_type', 'summary', 'jira_ticket_id'],
158
+ additionalProperties: false,
159
+ },
160
+ },
161
+ data: jiraTicketData,
162
+ });
163
+
164
+ console.log(body);
165
+
146
166
  // Step 4: Call OpenAI to determine change type
147
167
  const openAiApiKey = process.env.OPENAI_API_KEY;
148
168
  const openAiResponse = await fetch('https://api.openai.com/v1/assistants/asst_ronjCuCINK5pjLusTB9XCGYG/completions', {
@@ -151,23 +171,7 @@ program
151
171
  Authorization: `Bearer ${openAiApiKey}`,
152
172
  'Content-Type': 'application/json',
153
173
  },
154
- body: JSON.stringify({
155
- schema: {
156
- name: 'change_request',
157
- strict: true,
158
- schema: {
159
- type: 'object',
160
- properties: {
161
- change_type: { type: 'string', enum: ['patch', 'minor'] },
162
- summary: { type: 'string' },
163
- jira_ticket_id: { type: 'string' },
164
- },
165
- required: ['change_type', 'summary', 'jira_ticket_id'],
166
- additionalProperties: false,
167
- },
168
- },
169
- data: jiraTicketData,
170
- }),
174
+ body,
171
175
  });
172
176
 
173
177
  if (!openAiResponse.ok) {