@openfn/language-chatgpt 2.0.12 → 2.1.1

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/ast.json CHANGED
@@ -388,6 +388,49 @@
388
388
  },
389
389
  "valid": true
390
390
  },
391
+ {
392
+ "name": "combine",
393
+ "params": [
394
+ "operations"
395
+ ],
396
+ "docs": {
397
+ "description": "Combines two operations into one",
398
+ "tags": [
399
+ {
400
+ "title": "public",
401
+ "description": null,
402
+ "type": null
403
+ },
404
+ {
405
+ "title": "function",
406
+ "description": null,
407
+ "name": null
408
+ },
409
+ {
410
+ "title": "example",
411
+ "description": "combine(\n create('foo'),\n delete('bar')\n)"
412
+ },
413
+ {
414
+ "title": "param",
415
+ "description": "Operations to be performed.",
416
+ "type": {
417
+ "type": "NameExpression",
418
+ "name": "Operations"
419
+ },
420
+ "name": "operations"
421
+ },
422
+ {
423
+ "title": "returns",
424
+ "description": null,
425
+ "type": {
426
+ "type": "NameExpression",
427
+ "name": "Operation"
428
+ }
429
+ }
430
+ ]
431
+ },
432
+ "valid": true
433
+ },
391
434
  {
392
435
  "name": "field",
393
436
  "params": [
@@ -627,6 +670,55 @@
627
670
  ]
628
671
  },
629
672
  "valid": false
673
+ },
674
+ {
675
+ "name": "log",
676
+ "params": [
677
+ "args"
678
+ ],
679
+ "docs": {
680
+ "description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
681
+ "tags": [
682
+ {
683
+ "title": "public",
684
+ "description": null,
685
+ "type": null
686
+ },
687
+ {
688
+ "title": "function",
689
+ "description": null,
690
+ "name": null
691
+ },
692
+ {
693
+ "title": "example",
694
+ "description": "log('Patient List::', $.patients);",
695
+ "caption": "Log values from state"
696
+ },
697
+ {
698
+ "title": "example",
699
+ "description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
700
+ "caption": "Use console.log inside a callback or fn block"
701
+ },
702
+ {
703
+ "title": "param",
704
+ "description": "A value or message to display in the logs",
705
+ "type": {
706
+ "type": "NameExpression",
707
+ "name": "any"
708
+ },
709
+ "name": "args"
710
+ },
711
+ {
712
+ "title": "returns",
713
+ "description": null,
714
+ "type": {
715
+ "type": "NameExpression",
716
+ "name": "Operation"
717
+ }
718
+ }
719
+ ]
720
+ },
721
+ "valid": true
630
722
  }
631
723
  ]
632
724
  }
package/dist/index.cjs CHANGED
@@ -25,6 +25,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
25
25
  // src/index.js
26
26
  var src_exports = {};
27
27
  __export(src_exports, {
28
+ combine: () => import_language_common2.combine,
28
29
  createClient: () => createClient,
29
30
  cursor: () => import_language_common2.cursor,
30
31
  dataPath: () => import_language_common2.dataPath,
@@ -38,6 +39,7 @@ __export(src_exports, {
38
39
  fields: () => import_language_common2.fields,
39
40
  fn: () => import_language_common2.fn,
40
41
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
42
+ log: () => import_language_common2.log,
41
43
  merge: () => import_language_common2.merge,
42
44
  prompt: () => prompt,
43
45
  setMockClient: () => setMockClient,
@@ -48,6 +50,7 @@ module.exports = __toCommonJS(src_exports);
48
50
  // src/Adaptor.js
49
51
  var Adaptor_exports = {};
50
52
  __export(Adaptor_exports, {
53
+ combine: () => import_language_common2.combine,
51
54
  createClient: () => createClient,
52
55
  cursor: () => import_language_common2.cursor,
53
56
  dataPath: () => import_language_common2.dataPath,
@@ -60,6 +63,7 @@ __export(Adaptor_exports, {
60
63
  fields: () => import_language_common2.fields,
61
64
  fn: () => import_language_common2.fn,
62
65
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
66
+ log: () => import_language_common2.log,
63
67
  merge: () => import_language_common2.merge,
64
68
  prompt: () => prompt,
65
69
  setMockClient: () => setMockClient,
@@ -136,6 +140,7 @@ function deepResearch(message, opts) {
136
140
  var src_default = Adaptor_exports;
137
141
  // Annotate the CommonJS export names for ESM import in node:
138
142
  0 && (module.exports = {
143
+ combine,
139
144
  createClient,
140
145
  cursor,
141
146
  dataPath,
@@ -148,6 +153,7 @@ var src_default = Adaptor_exports;
148
153
  fields,
149
154
  fn,
150
155
  lastReferenceValue,
156
+ log,
151
157
  merge,
152
158
  prompt,
153
159
  setMockClient,
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ var __export = (target, all) => {
7
7
  // src/Adaptor.js
8
8
  var Adaptor_exports = {};
9
9
  __export(Adaptor_exports, {
10
+ combine: () => combine,
10
11
  createClient: () => createClient,
11
12
  cursor: () => cursor,
12
13
  dataPath: () => dataPath,
@@ -19,6 +20,7 @@ __export(Adaptor_exports, {
19
20
  fields: () => fields,
20
21
  fn: () => fn,
21
22
  lastReferenceValue: () => lastReferenceValue,
23
+ log: () => log,
22
24
  merge: () => merge,
23
25
  prompt: () => prompt,
24
26
  setMockClient: () => setMockClient,
@@ -31,15 +33,17 @@ import {
31
33
  import { expandReferences } from "@openfn/language-common/util";
32
34
  import OpenAI from "openai";
33
35
  import {
36
+ combine,
37
+ cursor,
34
38
  dataPath,
35
39
  dataValue,
36
40
  dateFns,
37
- cursor,
38
41
  each,
39
42
  field,
40
43
  fields,
41
44
  fn,
42
45
  lastReferenceValue,
46
+ log,
43
47
  merge,
44
48
  sourceValue
45
49
  } from "@openfn/language-common";
@@ -109,6 +113,7 @@ function deepResearch(message, opts) {
109
113
  // src/index.js
110
114
  var src_default = Adaptor_exports;
111
115
  export {
116
+ combine,
112
117
  createClient,
113
118
  cursor,
114
119
  dataPath,
@@ -122,6 +127,7 @@ export {
122
127
  fields,
123
128
  fn,
124
129
  lastReferenceValue,
130
+ log,
125
131
  merge,
126
132
  prompt,
127
133
  setMockClient,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-chatgpt",
3
3
  "label": "ChatGPT",
4
- "version": "2.0.12",
4
+ "version": "2.1.1",
5
5
  "description": "OpenFn adaptor for ChatGPT",
6
6
  "type": "module",
7
7
  "exports": {
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "openai": "^4.104.0",
25
- "@openfn/language-common": "3.3.2"
25
+ "@openfn/language-common": "3.3.3"
26
26
  },
27
27
  "devDependencies": {
28
28
  "assertion-error": "2.0.0",
@@ -57,4 +57,4 @@ export type PromptOptions = any;
57
57
  * Options provided to Chat Responses Create (https://platform.openai.com/docs/guides/deep-research)
58
58
  */
59
59
  export type DeepResearchOptions = any;
60
- export { dataPath, dataValue, dateFns, cursor, each, field, fields, fn, lastReferenceValue, merge, sourceValue } from "@openfn/language-common";
60
+ export { combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";