Skip to content

Commit a58e7e0

Browse files
authored
New Components - meetstream_ai (#16590)
* meetstream_ai init * Meetstream AI #16452 Actions - Create Bot - Get Bot Status - Get Audio - Get Transcription - Remove Bot * pnpm update * some adjusts
1 parent 0c5ad79 commit a58e7e0

File tree

8 files changed

+259
-8
lines changed

8 files changed

+259
-8
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import meetstreamAi from "../../meetstream_ai.app.mjs";
2+
3+
export default {
4+
key: "meetstream_ai-create-bot",
5+
name: "Create Bot",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
meetstreamAi,
11+
meetingLink: {
12+
type: "string",
13+
label: "Meeting Link",
14+
description: "The link to the meeting where the bot should join",
15+
},
16+
botName: {
17+
type: "string",
18+
label: "Bot Name",
19+
description: "The name of the bot",
20+
optional: true,
21+
},
22+
audioRequired: {
23+
type: "boolean",
24+
label: "Audio Required",
25+
description: "Whether audio is required",
26+
optional: true,
27+
},
28+
videoRequired: {
29+
type: "boolean",
30+
label: "Video Required",
31+
description: "Whether video is required",
32+
optional: true,
33+
},
34+
liveAudioRequired: {
35+
type: "string",
36+
label: "Live Audio Websocket URL",
37+
description: "Specify websocket_url for live audio streaming",
38+
optional: true,
39+
},
40+
liveTranscriptionRequired: {
41+
type: "string",
42+
label: "Live Transcription Webhook URL",
43+
description: "Specify webhook_url for live transcription",
44+
optional: true,
45+
},
46+
deepgramApiKey: {
47+
type: "string",
48+
label: "Deepgram API Key",
49+
description: "This key is required if you use a **Google Meet** link and **Live Transcription Webhook URL** is specified",
50+
optional: true,
51+
},
52+
},
53+
async run({ $ }) {
54+
const response = await this.meetstreamAi.createBotInstance({
55+
$,
56+
data: {
57+
meeting_link: this.meetingLink,
58+
bot_name: this.botName,
59+
audio_required: this.audioRequired,
60+
video_required: this.videoRequired,
61+
live_audio_required: {
62+
websocket_url: this.liveAudioRequired,
63+
},
64+
live_transcription_required: {
65+
deepgram_api_key: this.deepgramApiKey,
66+
webhook_url: this.liveTranscriptionRequired,
67+
},
68+
},
69+
});
70+
71+
$.export("$summary", `Successfully created bot instance for meeting link ${this.meetingLink}`);
72+
return response;
73+
},
74+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import meetstreamAi from "../../meetstream_ai.app.mjs";
2+
3+
export default {
4+
key: "meetstream_ai-get-audio",
5+
name: "Get Recorded Audio",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
meetstreamAi,
11+
botId: {
12+
propDefinition: [
13+
meetstreamAi,
14+
"botId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.meetstreamAi.getRecordedAudio({
20+
$,
21+
botId: this.botId,
22+
});
23+
24+
$.export("$summary", `Successfully retrieved recorded audio for bot ID ${this.botId}`);
25+
return response;
26+
},
27+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import meetstreamAi from "../../meetstream_ai.app.mjs";
2+
3+
export default {
4+
key: "meetstream_ai-get-bot-status",
5+
name: "Get Bot Status",
6+
description: "Retrieves the current status of a specific bot. [See the documentation](https://vento.so/view/35d0142d-f91f-47f6-8175-d42e1953d6f1?utm_medium=share)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
meetstreamAi,
11+
botId: {
12+
propDefinition: [
13+
meetstreamAi,
14+
"botId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.meetstreamAi.getBotStatus({
20+
$,
21+
botId: this.botId,
22+
});
23+
$.export("$summary", `Successfully retrieved status for Bot ID ${this.botId}`);
24+
return response;
25+
},
26+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import meetstreamAi from "../../meetstream_ai.app.mjs";
2+
3+
export default {
4+
key: "meetstream_ai-get-transcription",
5+
name: "Get Transcription",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
meetstreamAi,
11+
botId: {
12+
propDefinition: [
13+
meetstreamAi,
14+
"botId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
try {
20+
const response = await this.meetstreamAi.getTranscript({
21+
$,
22+
botId: this.botId,
23+
});
24+
$.export("$summary", `Successfully retrieved transcription for bot ID: ${this.botId}`);
25+
return response;
26+
} catch ({ response }) {
27+
throw new Error(response.data);
28+
}
29+
},
30+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import meetstreamAi from "../../meetstream_ai.app.mjs";
2+
3+
export default {
4+
key: "meetstream_ai-remove-bot",
5+
name: "Remove Bot",
6+
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)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
meetstreamAi,
11+
botId: {
12+
propDefinition: [
13+
meetstreamAi,
14+
"botId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.meetstreamAi.removeBotInstance({
20+
$,
21+
botId: this.botId,
22+
});
23+
24+
$.export("$summary", `Successfully removed bot with ID ${this.botId}`);
25+
return response;
26+
},
27+
};
Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,71 @@
1+
import { axios } from "@pipedream/platform";
2+
13
export default {
24
type: "app",
35
app: "meetstream_ai",
4-
propDefinitions: {},
6+
propDefinitions: {
7+
botId: {
8+
type: "string",
9+
label: "Bot ID",
10+
description: "The ID of the bot",
11+
},
12+
},
513
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
14+
_baseUrl() {
15+
return "https://api-meetstream-tst-hack.meetstream.ai/api/v1/bots";
16+
},
17+
_headers() {
18+
return {
19+
"Authorization": `Token ${this.$auth.api_key}`,
20+
};
21+
},
22+
_makeRequest({
23+
$ = this, path = "", ...opts
24+
}) {
25+
return axios($, {
26+
url: this._baseUrl() + path,
27+
headers: this._headers(),
28+
...opts,
29+
});
30+
},
31+
createBotInstance(opts = {}) {
32+
return this._makeRequest({
33+
method: "POST",
34+
path: "/create_bot",
35+
...opts,
36+
});
37+
},
38+
getBotStatus({
39+
botId, ...opts
40+
}) {
41+
return this._makeRequest({
42+
path: `/${botId}/status`,
43+
...opts,
44+
});
45+
},
46+
getRecordedAudio({
47+
botId, ...opts
48+
}) {
49+
return this._makeRequest({
50+
path: `/${botId}/get_audio`,
51+
...opts,
52+
});
53+
},
54+
getTranscript({
55+
botId, ...opts
56+
}) {
57+
return this._makeRequest({
58+
path: `/${botId}/get_transcript`,
59+
...opts,
60+
});
61+
},
62+
removeBotInstance({
63+
botId, ...opts
64+
}) {
65+
return this._makeRequest({
66+
path: `/${botId}/remove_bot`,
67+
...opts,
68+
});
969
},
1070
},
11-
};
71+
};

components/meetstream_ai/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/meetstream_ai",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Meetstream AI Components",
55
"main": "meetstream_ai.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.0.3"
1417
}
15-
}
18+
}

pnpm-lock.yaml

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)