-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Resolves #17031: [ACTION] OpenAI Responses API #17052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
@jeevikasirwani is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughA new GitHub Actions workflow for retrieving commit data and a new OpenAI chat action module have been introduced. The workflow fetches and uploads commit information as artifacts, while the module enables multi-turn chat interactions with OpenAI's Responses API, supporting built-in and external tools, customizable response formats, and dynamic schema integration. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub Actions
participant Repo
participant Artifact Store
User->>GitHub Actions: Trigger "Retrieve Commits" workflow
GitHub Actions->>Repo: Checkout repository
GitHub Actions->>Repo: Fetch latest 30 commits (API)
GitHub Actions->>Repo: Fetch current commit details (API)
GitHub Actions->>Artifact Store: Upload commits.json and commit.json as artifacts
sequenceDiagram
participant User
participant ChatAction
participant OpenAI API
participant MCP Server (optional)
User->>ChatAction: Provide input, options, and tools
ChatAction->>MCP Server: (If MCP tools enabled) Fetch available tools
ChatAction->>OpenAI API: Send chat request with model, input, tools, and optional JSON schema
OpenAI API-->>ChatAction: Return chat response and response ID
ChatAction->>User: Export output and summary
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🧹 Nitpick comments (2)
.github/workflows/retrieve-commits.yml (1)
1-39
: Fix YAML formatting issuesThe workflow has several formatting issues that should be addressed for consistency.
Remove trailing spaces from lines 3, 11, 15, 32, and 39, and add a newline at the end of the file. Most editors can be configured to automatically trim trailing whitespace and ensure files end with a newline.
🧰 Tools
🪛 actionlint (1.7.7)
13-13: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
34-34: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.37.1)
[error] 11-11: trailing spaces
(trailing-spaces)
[error] 15-15: trailing spaces
(trailing-spaces)
[error] 32-32: trailing spaces
(trailing-spaces)
[error] 39-39: no new line character at the end of file
(new-line-at-end-of-file)
[error] 39-39: trailing spaces
(trailing-spaces)
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs (1)
147-195
: Add input validation for required fieldsConsider adding validation for required inputs to provide better error messages to users.
async run({ $ }) { if (this.skipThisStep) { $.export("$summary", "Step execution skipped"); return; } + + // Validate required inputs + if (!this.input?.trim()) { + throw new Error("Chat input is required and cannot be empty"); + } + + if (this.responseFormat === constants.CHAT_RESPONSE_FORMAT.JSON_SCHEMA.value && !this.jsonSchema) { + throw new Error("JSON Schema is required when response format is set to json_schema"); + } + const tools = [];
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (6)
components/quickbooks/package-lock.json
is excluded by!**/package-lock.json
components/smiirl/package-lock.json
is excluded by!**/package-lock.json
docs-v2/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
helpers/package-lock.json
is excluded by!**/package-lock.json
packages/connect-react/examples/nextjs/package-lock.json
is excluded by!**/package-lock.json
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
.github/workflows/retrieve-commits.yml
(1 hunks)components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/retrieve-commits.yml
13-13: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
34-34: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.37.1)
.github/workflows/retrieve-commits.yml
[error] 11-11: trailing spaces
(trailing-spaces)
[error] 15-15: trailing spaces
(trailing-spaces)
[error] 32-32: trailing spaces
(trailing-spaces)
[error] 39-39: no new line character at the end of file
(new-line-at-end-of-file)
[error] 39-39: trailing spaces
(trailing-spaces)
🔇 Additional comments (1)
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs (1)
100-105
:⚠️ Potential issueFix quote escaping in description
The description string contains unescaped quotes that could cause parsing issues.
mcpServers: { type: "string[]", label: "MCP Server URLs", description: - "Enter your MCP server base URLs. To set one up, visit https://mcp.pipedream.com/ and click "Create new server.", + "Enter your MCP server base URLs. To set one up, visit https://mcp.pipedream.com/ and click \"Create new server.\"", optional: true, },Likely an incorrect or invalid review comment.
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs
Show resolved
Hide resolved
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs
Show resolved
Hide resolved
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jeevikasirwani I've just left a few comments/suggestions so please review them, thanks for this great contribution!
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs
Show resolved
Hide resolved
mcpTools: { | ||
type: "string[]", | ||
label: "MCP Tools to Enable", | ||
description: | ||
"Select which tools from your MCP servers to include in the chat.", | ||
optional: true, | ||
async options({ mcpServers }) { | ||
if (!mcpServers?.length) return []; | ||
const all = []; | ||
for (let url of mcpServers) { | ||
url = url.replace(/\/$/, ""); | ||
const { data } = await axios.get(`${url}/tools`); | ||
for (const t of data.tools) { | ||
all.push({ | ||
label: t.name, | ||
value: t.id, | ||
}); | ||
} | ||
} | ||
return all; | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please create a propDefinition for this one in openai.app.mjs
file and reference here, so you can use the axios lib from @pipedream/plaform
instead?
import { axios } from "@pipedream/platform";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is the solution to this issue #17031
Please increase the minor version in its package.json
file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these modifications in *-lock.json
files necessary for this PR?
Hi @jeevikasirwani just wondering if you are still working on this? Thanks in advance! |
Resolves #17031
WHY
Summary by CodeRabbit