Skip to content

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

Closed
wants to merge 3 commits into from

Conversation

jeevikasirwani
Copy link

@jeevikasirwani jeevikasirwani commented Jun 10, 2025

Resolves #17031

WHY

Summary by CodeRabbit

  • New Features
    • Introduced a manual workflow to retrieve and export recent commit data as downloadable artifacts.
    • Added a new action enabling chat interactions with the OpenAI Responses API, supporting model selection, multi-turn conversations, tool integration, and custom response formats (including JSON schema).

Copy link

vercel bot commented Jun 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
pipedream-docs ⬜️ Ignored (Inspect) Jun 10, 2025 11:58am
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jun 10, 2025 11:58am

Copy link

vercel bot commented Jun 10, 2025

@jeevikasirwani is attempting to deploy a commit to the Pipedreamers Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

Walkthrough

A 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

File(s) Change Summary
.github/workflows/retrieve-commits.yml Added a workflow to fetch the latest 30 commits and details of the current commit, saving them as artifacts.
components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs Introduced a new action for chat with OpenAI Responses API, supporting multi-turn, tool integration, and JSON schema output.

Sequence Diagram(s)

Loading
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
Loading
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

In the warren of code, new features appear,
Commits retrieved, their stories clear.
A chat with AI, tools at its side,
JSON or text, you get to decide!
With each new hop, the future looks bright—
🐇✨ Code and conversation, both taking flight!

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/openai/actions/chat-with-opeai-responses-api/chat-with-openai-responses-api.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Jun 10, 2025
@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

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:

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 issues

The 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 fields

Consider 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

📥 Commits

Reviewing files that changed from the base of the PR and between 89dd558 and 5f8ac84.

⛔ 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 issue

Fix 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.

@michelle0927 michelle0927 linked an issue Jun 18, 2025 that may be closed by this pull request
Copy link
Collaborator

@jcortes jcortes left a 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!

Comment on lines +106 to +126
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;
},
Copy link
Collaborator

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";

Copy link
Collaborator

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

Copy link
Collaborator

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?

@jcortes
Copy link
Collaborator

jcortes commented Jun 30, 2025

Hi @jeevikasirwani just wondering if you are still working on this? Thanks in advance!

@jcortes jcortes changed the title Fixes #17048: GitHub actions for retrieving commits Resolves #17031: [ACTION] OpenAI Responses API Jul 4, 2025
@jcortes jcortes linked an issue Jul 4, 2025 that may be closed by this pull request
@jcortes jcortes self-requested a review July 4, 2025 20:50
@jcortes jcortes closed this Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User submitted Submitted by a user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants