@pipedream/openai 0.4.1 → 0.4.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.
|
@@ -2,7 +2,7 @@ import openai from "../../openai.app.mjs";
|
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
name: "Create Image",
|
|
5
|
-
version: "0.1.
|
|
5
|
+
version: "0.1.11",
|
|
6
6
|
key: "openai-create-image",
|
|
7
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)",
|
|
8
8
|
type: "action",
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
label: "HD",
|
|
51
|
-
value: "
|
|
51
|
+
value: "hd",
|
|
52
52
|
},
|
|
53
53
|
],
|
|
54
54
|
default: "standard",
|
|
@@ -23,7 +23,7 @@ const pipelineAsync = promisify(stream.pipeline);
|
|
|
23
23
|
|
|
24
24
|
export default {
|
|
25
25
|
name: "Create Transcription",
|
|
26
|
-
version: "0.1.
|
|
26
|
+
version: "0.1.5",
|
|
27
27
|
key: "openai-create-transcription",
|
|
28
28
|
description: "Transcribes audio into the input language. [See docs here](https://platform.openai.com/docs/api-reference/audio/create).",
|
|
29
29
|
type: "action",
|
|
@@ -131,7 +131,10 @@ export default {
|
|
|
131
131
|
const ext = extname(file);
|
|
132
132
|
|
|
133
133
|
const fileSizeInMB = fs.statSync(file).size / (1024 * 1024);
|
|
134
|
-
|
|
134
|
+
// We're limited to 26MB per request. Because of how ffmpeg splits files,
|
|
135
|
+
// we need to be conservative in the number of chunks we create
|
|
136
|
+
const conservativeChunkSizeMB = 20;
|
|
137
|
+
const numberOfChunks = Math.ceil(fileSizeInMB / conservativeChunkSizeMB);
|
|
135
138
|
|
|
136
139
|
if (numberOfChunks === 1) {
|
|
137
140
|
await execAsync(`cp "${file}" "${outputDir}/chunk-000${ext}"`);
|