-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Assembly AI - Improve actions & sources #17882
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 ↗︎ 3 Skipped Deployments
|
WalkthroughThe updates include a new "Transcribe Audio" action for AssemblyAI, a refactor of the "Get Transcription" action to only retrieve existing transcripts, and improvements to the "New Transcription Completed" source to emit enriched event data. Documentation URLs and version numbers were also updated across several components. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TranscribeAudioAction
participant AssemblyAI
participant PipedreamCallback
User->>TranscribeAudioAction: Provide media URL & options
TranscribeAudioAction->>AssemblyAI: Create transcript (POST)
AssemblyAI-->>TranscribeAudioAction: Respond with transcript ID
alt Callback rerun enabled
AssemblyAI->>PipedreamCallback: Webhook callback on completion
PipedreamCallback->>TranscribeAudioAction: Callback with transcript ID
TranscribeAudioAction->>AssemblyAI: Get transcript (GET)
AssemblyAI-->>TranscribeAudioAction: Transcript result
end
TranscribeAudioAction-->>User: Return transcript data
sequenceDiagram
participant User
participant GetTranscriptionAction
participant AssemblyAI
User->>GetTranscriptionAction: Provide transcript ID
GetTranscriptionAction->>AssemblyAI: Get transcript (GET)
AssemblyAI-->>GetTranscriptionAction: Transcript result
GetTranscriptionAction-->>User: Return transcript data
sequenceDiagram
participant Source
participant AssemblyAI
participant Pipedream
Source->>AssemblyAI: List completed transcripts
AssemblyAI-->>Source: List of transcript IDs
loop For each transcript
Source->>AssemblyAI: Get transcript details (GET)
AssemblyAI-->>Source: Transcript data
Source->>Pipedream: Emit event with transcript data
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Assessment against linked issues
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches
🧪 Generate unit tests
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 (
|
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: 0
🧹 Nitpick comments (1)
components/assemblyai/actions/transcribe-audio/transcribe-audio.mjs (1)
55-55
: Fix documentation link in description.There's a malformed markdown link in the callback rerun description.
- description: "Use the `$.flow.rerun` Node.js helper to rerun the step when the transcription is completed. Overrides the `webhookUrl` prop. This will increase execution time and credit usage as a result. [See the documentation(https://pipedream.com/docs/code/nodejs/rerun/#flow-rerun). Not available in Pipedream Connect.", + description: "Use the `$.flow.rerun` Node.js helper to rerun the step when the transcription is completed. Overrides the `webhookUrl` prop. This will increase execution time and credit usage as a result. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun/#flow-rerun). Not available in Pipedream Connect.",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
components/assemblyai/actions/create-captions/create-captions.mjs
(1 hunks)components/assemblyai/actions/get-transcription/get-transcription.mjs
(1 hunks)components/assemblyai/actions/transcribe-audio/transcribe-audio.mjs
(1 hunks)components/assemblyai/package.json
(1 hunks)components/assemblyai/sources/new-transcription-completed/new-transcription-completed.mjs
(4 hunks)
🧰 Additional context used
🧠 Learnings (5)
components/assemblyai/package.json (1)
Learnt from: jcortes
PR: #14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like fs
to package.json
dependencies, as they are native modules provided by the Node.js runtime.
components/assemblyai/actions/create-captions/create-captions.mjs (1)
Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs
, the action name should be "Create Account" instead of "Create Memory".
components/assemblyai/actions/get-transcription/get-transcription.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/assemblyai/actions/transcribe-audio/transcribe-audio.mjs (2)
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
Learnt from: GTFalcao
PR: #12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the run
method of an action, ensure the message is correctly formatted. For example, in the hackerone-get-members
action, the correct format is Successfully retrieved ${response.data.length} members
.
components/assemblyai/sources/new-transcription-completed/new-transcription-completed.mjs (2)
Learnt from: GTFalcao
PR: #14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In components/the_magic_drip/sources/common.mjs
, when processing items in getAndProcessData
, savedIds
is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Learnt from: GTFalcao
PR: #15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
🧬 Code Graph Analysis (1)
components/assemblyai/actions/transcribe-audio/transcribe-audio.mjs (2)
components/assemblyai/actions/get-transcription/get-transcription.mjs (1)
response
(19-22)components/assemblyai/actions/create-captions/create-captions.mjs (1)
response
(25-29)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Publish TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (18)
components/assemblyai/package.json (1)
3-3
: LGTM! Version bump is appropriate.The minor version bump from
0.2.2
to0.3.0
correctly reflects the addition of new features (new "Transcribe Audio" action) and the refactoring of existing actions, which may introduce breaking changes for existing users.components/assemblyai/actions/create-captions/create-captions.mjs (2)
5-5
: LGTM! Documentation URL corrected.The documentation link has been updated to point to the current AssemblyAI API reference for subtitles, improving accuracy for developers using this action.
7-7
: LGTM! Version bump is appropriate.The patch version increment from
0.0.2
to0.0.3
is suitable for this documentation URL correction.components/assemblyai/sources/new-transcription-completed/new-transcription-completed.mjs (5)
6-6
: LGTM! Documentation URL updated appropriately.The documentation link has been updated to point to the current AssemblyAI API reference for listing transcripts.
8-8
: LGTM! Version bump reflects functional enhancement.The minor version bump from
0.0.2
to0.1.0
appropriately reflects the significant functional improvement of enriching event data with detailed transcript information.
33-33
: LGTM! Enhanced event emission in deploy hook.The deploy hook now uses the new
emitTranscripts
method to emit enriched events with detailed transcript data instead of basic metadata.
47-54
: LGTM! Well-implemented enriched event emission.The new
emitTranscripts
method effectively addresses PR objective #3 by fetching detailed transcript data before emission. The implementation correctly:
- Processes transcripts in reverse order to maintain chronological emission
- Fetches complete transcript data using
getTranscript
- Maintains the existing event emission pattern
This provides users with enriched event data including the actual transcription text.
77-77
: LGTM! Consistent use of enhanced emission method.The run method correctly uses the new
emitTranscripts
method to ensure consistent enriched event data in both initial deployment and ongoing execution.components/assemblyai/actions/transcribe-audio/transcribe-audio.mjs (5)
4-5
: LGTM! Action name and description align with PR objectives.The action name "Transcribe Audio" and description correctly indicate that this action creates transcripts from media files, addressing PR objective #1 about correcting inaccurate action descriptions.
11-57
: LGTM! Comprehensive prop definitions for AssemblyAI features.The props cover all major AssemblyAI transcription features including:
- Media URL (required)
- Language detection and punctuation
- Speaker diarization and content safety
- Sentiment analysis and webhook notifications
- Callback rerun functionality for Pipedream workflows
The prop definitions follow Pipedream conventions with proper types, labels, and descriptions.
59-84
: LGTM! Proper implementation of transcription creation logic.The initial run logic correctly:
- Detects first execution using run context
- Handles webhook URL override when callback rerun is enabled
- Sets up $.flow.rerun with appropriate timeout (10 minutes)
- Calls createTranscript with all configured parameters
- Passes execution context for proper logging
85-89
: LGTM! Proper callback handling implementation.The callback logic correctly:
- Detects callback requests using run.callback_request
- Extracts transcript_id from the webhook payload
- Fetches the completed transcript using getTranscript
91-95
: LGTM! Appropriate response handling and summary export.The response handling correctly exports a summary message with the transcript ID when available and returns the full API response, following Pipedream conventions.
components/assemblyai/actions/get-transcription/get-transcription.mjs (5)
5-5
: LGTM! Description accurately reflects refactored functionality.The description correctly indicates this action now fetches existing transcripts rather than creating them, addressing PR objective #2 about adding a proper "Get transcription" action.
7-7
: LGTM! Version bump reflects breaking change.The minor version bump from
0.0.4
to0.1.0
appropriately indicates this is a breaking change, as the action no longer handles transcription creation.
11-16
: LGTM! Simplified props for retrieval-only functionality.The props have been correctly reduced to only require
transcriptId
, which is appropriate for a retrieval-only action. This simplification improves the action's focus and usability.
19-22
: LGTM! Simplified run method implementation.The run method is now properly focused on retrieval only, directly calling
getTranscript
with the provided transcript ID. This aligns with the separation of concerns established by the new "Transcribe Audio" action.
24-24
: LGTM! Summary message reflects retrieval operation.The summary export correctly indicates retrieval rather than creation, maintaining consistency with the refactored functionality.
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 @michelle0927 lgtm! Ready for QA!
Resolves #17859
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Chores