-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - meetstream_ai #16590
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
components/meetstream_ai/actions/create-bot/create-bot.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| import meetstreamAi from "../../meetstream_ai.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "meetstream_ai-create-bot", | ||
| name: "Create Bot", | ||
| description: "Creates a new bot instance to join a meeting. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| meetstreamAi, | ||
| meetingLink: { | ||
| type: "string", | ||
| label: "Meeting Link", | ||
| description: "The link to the meeting where the bot should join", | ||
| }, | ||
| botName: { | ||
| type: "string", | ||
| label: "Bot Name", | ||
| description: "The name of the bot", | ||
| optional: true, | ||
| }, | ||
| audioRequired: { | ||
| type: "boolean", | ||
| label: "Audio Required", | ||
| description: "Whether audio is required", | ||
| optional: true, | ||
| }, | ||
| videoRequired: { | ||
| type: "boolean", | ||
| label: "Video Required", | ||
| description: "Whether video is required", | ||
| optional: true, | ||
| }, | ||
| liveAudioRequired: { | ||
| type: "object", | ||
| label: "Live Audio Websocket URL", | ||
| description: "Specify websocket_url for live audio streaming", | ||
| optional: true, | ||
| }, | ||
| liveTranscriptionRequired: { | ||
| type: "object", | ||
| label: "Live Transcription Webhook URL", | ||
| description: "Specify webhook_url for live transcription", | ||
| optional: true, | ||
| }, | ||
| deepgramApiKey: { | ||
| type: "string", | ||
| label: "Deepgram API Key", | ||
| description: "This key is required if you user **Google Meet** link and **Live Transcription Webhook URL** is specified", | ||
luancazarine marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.meetstreamAi.createBotInstance({ | ||
| $, | ||
| data: { | ||
| meeting_link: this.meetingLink, | ||
| bot_name: this.botName, | ||
| audio_required: this.audioRequired, | ||
| video_required: this.videoRequired, | ||
| live_audio_required: { | ||
| websocket_url: this.liveAudioRequired, | ||
| }, | ||
| live_transcription_required: { | ||
| deepgram_api_key: this.deepgramApiKey, | ||
| webhook_url: this.liveTranscriptionRequired, | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully created bot instance for meeting link ${this.meetingLink}`); | ||
| return response; | ||
| }, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import meetstreamAi from "../../meetstream_ai.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "meetstream_ai-get-audio", | ||
| name: "Get Recorded Audio", | ||
| description: "Retrieves the recorded audio file for a specific bot, if available. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| meetstreamAi, | ||
| botId: { | ||
| propDefinition: [ | ||
| meetstreamAi, | ||
| "botId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.meetstreamAi.getRecordedAudio({ | ||
| $, | ||
| botId: this.botId, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully retrieved recorded audio for bot ID ${this.botId}`); | ||
| return response; | ||
| }, | ||
| }; | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
26 changes: 26 additions & 0 deletions
26
components/meetstream_ai/actions/get-bot-status/get-bot-status.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import meetstreamAi from "../../meetstream_ai.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "meetstream_ai-get-bot-status", | ||
| name: "Get Bot Status", | ||
| description: "Retrieves the current status of a specific bot. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| meetstreamAi, | ||
| botId: { | ||
| propDefinition: [ | ||
| meetstreamAi, | ||
| "botId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.meetstreamAi.getBotStatus({ | ||
| $, | ||
| botId: this.botId, | ||
| }); | ||
| $.export("$summary", `Successfully retrieved status for Bot ID ${this.botId}`); | ||
| return response; | ||
| }, | ||
| }; |
30 changes: 30 additions & 0 deletions
30
components/meetstream_ai/actions/get-transcription/get-transcription.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import meetstreamAi from "../../meetstream_ai.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "meetstream_ai-get-transcription", | ||
| name: "Get Transcription", | ||
| description: "Retrieves the transcript file for a specific bot, if available. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| meetstreamAi, | ||
| botId: { | ||
| propDefinition: [ | ||
| meetstreamAi, | ||
| "botId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| try { | ||
| const response = await this.meetstreamAi.getTranscript({ | ||
| $, | ||
| botId: this.botId, | ||
| }); | ||
| $.export("$summary", `Successfully retrieved transcription for bot ID: ${this.botId}`); | ||
| return response; | ||
| } catch ({ response }) { | ||
| throw new Error(response.data); | ||
| } | ||
| }, | ||
| }; |
27 changes: 27 additions & 0 deletions
27
components/meetstream_ai/actions/remove-bot/remove-bot.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import meetstreamAi from "../../meetstream_ai.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "meetstream_ai-remove-bot", | ||
| name: "Remove Bot", | ||
| description: "Removes a bot from its meeting and deletes its associated data. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| meetstreamAi, | ||
| botId: { | ||
| propDefinition: [ | ||
| meetstreamAi, | ||
| "botId", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.meetstreamAi.removeBotInstance({ | ||
| $, | ||
| botId: this.botId, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully removed bot with ID ${this.botId}`); | ||
| return response; | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,71 @@ | ||
| import { axios } from "@pipedream/platform"; | ||
|
|
||
| export default { | ||
| type: "app", | ||
| app: "meetstream_ai", | ||
| propDefinitions: {}, | ||
| propDefinitions: { | ||
| botId: { | ||
| type: "string", | ||
| label: "Bot ID", | ||
| description: "The ID of the bot", | ||
| }, | ||
| }, | ||
| methods: { | ||
| // this.$auth contains connected account data | ||
| authKeys() { | ||
| console.log(Object.keys(this.$auth)); | ||
| _baseUrl() { | ||
| return "https://api-meetstream-tst-hack.meetstream.ai/api/v1/bots"; | ||
| }, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| _headers() { | ||
| return { | ||
| "Authorization": `Token ${this.$auth.api_key}`, | ||
| }; | ||
| }, | ||
| _makeRequest({ | ||
| $ = this, path = "", ...opts | ||
| }) { | ||
| return axios($, { | ||
| url: this._baseUrl() + path, | ||
| headers: this._headers(), | ||
| ...opts, | ||
| }); | ||
| }, | ||
| createBotInstance(opts = {}) { | ||
| return this._makeRequest({ | ||
| method: "POST", | ||
| path: "/create_bot", | ||
| ...opts, | ||
| }); | ||
| }, | ||
| getBotStatus({ | ||
| botId, ...opts | ||
| }) { | ||
| return this._makeRequest({ | ||
| path: `/${botId}/status`, | ||
| ...opts, | ||
| }); | ||
| }, | ||
| getRecordedAudio({ | ||
| botId, ...opts | ||
| }) { | ||
| return this._makeRequest({ | ||
| path: `/${botId}/get_audio`, | ||
| ...opts, | ||
| }); | ||
| }, | ||
| getTranscript({ | ||
| botId, ...opts | ||
| }) { | ||
| return this._makeRequest({ | ||
| path: `/${botId}/get_transcript`, | ||
| ...opts, | ||
| }); | ||
| }, | ||
| removeBotInstance({ | ||
| botId, ...opts | ||
| }) { | ||
| return this._makeRequest({ | ||
| path: `/${botId}/remove_bot`, | ||
| ...opts, | ||
| }); | ||
| }, | ||
| }, | ||
| }; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "@pipedream/meetstream_ai", | ||
| "version": "0.0.1", | ||
| "version": "0.1.0", | ||
| "description": "Pipedream Meetstream AI Components", | ||
| "main": "meetstream_ai.app.mjs", | ||
| "keywords": [ | ||
|
|
@@ -11,5 +11,8 @@ | |
| "author": "Pipedream <[email protected]> (https://pipedream.com/)", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "@pipedream/platform": "^3.0.3" | ||
| } | ||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.