@pipedream/openai 1.1.0 → 1.2.0
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 +1 -1
- package/actions/chat-using-file-search/chat-using-file-search.mjs +1 -1
- package/actions/chat-using-functions/chat-using-functions.mjs +1 -1
- package/actions/chat-using-web-search/chat-using-web-search.mjs +4 -6
- package/actions/chat-with-assistant/chat-with-assistant.mjs +1 -1
- package/actions/chat-with-responses-api/chat-with-responses-api.mjs +1 -1
- package/actions/classify-items-into-categories/classify-items-into-categories.mjs +1 -1
- 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 +3 -2
- package/actions/create-moderation/create-moderation.mjs +3 -3
- package/actions/create-thread/create-thread.mjs +2 -2
- package/actions/create-transcription/create-transcription.mjs +3 -6
- 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/constants.mjs +0 -50
- package/common/models.mjs +74 -0
- package/openai.app.mjs +14 -6
- package/package.json +2 -2
- 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: "1.0.
|
|
11
|
+
version: "1.0.2",
|
|
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.16",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
package/actions/chat/chat.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import constants from "../../common/constants.mjs";
|
|
|
5
5
|
export default {
|
|
6
6
|
...common,
|
|
7
7
|
name: "Chat",
|
|
8
|
-
version: "0.3.
|
|
8
|
+
version: "0.3.3",
|
|
9
9
|
key: "openai-chat",
|
|
10
10
|
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)",
|
|
11
11
|
type: "action",
|
|
@@ -5,7 +5,7 @@ import constants from "../../common/constants.mjs";
|
|
|
5
5
|
export default {
|
|
6
6
|
...common,
|
|
7
7
|
name: "Chat using File Search",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.7",
|
|
9
9
|
key: "openai-chat-using-file-search",
|
|
10
10
|
description: "Chat with your files knowledge base (vector stores). [See the documentation](https://platform.openai.com/docs/guides/tools-file-search)",
|
|
11
11
|
type: "action",
|
|
@@ -5,7 +5,7 @@ import constants from "../../common/constants.mjs";
|
|
|
5
5
|
export default {
|
|
6
6
|
...common,
|
|
7
7
|
name: "Chat using Functions",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.8",
|
|
9
9
|
key: "openai-chat-using-functions",
|
|
10
10
|
description: "Chat with your models and allow them to invoke functions. Optionally, you can build and invoke workflows as functions. [See the documentation](https://platform.openai.com/docs/guides/function-calling)",
|
|
11
11
|
type: "action",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import openai from "../../openai.app.mjs";
|
|
2
2
|
import common from "../common/common.mjs";
|
|
3
3
|
import constants from "../../common/constants.mjs";
|
|
4
|
+
import { WEB_SEARCH_CHAT_MODELS } from "../../common/models.mjs";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
...common,
|
|
7
8
|
name: "Chat using Web Search",
|
|
8
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.7",
|
|
9
10
|
key: "openai-chat-using-web-search",
|
|
10
11
|
description: "Chat using the web search tool. [See the documentation](https://platform.openai.com/docs/guides/tools-web-search)",
|
|
11
12
|
type: "action",
|
|
@@ -15,11 +16,8 @@ export default {
|
|
|
15
16
|
type: "string",
|
|
16
17
|
label: "Model",
|
|
17
18
|
description: "Model used to generate the response",
|
|
18
|
-
default:
|
|
19
|
-
options:
|
|
20
|
-
"gpt-4o",
|
|
21
|
-
"gpt-4o-mini",
|
|
22
|
-
],
|
|
19
|
+
default: WEB_SEARCH_CHAT_MODELS[0],
|
|
20
|
+
options: WEB_SEARCH_CHAT_MODELS,
|
|
23
21
|
},
|
|
24
22
|
input: {
|
|
25
23
|
type: "string",
|
|
@@ -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.12",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
openai,
|
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
...common,
|
|
11
11
|
key: "openai-chat-with-responses-api",
|
|
12
12
|
name: "Chat With Responses API",
|
|
13
|
-
version: "0.0.
|
|
13
|
+
version: "0.0.2",
|
|
14
14
|
description: "Send a chat via the Responses API, mixing built-in tools and MCP server tools. [See the documentation](https://platform.openai.com/docs/guides/tools?api-mode=responses).",
|
|
15
15
|
type: "action",
|
|
16
16
|
props: {
|
|
@@ -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.9",
|
|
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",
|
|
@@ -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.16",
|
|
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.14",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
openai,
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
key: "openai-create-batch",
|
|
10
10
|
name: "Create Batch",
|
|
11
11
|
description: "Creates and executes a batch from an uploaded file of requests. [See the documentation](https://platform.openai.com/docs/api-reference/batch/create)",
|
|
12
|
-
version: "0.1.
|
|
12
|
+
version: "0.1.2",
|
|
13
13
|
type: "action",
|
|
14
14
|
props: {
|
|
15
15
|
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.21",
|
|
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.15",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
openai,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import openai from "../../openai.app.mjs";
|
|
2
2
|
import constants from "../../common/constants.mjs";
|
|
3
3
|
import fs from "fs";
|
|
4
|
+
import { IMAGE_MODELS } from "../../common/models.mjs";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
name: "Create Image (Dall-E)",
|
|
7
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.24",
|
|
8
9
|
key: "openai-create-image",
|
|
9
10
|
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
11
|
type: "action",
|
|
@@ -14,7 +15,7 @@ export default {
|
|
|
14
15
|
label: "Model",
|
|
15
16
|
description: "Choose the DALL·E models to generate image(s) with.",
|
|
16
17
|
type: "string",
|
|
17
|
-
options:
|
|
18
|
+
options: IMAGE_MODELS,
|
|
18
19
|
reloadProps: true,
|
|
19
20
|
},
|
|
20
21
|
prompt: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import openai from "../../openai.app.mjs";
|
|
2
|
-
import
|
|
2
|
+
import { MODERATION_MODELS } from "../../common/models.mjs";
|
|
3
3
|
|
|
4
4
|
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.10",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
openai,
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
type: "string",
|
|
19
19
|
label: "Model",
|
|
20
20
|
description: "The model to use",
|
|
21
|
-
options:
|
|
21
|
+
options: MODERATION_MODELS,
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
async run({ $ }) {
|
|
@@ -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.16",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
openai,
|
|
@@ -88,7 +88,7 @@ export default {
|
|
|
88
88
|
}));
|
|
89
89
|
},
|
|
90
90
|
async getAssistantModelPropOptions() {
|
|
91
|
-
const models =
|
|
91
|
+
const models = await this.openai.getAssistantsModels({});
|
|
92
92
|
return models.map(({ id }) => id);
|
|
93
93
|
},
|
|
94
94
|
},
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { getFileStreamAndMetadata } from "@pipedream/platform";
|
|
2
2
|
import openai from "../../openai.app.mjs";
|
|
3
3
|
import FormData from "form-data";
|
|
4
|
+
import { TRANSCRIPTION_MODELS } from "../../common/models.mjs";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
key: "openai-create-transcription",
|
|
7
8
|
name: "Create Transcription",
|
|
8
9
|
description: "Transcribes audio into the input language. [See the documentation](https://platform.openai.com/docs/api-reference/audio/createTranscription)",
|
|
9
|
-
version: "0.3.
|
|
10
|
+
version: "0.3.2",
|
|
10
11
|
type: "action",
|
|
11
12
|
props: {
|
|
12
13
|
openai,
|
|
@@ -20,11 +21,7 @@ export default {
|
|
|
20
21
|
type: "string",
|
|
21
22
|
label: "Model",
|
|
22
23
|
description: "ID of the model to use",
|
|
23
|
-
options:
|
|
24
|
-
"gpt-4o-transcribe",
|
|
25
|
-
"gpt-4o-mini-transcribe",
|
|
26
|
-
"whisper-1",
|
|
27
|
-
],
|
|
24
|
+
options: TRANSCRIPTION_MODELS,
|
|
28
25
|
},
|
|
29
26
|
include: {
|
|
30
27
|
type: "string[]",
|
|
@@ -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.6",
|
|
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.6",
|
|
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.16",
|
|
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.6",
|
|
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.6",
|
|
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.16",
|
|
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.17",
|
|
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.16",
|
|
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.17",
|
|
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.6",
|
|
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.6",
|
|
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.14",
|
|
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.16",
|
|
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.17",
|
|
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.16",
|
|
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.16",
|
|
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.6",
|
|
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.6",
|
|
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.20",
|
|
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.16",
|
|
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.9",
|
|
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.9",
|
|
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.1.
|
|
9
|
+
version: "0.1.2",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
openai,
|
package/common/constants.mjs
CHANGED
|
@@ -1,49 +1,3 @@
|
|
|
1
|
-
const FINE_TUNING_MODEL_OPTIONS = [
|
|
2
|
-
{
|
|
3
|
-
label: "gpt-3.5-turbo-1106 (recommended)",
|
|
4
|
-
value: "gpt-3.5-turbo-1106",
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
label: "gpt-3.5-turbo-0613",
|
|
8
|
-
value: "gpt-3.5-turbo-0613",
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
label: "babbage-002",
|
|
12
|
-
value: "babbage-002",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
label: "davinci-002",
|
|
16
|
-
value: "davinci-002",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: "gpt-4-0613 (experimental — eligible users will be presented with an option to request access in the fine-tuning UI)",
|
|
20
|
-
value: "gpt-4-0613",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
label: "gpt-4.1-mini-2025-04-14",
|
|
24
|
-
value: "gpt-4.1-mini-2025-04-14",
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
label: "gpt-4.1-2025-04-14",
|
|
28
|
-
value: "gpt-4.1-2025-04-14",
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
const TTS_MODELS = [
|
|
33
|
-
"tts-1",
|
|
34
|
-
"tts-1-hd",
|
|
35
|
-
];
|
|
36
|
-
|
|
37
|
-
const IMAGE_MODELS = [
|
|
38
|
-
"dall-e-2",
|
|
39
|
-
"dall-e-3",
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
const MODERATION_MODELS = [
|
|
43
|
-
"text-moderation-stable",
|
|
44
|
-
"text-moderation-latest",
|
|
45
|
-
];
|
|
46
|
-
|
|
47
1
|
const AUDIO_RESPONSE_FORMATS = [
|
|
48
2
|
"mp3",
|
|
49
3
|
"opus",
|
|
@@ -175,10 +129,6 @@ const BATCH_ENDPOINTS = [
|
|
|
175
129
|
];
|
|
176
130
|
|
|
177
131
|
export default {
|
|
178
|
-
FINE_TUNING_MODEL_OPTIONS,
|
|
179
|
-
TTS_MODELS,
|
|
180
|
-
IMAGE_MODELS,
|
|
181
|
-
MODERATION_MODELS,
|
|
182
132
|
AUDIO_RESPONSE_FORMATS,
|
|
183
133
|
CHAT_RESPONSE_FORMAT,
|
|
184
134
|
IMAGE_RESPONSE_FORMATS,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export const FINE_TUNING_MODEL_OPTIONS = [
|
|
2
|
+
{
|
|
3
|
+
label: "gpt-3.5-turbo-1106 (recommended)",
|
|
4
|
+
value: "gpt-3.5-turbo-1106",
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
label: "gpt-3.5-turbo-0613",
|
|
8
|
+
value: "gpt-3.5-turbo-0613",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: "babbage-002",
|
|
12
|
+
value: "babbage-002",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: "davinci-002",
|
|
16
|
+
value: "davinci-002",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: "gpt-4-0613 (experimental — eligible users will be presented with an option to request access in the fine-tuning UI)",
|
|
20
|
+
value: "gpt-4-0613",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: "gpt-4.1-mini-2025-04-14",
|
|
24
|
+
value: "gpt-4.1-mini-2025-04-14",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: "gpt-4.1-2025-04-14",
|
|
28
|
+
value: "gpt-4.1-2025-04-14",
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
export const TTS_MODELS = [
|
|
33
|
+
"tts-1",
|
|
34
|
+
"tts-1-hd",
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
export const IMAGE_MODELS = [
|
|
38
|
+
"dall-e-2",
|
|
39
|
+
"dall-e-3",
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
export const MODERATION_MODELS = [
|
|
43
|
+
"text-moderation-stable",
|
|
44
|
+
"text-moderation-latest",
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
// Models that are eligible for Assistants API usage when selecting an Assistant model
|
|
48
|
+
export const ASSISTANTS_MODEL_INCLUDE_SUBSTRINGS = [
|
|
49
|
+
"gpt-3.5-turbo",
|
|
50
|
+
"gpt-4-turbo",
|
|
51
|
+
"gpt-4o",
|
|
52
|
+
"gpt-4.1",
|
|
53
|
+
"gpt-5",
|
|
54
|
+
"gpt-5-mini",
|
|
55
|
+
"gpt-5-nano",
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
// Exact model IDs to exclude from Assistants model options
|
|
59
|
+
export const ASSISTANTS_MODEL_EXCLUDED = [
|
|
60
|
+
"gpt-3.5-turbo-0301",
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
// Supported models in the "Chat using Web Search" action
|
|
64
|
+
export const WEB_SEARCH_CHAT_MODELS = [
|
|
65
|
+
"gpt-4o",
|
|
66
|
+
"gpt-4o-mini",
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
// Supported models in the "Create Transcription" action
|
|
70
|
+
export const TRANSCRIPTION_MODELS = [
|
|
71
|
+
"gpt-4o-transcribe",
|
|
72
|
+
"gpt-4o-mini-transcribe",
|
|
73
|
+
"whisper-1",
|
|
74
|
+
];
|
package/openai.app.mjs
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { axios } from "@pipedream/platform";
|
|
2
2
|
import constants from "./common/constants.mjs";
|
|
3
|
+
import {
|
|
4
|
+
ASSISTANTS_MODEL_EXCLUDED,
|
|
5
|
+
ASSISTANTS_MODEL_INCLUDE_SUBSTRINGS,
|
|
6
|
+
FINE_TUNING_MODEL_OPTIONS, TTS_MODELS,
|
|
7
|
+
} from "./common/models.mjs";
|
|
3
8
|
|
|
4
9
|
export default {
|
|
5
10
|
type: "app",
|
|
@@ -21,7 +26,7 @@ export default {
|
|
|
21
26
|
async options() {
|
|
22
27
|
return (await this.getChatCompletionModels({})).map((model) => model.id);
|
|
23
28
|
},
|
|
24
|
-
default: "gpt-
|
|
29
|
+
default: "gpt-5-mini",
|
|
25
30
|
},
|
|
26
31
|
embeddingsModelId: {
|
|
27
32
|
label: "Model",
|
|
@@ -268,13 +273,13 @@ export default {
|
|
|
268
273
|
type: "string",
|
|
269
274
|
label: "Model",
|
|
270
275
|
description: "One of the available [TTS models](https://platform.openai.com/docs/models/tts). `tts-1` is optimized for speed, while `tts-1-hd` is optimized for quality.",
|
|
271
|
-
options:
|
|
276
|
+
options: TTS_MODELS,
|
|
272
277
|
},
|
|
273
278
|
fineTuningModel: {
|
|
274
279
|
type: "string",
|
|
275
280
|
label: "Fine Tuning Model",
|
|
276
281
|
description: "The name of the model to fine-tune. [See the supported models](https://platform.openai.com/docs/guides/fine-tuning/what-models-can-be-fine-tuned).",
|
|
277
|
-
options:
|
|
282
|
+
options: FINE_TUNING_MODEL_OPTIONS,
|
|
278
283
|
},
|
|
279
284
|
input: {
|
|
280
285
|
type: "string",
|
|
@@ -346,13 +351,13 @@ export default {
|
|
|
346
351
|
$,
|
|
347
352
|
path: "/models",
|
|
348
353
|
});
|
|
349
|
-
return models.sort((a, b) => a?.
|
|
354
|
+
return models.sort((a, b) => b?.created - a?.created);
|
|
350
355
|
},
|
|
351
356
|
async getChatCompletionModels({ $ }) {
|
|
352
357
|
const models = await this.models({
|
|
353
358
|
$,
|
|
354
359
|
});
|
|
355
|
-
return models.filter((model) => model.id.match(/4o|o[1-9]|4\.1/gi));
|
|
360
|
+
return models.filter((model) => model.id.match(/4o|o[1-9]|4\.1|gpt-5/gi));
|
|
356
361
|
},
|
|
357
362
|
async getCompletionModels({ $ }) {
|
|
358
363
|
const models = await this.models({
|
|
@@ -380,7 +385,10 @@ export default {
|
|
|
380
385
|
const models = await this.models({
|
|
381
386
|
$,
|
|
382
387
|
});
|
|
383
|
-
return models.filter(({ id }) => (
|
|
388
|
+
return models.filter(({ id }) => (
|
|
389
|
+
ASSISTANTS_MODEL_INCLUDE_SUBSTRINGS.some((substring) => id.includes(substring))
|
|
390
|
+
&& !ASSISTANTS_MODEL_EXCLUDED.includes(id)
|
|
391
|
+
));
|
|
384
392
|
},
|
|
385
393
|
async _makeCompletion({
|
|
386
394
|
path, ...args
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/openai",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
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
|
"@pipedream/platform": "^3.1.0",
|
|
18
|
-
"@pipedream/types": "^0.1.4",
|
|
19
18
|
"bottleneck": "^2.19.5",
|
|
20
19
|
"form-data": "^4.0.0",
|
|
21
20
|
"got": "^12.6.0",
|
|
22
21
|
"openai": "^4.77.0"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
24
|
+
"@pipedream/types": "^0.3.2",
|
|
25
25
|
"@types/node": "^17.0.45"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -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.10",
|
|
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.15",
|
|
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.15",
|
|
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.11",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
props: {
|