@pipedream/openai 0.5.1 → 0.5.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.
Files changed (50) hide show
  1. package/README.md +89 -20
  2. package/actions/analyze-image-content/analyze-image-content.mjs +131 -0
  3. package/actions/cancel-run/cancel-run.mjs +2 -1
  4. package/actions/chat/chat.mjs +5 -7
  5. package/actions/chat-with-assistant/chat-with-assistant.mjs +129 -0
  6. package/actions/classify-items-into-categories/classify-items-into-categories.mjs +27 -10
  7. package/actions/common/common-assistants.mjs +128 -0
  8. package/actions/common/common-helper.mjs +10 -3
  9. package/actions/{create-speech/create-speech.mjs → convert-text-to-speech/convert-text-to-speech.mjs} +3 -3
  10. package/actions/create-assistant/create-assistant.mjs +14 -22
  11. package/actions/create-batch/create-batch.mjs +78 -0
  12. package/actions/create-embeddings/create-embeddings.mjs +3 -3
  13. package/actions/create-fine-tuning-job/create-fine-tuning-job.mjs +14 -3
  14. package/actions/create-image/create-image.mjs +42 -88
  15. package/actions/create-moderation/create-moderation.mjs +35 -0
  16. package/actions/create-thread/create-thread.mjs +110 -8
  17. package/actions/create-transcription/create-transcription.mjs +4 -4
  18. package/actions/delete-file/delete-file.mjs +6 -5
  19. package/actions/list-files/list-files.mjs +3 -2
  20. package/actions/list-messages/list-messages.mjs +18 -21
  21. package/actions/list-run-steps/list-run-steps.mjs +18 -25
  22. package/actions/list-runs/list-runs.mjs +17 -34
  23. package/actions/modify-assistant/modify-assistant.mjs +13 -23
  24. package/actions/retrieve-file/retrieve-file.mjs +6 -5
  25. package/actions/retrieve-file-content/retrieve-file-content.mjs +29 -6
  26. package/actions/retrieve-run/retrieve-run.mjs +2 -1
  27. package/actions/retrieve-run-step/retrieve-run-step.mjs +8 -1
  28. package/actions/send-prompt/send-prompt.mjs +8 -3
  29. package/actions/submit-tool-outputs-to-run/submit-tool-outputs-to-run.mjs +18 -3
  30. package/actions/summarize/summarize.mjs +11 -10
  31. package/actions/translate-text/translate-text.mjs +9 -5
  32. package/actions/upload-file/upload-file.mjs +1 -1
  33. package/common/constants.mjs +154 -3
  34. package/openai.app.mjs +230 -269
  35. package/package.json +1 -1
  36. package/sources/{common.mjs → common/common.mjs} +11 -9
  37. package/sources/new-batch-completed/new-batch-completed.mjs +46 -0
  38. package/sources/new-batch-completed/test-event.mjs +29 -0
  39. package/sources/new-file-created/new-file-created.mjs +5 -3
  40. package/sources/new-file-created/test-event.mjs +10 -0
  41. package/sources/new-fine-tuning-job-created/new-fine-tuning-job-created.mjs +5 -3
  42. package/sources/new-fine-tuning-job-created/test-event.mjs +19 -0
  43. package/sources/new-run-state-changed/new-run-state-changed.mjs +4 -2
  44. package/sources/new-run-state-changed/test-event.mjs +36 -0
  45. package/actions/common/constants.mjs +0 -14
  46. package/actions/create-message/create-message.mjs +0 -64
  47. package/actions/create-run/create-run.mjs +0 -65
  48. package/actions/create-thread-and-run/create-thread-and-run.mjs +0 -62
  49. package/actions/modify-message/modify-message.mjs +0 -42
  50. package/actions/modify-run/modify-run.mjs +0 -45
@@ -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.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  openai,
@@ -28,41 +28,34 @@ export default {
28
28
  openai,
29
29
  "limit",
30
30
  ],
31
- optional: true,
32
31
  },
33
32
  order: {
34
33
  propDefinition: [
35
34
  openai,
36
35
  "order",
37
36
  ],
38
- optional: true,
39
- },
40
- after: {
41
- propDefinition: [
42
- openai,
43
- "after",
44
- ],
45
- optional: true,
46
- },
47
- before: {
48
- propDefinition: [
49
- openai,
50
- "before",
51
- ],
52
- optional: true,
53
37
  },
54
38
  },
55
39
  async run({ $ }) {
56
- const response = await this.openai.listRunSteps({
57
- threadId: this.threadId,
58
- runId: this.runId,
59
- limit: this.limit,
60
- order: this.order,
61
- after: this.after,
62
- before: this.before,
40
+ const response = this.openai.paginate({
41
+ resourceFn: this.openai.listRunSteps,
42
+ args: {
43
+ $,
44
+ threadId: this.threadId,
45
+ runId: this.runId,
46
+ params: {
47
+ order: this.order,
48
+ },
49
+ },
50
+ max: this.limit,
63
51
  });
64
52
 
53
+ const runSteps = [];
54
+ for await (const runStep of response) {
55
+ runSteps.push(runStep);
56
+ }
57
+
65
58
  $.export("$summary", `Successfully listed run steps for run ${this.runId}`);
66
- return response;
59
+ return runSteps;
67
60
  },
68
61
  };
@@ -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",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  openai,
@@ -19,50 +19,33 @@ export default {
19
19
  openai,
20
20
  "limit",
21
21
  ],
22
- optional: true,
23
22
  },
24
23
  order: {
25
24
  propDefinition: [
26
25
  openai,
27
26
  "order",
28
27
  ],
29
- optional: true,
30
- },
31
- after: {
32
- propDefinition: [
33
- openai,
34
- "after",
35
- ],
36
- },
37
- before: {
38
- propDefinition: [
39
- openai,
40
- "before",
41
- ],
42
28
  },
43
29
  },
44
30
  async run({ $ }) {
45
- const params = {
46
- ...(this.limit && {
47
- limit: this.limit,
48
- }),
49
- ...(this.order && {
50
- order: this.order,
51
- }),
52
- ...(this.after && {
53
- after: this.after,
54
- }),
55
- ...(this.before && {
56
- before: this.before,
57
- }),
58
- };
59
-
60
- const response = await this.openai.listRuns({
61
- threadId: this.threadId,
62
- ...params,
31
+ const response = this.openai.paginate({
32
+ resourceFn: this.openai.listRuns,
33
+ args: {
34
+ $,
35
+ threadId: this.threadId,
36
+ params: {
37
+ order: this.order,
38
+ },
39
+ },
40
+ max: this.limit,
63
41
  });
64
42
 
43
+ const runs = [];
44
+ for await (const run of response) {
45
+ runs.push(run);
46
+ }
47
+
65
48
  $.export("$summary", `Successfully retrieved runs for thread ${this.threadId}`);
66
- return response;
49
+ return runs;
67
50
  },
68
51
  };
@@ -1,11 +1,12 @@
1
- import { parseToolsArray } from "../../common/helpers.mjs";
2
1
  import openai from "../../openai.app.mjs";
2
+ import common from "../common/common-assistants.mjs";
3
3
 
4
4
  export default {
5
+ ...common,
5
6
  key: "openai-modify-assistant",
6
7
  name: "Modify an Assistant",
7
8
  description: "Modifies an existing OpenAI assistant. [See the documentation](https://platform.openai.com/docs/api-reference/assistants/modifyAssistant)",
8
- version: "0.1.3",
9
+ version: "0.1.4",
9
10
  type: "action",
10
11
  props: {
11
12
  openai,
@@ -43,20 +44,6 @@ export default {
43
44
  ],
44
45
  optional: true,
45
46
  },
46
- tools: {
47
- propDefinition: [
48
- openai,
49
- "tools",
50
- ],
51
- optional: true,
52
- },
53
- file_ids: {
54
- propDefinition: [
55
- openai,
56
- "file_ids",
57
- ],
58
- optional: true,
59
- },
60
47
  metadata: {
61
48
  propDefinition: [
62
49
  openai,
@@ -64,18 +51,21 @@ export default {
64
51
  ],
65
52
  optional: true,
66
53
  },
54
+ ...common.props,
67
55
  },
68
56
  async run({ $ }) {
69
57
  const response = await this.openai.modifyAssistant({
70
58
  $,
71
59
  assistant: this.assistant,
72
- model: this.model,
73
- name: this.name,
74
- description: this.description,
75
- instructions: this.instructions,
76
- tools: parseToolsArray(this.tools),
77
- file_ids: this.file_ids,
78
- metadata: this.metadata,
60
+ data: {
61
+ model: this.model,
62
+ name: this.name,
63
+ description: this.description,
64
+ instructions: this.instructions,
65
+ tools: this.buildTools(),
66
+ tool_resources: this.buildToolResources(),
67
+ metadata: this.metadata,
68
+ },
79
69
  });
80
70
  $.export("$summary", `Successfully modified assistant ${this.assistant}`);
81
71
  return response;
@@ -4,23 +4,24 @@ 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.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  openai,
11
- file_id: {
11
+ fileId: {
12
12
  propDefinition: [
13
13
  openai,
14
- "file_id",
14
+ "fileId",
15
15
  ],
16
16
  },
17
17
  },
18
18
  async run({ $ }) {
19
19
  const response = await this.openai.retrieveFile({
20
- file_id: this.file_id,
20
+ $,
21
+ file_id: this.fileId,
21
22
  });
22
23
 
23
- $.export("$summary", `Successfully retrieved file with ID ${this.file_id}`);
24
+ $.export("$summary", `Successfully retrieved file with ID ${this.fileId}`);
24
25
  return response;
25
26
  },
26
27
  };
@@ -1,25 +1,48 @@
1
1
  import openai from "../../openai.app.mjs";
2
+ import fs from "fs";
2
3
 
3
4
  export default {
4
5
  key: "openai-retrieve-file-content",
5
6
  name: "Retrieve File Content",
6
7
  description: "Retrieves the contents of the specified file. [See the documentation](https://platform.openai.com/docs/api-reference/files/retrieve-content)",
7
- version: "0.0.6",
8
+ version: "0.0.7",
8
9
  type: "action",
9
10
  props: {
10
11
  openai,
11
- file_id: {
12
+ fileId: {
12
13
  propDefinition: [
13
14
  openai,
14
- "file_id",
15
+ "fileId",
15
16
  ],
16
17
  },
18
+ fileName: {
19
+ type: "string",
20
+ label: "Filename",
21
+ description: "Optionally, download the file to the `/tmp` directory using the given filename",
22
+ optional: true,
23
+ },
17
24
  },
18
25
  async run({ $ }) {
19
26
  const response = await this.openai.retrieveFileContent({
20
- file_id: this.file_id,
27
+ $,
28
+ file_id: this.fileId,
29
+ responseType: "arraybuffer",
21
30
  });
22
- $.export("$summary", `Successfully retrieved file content with ID ${this.file_id}`);
23
- return response;
31
+
32
+ if (!this.fileName) {
33
+ $.export("$summary", `Successfully retrieved file content with ID ${this.fileId}`);
34
+ return response;
35
+ }
36
+
37
+ const outputFilePath = this.fileName.includes("tmp/")
38
+ ? this.fileName
39
+ : `/tmp/${this.fileName}`;
40
+ await fs.promises.writeFile(outputFilePath, Buffer.from(response));
41
+ const filedata = [
42
+ this.fileName,
43
+ outputFilePath,
44
+ ];
45
+ $.export("$summary", `Successfully retrieved and downloaded file content with ID ${this.fileId}`);
46
+ return filedata;
24
47
  },
25
48
  };
@@ -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.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  openai,
@@ -26,6 +26,7 @@ export default {
26
26
  },
27
27
  async run({ $ }) {
28
28
  const response = await this.openai.retrieveRun({
29
+ $,
29
30
  threadId: this.threadId,
30
31
  runId: this.runId,
31
32
  });
@@ -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.6",
7
+ version: "0.0.7",
8
8
  type: "action",
9
9
  props: {
10
10
  openai,
@@ -27,11 +27,18 @@ export default {
27
27
  propDefinition: [
28
28
  openai,
29
29
  "stepId",
30
+ ({
31
+ threadId, runId,
32
+ }) => ({
33
+ threadId,
34
+ runId,
35
+ }),
30
36
  ],
31
37
  },
32
38
  },
33
39
  async run({ $ }) {
34
40
  const response = await this.openai.retrieveRunStep({
41
+ $,
35
42
  threadId: this.threadId,
36
43
  runId: this.runId,
37
44
  stepId: this.stepId,
@@ -4,12 +4,17 @@ 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",
7
+ version: "0.1.8",
8
8
  key: "openai-send-prompt",
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 docs here](https://beta.openai.com/docs/api-reference/completions/create)",
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",
11
11
  props: {
12
12
  openai,
13
+ alert: {
14
+ type: "alert",
15
+ alertType: "warning",
16
+ content: "We recommend using the Pipedream **Chat** action instead of this one. It supports the latest `gpt-3.5-turbo` API, which is faster and 10x cheaper. This action, **Create Completion (Send Prompt)**, creates a completion for the provided prompt and parameters using the older `/completions` API.",
17
+ },
13
18
  modelId: {
14
19
  propDefinition: [
15
20
  openai,
@@ -38,7 +43,7 @@ export default {
38
43
  async run({ $ }) {
39
44
  const response = await this.openai.createCompletion({
40
45
  $,
41
- args: this._getCommonArgs(),
46
+ data: this._getCommonArgs(),
42
47
  });
43
48
 
44
49
  if (response) {
@@ -1,10 +1,11 @@
1
1
  import openai from "../../openai.app.mjs";
2
+ import { ConfigurationError } from "@pipedream/platform";
2
3
 
3
4
  export default {
4
5
  key: "openai-submit-tool-outputs-to-run",
5
6
  name: "Submit Tool Outputs to Run (Assistants)",
6
7
  description: "Submits tool outputs to a run that requires action. [See the documentation](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)",
7
- version: "0.0.6",
8
+ version: "0.0.7",
8
9
  type: "action",
9
10
  props: {
10
11
  openai,
@@ -31,11 +32,25 @@ export default {
31
32
  },
32
33
  },
33
34
  async run({ $ }) {
34
- const parsedToolOutputs = this.toolOutputs.map(JSON.parse);
35
+ const parsedToolOutputs = typeof this.toolOutputs === "string"
36
+ ? JSON.parse(this.toolOutputs)
37
+ : Array.isArray(this.toolOutputs)
38
+ ? this.toolOutputs.map((output) => typeof output === "string"
39
+ ? JSON.parse(output)
40
+ : output)
41
+ : null;
42
+
43
+ if (!parsedToolOutputs) {
44
+ throw new ConfigurationError("Could not parse tool outputs as JSON.");
45
+ }
46
+
35
47
  const response = await this.openai.submitToolOutputs({
48
+ $,
36
49
  threadId: this.threadId,
37
50
  runId: this.runId,
38
- toolOutputs: parsedToolOutputs,
51
+ data: {
52
+ tool_outputs: parsedToolOutputs,
53
+ },
39
54
  });
40
55
 
41
56
  $.export("$summary", `Successfully submitted tool outputs to run ${this.runId}`);
@@ -1,11 +1,12 @@
1
1
  import common from "../common/common-helper.mjs";
2
+ import constants from "../../common/constants.mjs";
2
3
 
3
4
  export default {
4
5
  ...common,
5
6
  name: "Summarize Text",
6
- version: "0.0.10",
7
+ version: "0.0.11",
7
8
  key: "openai-summarize",
8
- description: "Summarizes text using the Chat API",
9
+ description: "Summarizes text using the Chat API. [See the documentation](https://platform.openai.com/docs/api-reference/chat)",
9
10
  type: "action",
10
11
  props: {
11
12
  ...common.props,
@@ -19,12 +20,7 @@ export default {
19
20
  description: "The length of the summary",
20
21
  type: "string",
21
22
  optional: true,
22
- options: [
23
- "word",
24
- "sentence",
25
- "paragraph",
26
- "page",
27
- ],
23
+ options: constants.SUMMARIZE_LENGTH,
28
24
  },
29
25
  },
30
26
  methods: {
@@ -46,10 +42,15 @@ export default {
46
42
  if (!messages || !response) {
47
43
  throw new Error("Invalid API output, please reach out to https://pipedream.com/support");
48
44
  }
49
- return {
50
- summary: response.choices?.[0]?.message?.content,
45
+ const output = {
51
46
  messages,
52
47
  };
48
+ if (this.n > 1) {
49
+ output.summaries = response.choices?.map(({ message }) => message.content);
50
+ } else {
51
+ output.summary = response.choices?.[0]?.message?.content;
52
+ }
53
+ return output;
53
54
  },
54
55
  },
55
56
  };
@@ -9,9 +9,9 @@ const langOptions = lang.LANGUAGES.map((l) => ({
9
9
  export default {
10
10
  ...common,
11
11
  name: "Translate Text (Whisper)",
12
- version: "0.0.12",
12
+ version: "0.0.13",
13
13
  key: "openai-translate-text",
14
- description: "Translate text from one language to another using the Chat API",
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",
16
16
  props: {
17
17
  ...common.props,
@@ -50,13 +50,17 @@ export default {
50
50
  if (!messages || !response) {
51
51
  throw new Error("Invalid API output, please reach out to https://pipedream.com/support");
52
52
  }
53
-
54
- return {
55
- translation: response.choices?.[0]?.message?.content,
53
+ const output = {
56
54
  source_lang: this.sourceLang,
57
55
  target_lang: this.targetLang,
58
56
  messages,
59
57
  };
58
+ if (this.n > 1) {
59
+ output.translations = response.choices?.map(({ message }) => message.content);
60
+ } else {
61
+ output.translation = response.choices?.[0]?.message?.content;
62
+ }
63
+ return output;
60
64
  },
61
65
  },
62
66
  };
@@ -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",
9
+ version: "0.0.10",
10
10
  type: "action",
11
11
  props: {
12
12
  openai,
@@ -1,4 +1,4 @@
1
- export const FINE_TUNING_MODEL_OPTIONS = [
1
+ const FINE_TUNING_MODEL_OPTIONS = [
2
2
  {
3
3
  label: "gpt-3.5-turbo-1106 (recommended)",
4
4
  value: "gpt-3.5-turbo-1106",
@@ -16,8 +16,159 @@ export const FINE_TUNING_MODEL_OPTIONS = [
16
16
  value: "davinci-002",
17
17
  },
18
18
  {
19
- label:
20
- "gpt-4-0613 (experimental — eligible users will be presented with an option to request access in the fine-tuning UI)",
19
+ label: "gpt-4-0613 (experimental — eligible users will be presented with an option to request access in the fine-tuning UI)",
21
20
  value: "gpt-4-0613",
22
21
  },
23
22
  ];
23
+
24
+ const TTS_MODELS = [
25
+ "tts-1",
26
+ "tts-1-hd",
27
+ ];
28
+
29
+ const IMAGE_MODELS = [
30
+ "dall-e-2",
31
+ "dall-e-3",
32
+ ];
33
+
34
+ const MODERATION_MODELS = [
35
+ "text-moderation-stable",
36
+ "text-moderation-latest",
37
+ ];
38
+
39
+ const AUDIO_RESPONSE_FORMATS = [
40
+ "mp3",
41
+ "opus",
42
+ "aac",
43
+ "flac",
44
+ "wav",
45
+ "pcm",
46
+ ];
47
+
48
+ const CHAT_RESPONSE_FORMATS = [
49
+ "text",
50
+ "json_object",
51
+ ];
52
+
53
+ const IMAGE_RESPONSE_FORMATS = [
54
+ {
55
+ label: "URL",
56
+ value: "url",
57
+ },
58
+ {
59
+ label: "Base64 JSON",
60
+ value: "b64_json",
61
+ },
62
+ ];
63
+
64
+ const USER_OPTIONS = [
65
+ {
66
+ label: "User",
67
+ value: "user",
68
+ },
69
+ ];
70
+
71
+ const ORDER_OPTIONS = [
72
+ {
73
+ label: "Ascending",
74
+ value: "asc",
75
+ },
76
+ {
77
+ label: "Descending",
78
+ value: "desc",
79
+ },
80
+ ];
81
+
82
+ const TRANSCRIPTION_FORMATS = [
83
+ "json",
84
+ "text",
85
+ "srt",
86
+ "verbose_json",
87
+ "vtt",
88
+ ];
89
+
90
+ const PURPOSES = [
91
+ "fine-tune",
92
+ "assistants",
93
+ "vision",
94
+ "batch",
95
+ ];
96
+
97
+ const VOICES = [
98
+ "alloy",
99
+ "echo",
100
+ "fable",
101
+ "onyx",
102
+ "nova",
103
+ "shimmer",
104
+ ];
105
+
106
+ const IMAGE_QUALITIES = [
107
+ {
108
+ label: "Standard",
109
+ value: "standard",
110
+ },
111
+ {
112
+ label: "HD",
113
+ value: "hd",
114
+ },
115
+ ];
116
+
117
+ const IMAGE_STYLES = [
118
+ {
119
+ label: "Natural",
120
+ value: "natural",
121
+ },
122
+ {
123
+ label: "Vivid",
124
+ value: "vivid",
125
+ },
126
+ ];
127
+
128
+ const IMAGE_SIZES = [
129
+ "256x256",
130
+ "512x512",
131
+ "1024x1024",
132
+ "1792x1024",
133
+ "1024x1792",
134
+ ];
135
+
136
+ const SUMMARIZE_LENGTH = [
137
+ "word",
138
+ "sentence",
139
+ "paragraph",
140
+ "page",
141
+ ];
142
+
143
+ const TOOL_TYPES = [
144
+ "code_interpreter",
145
+ "file_search",
146
+ "function",
147
+ ];
148
+
149
+ const BATCH_ENDPOINTS = [
150
+ "/v1/chat/completions",
151
+ "/v1/embeddings",
152
+ "/v1/completions",
153
+ ];
154
+
155
+ export default {
156
+ FINE_TUNING_MODEL_OPTIONS,
157
+ TTS_MODELS,
158
+ IMAGE_MODELS,
159
+ MODERATION_MODELS,
160
+ AUDIO_RESPONSE_FORMATS,
161
+ CHAT_RESPONSE_FORMATS,
162
+ IMAGE_RESPONSE_FORMATS,
163
+ USER_OPTIONS,
164
+ ORDER_OPTIONS,
165
+ TRANSCRIPTION_FORMATS,
166
+ PURPOSES,
167
+ VOICES,
168
+ IMAGE_QUALITIES,
169
+ IMAGE_STYLES,
170
+ IMAGE_SIZES,
171
+ SUMMARIZE_LENGTH,
172
+ TOOL_TYPES,
173
+ BATCH_ENDPOINTS,
174
+ };