@pipedream/openai 0.3.0 → 0.3.2

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.
@@ -4,7 +4,7 @@ import common from "../common/common.mjs";
4
4
  export default {
5
5
  ...common,
6
6
  name: "Chat",
7
- version: "0.1.4",
7
+ version: "0.1.5",
8
8
  key: "openai-chat",
9
9
  description: "The Chat API, using the `gpt-3.5-turbo` or `gpt-4` model. [See docs here](https://platform.openai.com/docs/api-reference/chat)",
10
10
  type: "action",
@@ -43,7 +43,7 @@ export default {
43
43
  type: "string",
44
44
  label: "Response Format",
45
45
  description: "Specify the format that the model must output. [Setting to `json_object` guarantees the message the model generates is valid JSON](https://platform.openai.com/docs/api-reference/chat/create#chat-create-response_format). Defaults to `text`",
46
- optiions: [
46
+ options: [
47
47
  "text",
48
48
  "json_object",
49
49
  ],
@@ -1,9 +1,8 @@
1
1
  import openai from "../../openai.app.mjs";
2
- import constants from "../common/constants.mjs";
3
2
 
4
3
  export default {
5
4
  name: "Create Image",
6
- version: "0.1.5",
5
+ version: "0.1.8",
7
6
  key: "openai-create-image",
8
7
  description: "Creates an image given a prompt. returns a URL to the image. [See docs here](https://platform.openai.com/docs/api-reference/images)",
9
8
  type: "action",
@@ -37,14 +36,6 @@ export default {
37
36
  optional: true,
38
37
  default: 1,
39
38
  },
40
- size: {
41
- label: "Size",
42
- description: "The size of the generated images.",
43
- type: "string",
44
- optional: true,
45
- options: constants.IMAGE_SIZES,
46
- default: "1024x1024",
47
- },
48
39
  quality: {
49
40
  label: "Quality",
50
41
  description: "The quality of the image",
@@ -79,6 +70,52 @@ export default {
79
70
  ],
80
71
  default: "natural",
81
72
  },
73
+ responseFormat: {
74
+ label: "Response Format",
75
+ description: "The format in which the generated images are returned.",
76
+ type: "string",
77
+ optional: true,
78
+ options: [
79
+ {
80
+ label: "URL",
81
+ value: "url",
82
+ },
83
+ {
84
+ label: "Base64 JSON",
85
+ value: "b64_json",
86
+ },
87
+ ],
88
+ default: "url",
89
+ },
90
+ size: {
91
+ label: "Size",
92
+ description: "The size of the generated images.",
93
+ type: "string",
94
+ optional: true,
95
+ options: [
96
+ {
97
+ label: "256x256",
98
+ value: "256x256",
99
+ },
100
+ {
101
+ label: "512x512",
102
+ value: "512x512",
103
+ },
104
+ {
105
+ label: "1024x1024",
106
+ value: "1024x1024",
107
+ },
108
+ {
109
+ label: "1792x1024",
110
+ value: "1792x1024",
111
+ },
112
+ {
113
+ label: "1024x1792",
114
+ value: "1024x1792",
115
+ },
116
+ ],
117
+ default: "1024x1024",
118
+ },
82
119
  },
83
120
  async run({ $ }) {
84
121
  const response = await this.openai.createImage({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/openai",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Pipedream OpenAI Components",
5
5
  "main": "openai.app.mjs",
6
6
  "keywords": [