@pipedream/openai 0.7.0 → 0.7.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.
- package/actions/analyze-image-content/analyze-image-content.mjs +1 -1
- package/actions/cancel-run/cancel-run.mjs +1 -1
- package/actions/chat/chat.mjs +81 -10
- package/actions/chat-with-assistant/chat-with-assistant.mjs +1 -1
- package/actions/classify-items-into-categories/classify-items-into-categories.mjs +1 -1
- package/actions/common/common-assistants.mjs +45 -26
- package/actions/convert-text-to-speech/convert-text-to-speech.mjs +1 -1
- package/actions/create-assistant/create-assistant.mjs +1 -1
- package/actions/create-batch/create-batch.mjs +1 -1
- package/actions/create-embeddings/create-embeddings.mjs +1 -1
- package/actions/create-fine-tuning-job/create-fine-tuning-job.mjs +1 -1
- package/actions/create-image/create-image.mjs +1 -1
- package/actions/create-moderation/create-moderation.mjs +1 -1
- package/actions/create-thread/create-thread.mjs +1 -1
- package/actions/create-transcription/create-transcription.mjs +1 -1
- package/actions/create-vector-store/create-vector-store.mjs +1 -1
- package/actions/create-vector-store-file/create-vector-store-file.mjs +1 -1
- package/actions/delete-file/delete-file.mjs +1 -1
- package/actions/delete-vector-store/delete-vector-store.mjs +1 -1
- package/actions/delete-vector-store-file/delete-vector-store-file.mjs +1 -1
- package/actions/list-files/list-files.mjs +1 -1
- package/actions/list-messages/list-messages.mjs +1 -1
- package/actions/list-run-steps/list-run-steps.mjs +1 -1
- package/actions/list-runs/list-runs.mjs +1 -1
- package/actions/list-vector-store-files/list-vector-store-files.mjs +1 -1
- package/actions/list-vector-stores/list-vector-stores.mjs +1 -1
- package/actions/modify-assistant/modify-assistant.mjs +1 -1
- package/actions/retrieve-file/retrieve-file.mjs +1 -1
- package/actions/retrieve-file-content/retrieve-file-content.mjs +1 -1
- package/actions/retrieve-run/retrieve-run.mjs +1 -1
- package/actions/retrieve-run-step/retrieve-run-step.mjs +1 -1
- package/actions/retrieve-vector-store/retrieve-vector-store.mjs +1 -1
- package/actions/retrieve-vector-store-file/retrieve-vector-store-file.mjs +1 -1
- package/actions/send-prompt/send-prompt.mjs +1 -1
- package/actions/submit-tool-outputs-to-run/submit-tool-outputs-to-run.mjs +1 -1
- package/actions/summarize/summarize.mjs +1 -1
- package/actions/translate-text/translate-text.mjs +1 -1
- package/actions/upload-file/upload-file.mjs +1 -1
- package/common/helpers.mjs +1 -1
- package/openai.app.mjs +1 -1
- package/package.json +3 -3
- package/sources/new-batch-completed/new-batch-completed.mjs +1 -1
- package/sources/new-file-created/new-file-created.mjs +1 -1
- package/sources/new-fine-tuning-job-created/new-fine-tuning-job-created.mjs +1 -1
- package/sources/new-run-state-changed/new-run-state-changed.mjs +1 -1
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
key: "openai-analyze-image-content",
|
|
9
9
|
name: "Analyze Image Content",
|
|
10
10
|
description: "Send a message or question about an image and receive a response. [See the documentation](https://platform.openai.com/docs/api-reference/runs/createThreadAndRun)",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.3",
|
|
12
12
|
type: "action",
|
|
13
13
|
props: {
|
|
14
14
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-cancel-run",
|
|
5
5
|
name: "Cancel Run (Assistants)",
|
|
6
6
|
description: "Cancels a run that is in progress. [See the documentation](https://platform.openai.com/docs/api-reference/runs/cancelRun)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.12",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
package/actions/chat/chat.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { ConfigurationError } from "@pipedream/platform";
|
|
|
6
6
|
export default {
|
|
7
7
|
...common,
|
|
8
8
|
name: "Chat",
|
|
9
|
-
version: "0.2.
|
|
9
|
+
version: "0.2.4",
|
|
10
10
|
key: "openai-chat",
|
|
11
11
|
description: "The Chat API, using the `gpt-3.5-turbo` or `gpt-4` model. [See the documentation](https://platform.openai.com/docs/api-reference/chat)",
|
|
12
12
|
type: "action",
|
|
@@ -57,19 +57,87 @@ export default {
|
|
|
57
57
|
optional: true,
|
|
58
58
|
reloadProps: true,
|
|
59
59
|
},
|
|
60
|
+
toolTypes: {
|
|
61
|
+
type: "string[]",
|
|
62
|
+
label: "Tool Types",
|
|
63
|
+
description: "The types of tools to enable on the assistant",
|
|
64
|
+
options: constants.TOOL_TYPES.filter((toolType) => toolType === "function"),
|
|
65
|
+
optional: true,
|
|
66
|
+
reloadProps: true,
|
|
67
|
+
},
|
|
60
68
|
},
|
|
61
69
|
additionalProps() {
|
|
62
|
-
const {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
const {
|
|
71
|
+
responseFormat,
|
|
72
|
+
toolTypes,
|
|
73
|
+
numberOfFunctions,
|
|
74
|
+
} = this;
|
|
75
|
+
const props = {};
|
|
76
|
+
|
|
77
|
+
if (responseFormat === constants.CHAT_RESPONSE_FORMAT.JSON_SCHEMA.value) {
|
|
78
|
+
props.jsonSchema = {
|
|
68
79
|
type: "string",
|
|
69
80
|
label: "JSON Schema",
|
|
70
81
|
description: "Define the schema that the model's output must adhere to. [See the documentation here](https://platform.openai.com/docs/guides/structured-outputs/supported-schemas).",
|
|
71
|
-
}
|
|
72
|
-
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (toolTypes?.includes("function")) {
|
|
86
|
+
props.numberOfFunctions = {
|
|
87
|
+
type: "integer",
|
|
88
|
+
label: "Number of Functions",
|
|
89
|
+
description: "The number of functions to define",
|
|
90
|
+
optional: true,
|
|
91
|
+
reloadProps: true,
|
|
92
|
+
default: 1,
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
for (let i = 0; i < (numberOfFunctions || 1); i++) {
|
|
96
|
+
props[`functionName_${i}`] = {
|
|
97
|
+
type: "string",
|
|
98
|
+
label: `Function Name ${i + 1}`,
|
|
99
|
+
description: "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.",
|
|
100
|
+
};
|
|
101
|
+
props[`functionDescription_${i}`] = {
|
|
102
|
+
type: "string",
|
|
103
|
+
label: `Function Description ${i + 1}`,
|
|
104
|
+
description: "A description of what the function does, used by the model to choose when and how to call the function.",
|
|
105
|
+
optional: true,
|
|
106
|
+
};
|
|
107
|
+
props[`functionParameters_${i}`] = {
|
|
108
|
+
type: "object",
|
|
109
|
+
label: `Function Parameters ${i + 1}`,
|
|
110
|
+
description: "The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.",
|
|
111
|
+
optional: true,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return props;
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
...common.methods,
|
|
120
|
+
_buildTools() {
|
|
121
|
+
const tools = this.toolTypes?.filter((toolType) => toolType !== "function")?.map((toolType) => ({
|
|
122
|
+
type: toolType,
|
|
123
|
+
})) || [];
|
|
124
|
+
if (this.toolTypes?.includes("function")) {
|
|
125
|
+
const numberOfFunctions = this.numberOfFunctions || 1;
|
|
126
|
+
for (let i = 0; i < numberOfFunctions; i++) {
|
|
127
|
+
tools.push({
|
|
128
|
+
type: "function",
|
|
129
|
+
function: {
|
|
130
|
+
name: this[`functionName_${i}`],
|
|
131
|
+
description: this[`functionDescription_${i}`],
|
|
132
|
+
parameters: this[`functionParameters_${i}`],
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return tools.length
|
|
138
|
+
? tools
|
|
139
|
+
: undefined;
|
|
140
|
+
},
|
|
73
141
|
},
|
|
74
142
|
async run({ $ }) {
|
|
75
143
|
if (this.audio && !this.modelId.includes("gpt-4o-audio-preview")) {
|
|
@@ -80,7 +148,10 @@ export default {
|
|
|
80
148
|
|
|
81
149
|
const response = await this.openai.createChatCompletion({
|
|
82
150
|
$,
|
|
83
|
-
data:
|
|
151
|
+
data: {
|
|
152
|
+
...args,
|
|
153
|
+
tools: this._buildTools(),
|
|
154
|
+
},
|
|
84
155
|
});
|
|
85
156
|
|
|
86
157
|
if (response) {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "openai-chat-with-assistant",
|
|
7
7
|
name: "Chat with Assistant",
|
|
8
8
|
description: "Sends a message and generates a response, storing the message history for a continuous conversation. [See the documentation](https://platform.openai.com/docs/api-reference/runs/createThreadAndRun)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.8",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
openai,
|
|
@@ -3,7 +3,7 @@ import common from "../common/common-helper.mjs";
|
|
|
3
3
|
export default {
|
|
4
4
|
...common,
|
|
5
5
|
name: "Classify Items into Categories",
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.3",
|
|
7
7
|
key: "openai-classify-items-into-categories",
|
|
8
8
|
description: "Classify items into specific categories using the Chat API. [See the documentation](https://platform.openai.com/docs/api-reference/chat)",
|
|
9
9
|
type: "action",
|
|
@@ -16,7 +16,20 @@ export default {
|
|
|
16
16
|
if (!this.toolTypes?.length) {
|
|
17
17
|
return props;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
if (this.toolTypes.includes("function")) {
|
|
20
|
+
props.numberOfFunctions = {
|
|
21
|
+
type: "integer",
|
|
22
|
+
label: "Number of Functions",
|
|
23
|
+
description: "The number of functions to define.",
|
|
24
|
+
optional: true,
|
|
25
|
+
reloadProps: true,
|
|
26
|
+
default: 1,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
...props,
|
|
31
|
+
...(await this.getToolProps()),
|
|
32
|
+
};
|
|
20
33
|
},
|
|
21
34
|
methods: {
|
|
22
35
|
async getToolProps() {
|
|
@@ -58,23 +71,26 @@ export default {
|
|
|
58
71
|
};
|
|
59
72
|
}
|
|
60
73
|
if (this.toolTypes.includes("function")) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
const numberOfFunctions = this.numberOfFunctions || 1;
|
|
75
|
+
for (let i = 0; i < numberOfFunctions; i++) {
|
|
76
|
+
props[`functionName_${i}`] = {
|
|
77
|
+
type: "string",
|
|
78
|
+
label: `Function Name ${i + 1}`,
|
|
79
|
+
description: "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.",
|
|
80
|
+
};
|
|
81
|
+
props[`functionDescription_${i}`] = {
|
|
82
|
+
type: "string",
|
|
83
|
+
label: `Function Description ${i + 1}`,
|
|
84
|
+
description: "A description of what the function does, used by the model to choose when and how to call the function.",
|
|
85
|
+
optional: true,
|
|
86
|
+
};
|
|
87
|
+
props[`functionParameters_${i}`] = {
|
|
88
|
+
type: "object",
|
|
89
|
+
label: `Function Parameters ${i + 1}`,
|
|
90
|
+
description: "The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.",
|
|
91
|
+
optional: true,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
78
94
|
}
|
|
79
95
|
return props;
|
|
80
96
|
},
|
|
@@ -83,14 +99,17 @@ export default {
|
|
|
83
99
|
type: toolType,
|
|
84
100
|
})) || [];
|
|
85
101
|
if (this.toolTypes?.includes("function")) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
const numberOfFunctions = this.numberOfFunctions || 1;
|
|
103
|
+
for (let i = 0; i < numberOfFunctions; i++) {
|
|
104
|
+
tools.push({
|
|
105
|
+
type: "function",
|
|
106
|
+
function: {
|
|
107
|
+
name: this[`functionName_${i}`],
|
|
108
|
+
description: this[`functionDescription_${i}`],
|
|
109
|
+
parameters: this[`functionParameters_${i}`],
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
94
113
|
}
|
|
95
114
|
return tools.length
|
|
96
115
|
? tools
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "openai-convert-text-to-speech",
|
|
6
6
|
name: "Convert Text to Speech (TTS)",
|
|
7
7
|
description: "Generates audio from the input text. [See the documentation](https://platform.openai.com/docs/api-reference/audio/createSpeech)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.11",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
openai,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "openai-create-assistant",
|
|
7
7
|
name: "Create Assistant",
|
|
8
8
|
description: "Creates an assistant with a model and instructions. [See the documentation](https://platform.openai.com/docs/api-reference/assistants/createAssistant)",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.10",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
openai,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
key: "openai-create-batch",
|
|
9
9
|
name: "Create Batch",
|
|
10
10
|
description: "Creates and executes a batch from an uploaded file of requests. [See the documentation](https://platform.openai.com/docs/api-reference/batch/create)",
|
|
11
|
-
version: "0.0.
|
|
11
|
+
version: "0.0.6",
|
|
12
12
|
type: "action",
|
|
13
13
|
props: {
|
|
14
14
|
openai,
|
|
@@ -4,7 +4,7 @@ import common from "../common/common.mjs";
|
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
name: "Create Embeddings",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.15",
|
|
8
8
|
key: "openai-create-embeddings",
|
|
9
9
|
description: "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. [See the documentation](https://platform.openai.com/docs/api-reference/embeddings)",
|
|
10
10
|
type: "action",
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-create-fine-tuning-job",
|
|
5
5
|
name: "Create Fine Tuning Job",
|
|
6
6
|
description: "Creates a job that fine-tunes a specified model from a given dataset. [See the documentation](https://platform.openai.com/docs/api-reference/fine-tuning/create)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.11",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ import fs from "fs";
|
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
name: "Create Image (Dall-E)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.19",
|
|
8
8
|
key: "openai-create-image",
|
|
9
9
|
description: "Creates an image given a prompt returning a URL to the image. [See the documentation](https://platform.openai.com/docs/api-reference/images)",
|
|
10
10
|
type: "action",
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "openai-create-moderation",
|
|
6
6
|
name: "Create Moderation",
|
|
7
7
|
description: "Classifies if text is potentially harmful. [See the documentation](https://platform.openai.com/docs/api-reference/moderations/create)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.6",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
openai,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "openai-create-thread",
|
|
7
7
|
name: "Create Thread (Assistants)",
|
|
8
8
|
description: "Creates a thread with optional messages and metadata, and optionally runs the thread using the specified assistant. [See the documentation](https://platform.openai.com/docs/api-reference/threads/createThread)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.12",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
openai,
|
|
@@ -24,7 +24,7 @@ const pipelineAsync = promisify(stream.pipeline);
|
|
|
24
24
|
|
|
25
25
|
export default {
|
|
26
26
|
name: "Create Transcription (Whisper)",
|
|
27
|
-
version: "0.1.
|
|
27
|
+
version: "0.1.15",
|
|
28
28
|
key: "openai-create-transcription",
|
|
29
29
|
description: "Transcribes audio into the input language. [See the documentation](https://platform.openai.com/docs/api-reference/audio/create).",
|
|
30
30
|
type: "action",
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-create-vector-store",
|
|
5
5
|
name: "Create Vector Store",
|
|
6
6
|
description: "Create a vector store. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores/create)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-create-vector-store-file",
|
|
5
5
|
name: "Create Vector Store File",
|
|
6
6
|
description: "Create a vector store file. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores-files/createFile)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-delete-file",
|
|
5
5
|
name: "Delete File",
|
|
6
6
|
description: "Deletes a specified file from OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/files/delete)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.12",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-delete-vector-store",
|
|
5
5
|
name: "Delete Vector Store",
|
|
6
6
|
description: "Delete a vector store. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores/delete)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-delete-vector-store-file",
|
|
5
5
|
name: "Delete Vector Store File",
|
|
6
6
|
description: "Deletes a vector store file. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores-files/deleteFile)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-list-files",
|
|
5
5
|
name: "List Files",
|
|
6
6
|
description: "Returns a list of files that belong to the user's organization. [See the documentation](https://platform.openai.com/docs/api-reference/files/list)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.12",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-list-messages",
|
|
5
5
|
name: "List Messages (Assistants)",
|
|
6
6
|
description: "Lists the messages for a given thread. [See the documentation](https://platform.openai.com/docs/api-reference/messages/listMessages)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.13",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-list-run-steps",
|
|
5
5
|
name: "List Run Steps (Assistants)",
|
|
6
6
|
description: "Returns a list of run steps belonging to a run. [See the documentation](https://platform.openai.com/docs/api-reference/runs/list-run-steps)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.12",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-list-runs",
|
|
5
5
|
name: "List Runs (Assistants)",
|
|
6
6
|
description: "Returns a list of runs belonging to a thread. [See the documentation](https://platform.openai.com/docs/api-reference/runs/list)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.13",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-list-vector-store-files",
|
|
5
5
|
name: "List Vector Store Files",
|
|
6
6
|
description: "Returns a list of vector store file. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-list-vector-stores",
|
|
5
5
|
name: "List Vector Stores",
|
|
6
6
|
description: "Returns a list of vector stores. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores/list)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "openai-modify-assistant",
|
|
7
7
|
name: "Modify an Assistant",
|
|
8
8
|
description: "Modifies an existing OpenAI assistant. [See the documentation](https://platform.openai.com/docs/api-reference/assistants/modifyAssistant)",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.10",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-retrieve-file",
|
|
5
5
|
name: "Retrieve File",
|
|
6
6
|
description: "Retrieves a specific file from OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/files/retrieve)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.12",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "openai-retrieve-file-content",
|
|
6
6
|
name: "Retrieve File Content",
|
|
7
7
|
description: "Retrieves the contents of the specified file. [See the documentation](https://platform.openai.com/docs/api-reference/files/retrieve-content)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.12",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-retrieve-run",
|
|
5
5
|
name: "Retrieve Run (Assistants)",
|
|
6
6
|
description: "Retrieves a specific run within a thread. [See the documentation](https://platform.openai.com/docs/api-reference/runs/getRun)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.12",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-retrieve-run-step",
|
|
5
5
|
name: "Retrieve Run Step (Assistants)",
|
|
6
6
|
description: "Retrieve a specific run step in a thread. [See the documentation](https://platform.openai.com/docs/api-reference/runs/getRunStep)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.12",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-retrieve-vector-store",
|
|
5
5
|
name: "Retrieve Vector Store",
|
|
6
6
|
description: "Retrieve a vector store. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores/retrieve)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "openai-retrieve-vector-store-file",
|
|
5
5
|
name: "Retrieve Vector Store File",
|
|
6
6
|
description: "Retrieve a vector store file. [See the documentation](https://platform.openai.com/docs/api-reference/vector-stores-files/getFile)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -4,7 +4,7 @@ import common from "../common/common.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
...common,
|
|
6
6
|
name: "Create Completion (Send Prompt)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.14",
|
|
8
8
|
key: "openai-send-prompt",
|
|
9
9
|
description: "OpenAI recommends using the **Chat** action for the latest `gpt-3.5-turbo` API, since it's faster and 10x cheaper. This action creates a completion for the provided prompt and parameters using the older `/completions` API. [See the documentation](https://beta.openai.com/docs/api-reference/completions/create)",
|
|
10
10
|
type: "action",
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "openai-submit-tool-outputs-to-run",
|
|
6
6
|
name: "Submit Tool Outputs to Run (Assistants)",
|
|
7
7
|
description: "Submits tool outputs to a run that requires action. [See the documentation](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.12",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
openai,
|
|
@@ -4,7 +4,7 @@ import constants from "../../common/constants.mjs";
|
|
|
4
4
|
export default {
|
|
5
5
|
...common,
|
|
6
6
|
name: "Summarize Text",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.3",
|
|
8
8
|
key: "openai-summarize",
|
|
9
9
|
description: "Summarizes text using the Chat API. [See the documentation](https://platform.openai.com/docs/api-reference/chat)",
|
|
10
10
|
type: "action",
|
|
@@ -9,7 +9,7 @@ const langOptions = lang.LANGUAGES.map((l) => ({
|
|
|
9
9
|
export default {
|
|
10
10
|
...common,
|
|
11
11
|
name: "Translate Text (Whisper)",
|
|
12
|
-
version: "0.1.
|
|
12
|
+
version: "0.1.3",
|
|
13
13
|
key: "openai-translate-text",
|
|
14
14
|
description: "Translate text from one language to another using the Chat API. [See the documentation](https://platform.openai.com/docs/api-reference/chat)",
|
|
15
15
|
type: "action",
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "openai-upload-file",
|
|
7
7
|
name: "Upload File",
|
|
8
8
|
description: "Upload a file that can be used across various endpoints/features. The size of individual files can be a maximum of 512mb. [See the documentation](https://platform.openai.com/docs/api-reference/files/create)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.15",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
openai,
|
package/common/helpers.mjs
CHANGED
package/openai.app.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/openai",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Pipedream OpenAI Components",
|
|
5
5
|
"main": "openai.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
18
|
-
"@pipedream/platform": "^
|
|
18
|
+
"@pipedream/platform": "^3.0.3",
|
|
19
19
|
"@pipedream/types": "^0.1.4",
|
|
20
20
|
"axios": "^1.6.2",
|
|
21
21
|
"bottleneck": "^2.19.5",
|
|
22
22
|
"form-data": "^4.0.0",
|
|
23
23
|
"got": "^12.6.0",
|
|
24
|
-
"openai": "^
|
|
24
|
+
"openai": "^4.77.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^17.0.45"
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "openai-new-batch-completed",
|
|
7
7
|
name: "New Batch Completed",
|
|
8
8
|
description: "Emit new event when a new batch is completed in OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/batch/list)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.6",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "openai-new-file-created",
|
|
7
7
|
name: "New File Created",
|
|
8
8
|
description: "Emit new event when a new file is created in OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/files/list)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
props: {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "openai-new-fine-tuning-job-created",
|
|
7
7
|
name: "New Fine Tuning Job Created",
|
|
8
8
|
description: "Emit new event when a new fine-tuning job is created in OpenAI. [See the documentation](https://platform.openai.com/docs/api-reference/fine-tuning/list)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.11",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "openai-new-run-state-changed",
|
|
7
7
|
name: "New Run State Changed",
|
|
8
8
|
description: "Emit new event every time a run changes its status. [See the documentation](https://platform.openai.com/docs/api-reference/runs/listRuns)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.7",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
props: {
|