Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions components/symbl_ai/actions/get-summary/get-summary.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import symblAIApp from "../../symbl_ai.app.mjs";

export default {
key: "symbl_ai-get-summary",
name: "Get Summary",
description: "Get a summary of important contextual messages in a conversation. See the doc [here](https://docs.symbl.ai/docs/conversation-api/summary)",
version: "0.0.1",
type: "action",
props: {
symblAIApp,
conversationId: {
propDefinition: [
symblAIApp,
"conversationId",
],
},
refresh: {
type: "boolean",
label: "Refresh",
description: "Allows you to regenerate the Summary (Async APIs), create summary (Telephony and Streaming APIs) and generate the Summary for already processed conversations.",
optional: true,
default: false,
},
},
async run({ $ }) {
try {
const { summary } = await this.symblAIApp.getSummary({
$,
conversationId: this.conversationId,
params: {
refresh: this.refresh,
},
});
$.export("$summary", `Successfully generated ${summary.length} Summary message${summary.length === 1
? ""
: "s"} from the conversation`);
return summary;
} catch (error) {
console.log("Error: ", error);
$.export("$summary", "Failed to generate the Summary of the conversation");
}
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import symblAIApp from "../../symbl_ai.app.mjs";

export default {
key: "symbl_ai-post-video-summary-ui",
name: "Submit Video Summary User Interface",
description: "The Video Summary UI provides users the ability to interact with the Symbl elements (Transcripts, Questions, Follow-Ups, Action Items, etc.) from a video conversation. See the doc [here](https://docs.symbl.ai/docs/api-reference/experience-api/post-video-summary-ui)",
version: "0.0.1",
type: "action",
props: {
symblAIApp,
conversationId: {
propDefinition: [
symblAIApp,
"conversationId",
],
},
videoUrl: {
type: "string",
label: "Video URL",
description: "URL of the video file for which you want to generate the video summary UI.",
},
logo: {
type: "string",
label: "Logo",
description: "URL of the custom logo to be used in the Video Summary UI.",
optional: true,
},
favicon: {
type: "string",
label: "Favicon",
description: "URL of the custom favicon to be used in the Video Summary UI.",
optional: true,
},
background: {
type: "string",
label: "Background Color",
description: "Background color to be used in the Video Summary UI. Hex Color Codes accepted.",
optional: true,
},
topicsFilter: {
type: "string",
label: "Topics Filter Element Color",
description: "Topics Filter Element color to be used in the Video Summary UI. Hex Color Codes accepted.",
optional: true,
},
insightsFilter: {
type: "string",
label: "Insights Element Color",
description: "Insights (Questions, Follow-ups, Action Items, etc) Filter Element color to be used in the Video Summary UI. Hex Color Codes accepted.",
optional: true,
},
font: {
type: "string",
label: "Font",
description: "The name of the font to be used in the Video Summary UI. All fonts available in the [Google Fonts](https://fonts.google.com/) are supported.",
optional: true,
},
summaryURLExpiresIn: {
type: "string",
label: "Expiration Time of the Video Summary UI",
description: "Number of seconds set for expiration time of the Video Summary UI. Zero (0) will set the Video Summary UI to never expire. Default value is set to `2592000` (30 days).",
optional: true,
},
readOnly: {
type: "boolean",
label: "Read Only",
description: "Disable the editing capabilities of the Video Summary UI. Default value is `false`.",
optional: true,
},
enableCustomDomain: {
type: "boolean",
label: "Enable Custom Domain",
description: "Enable generation of personalized URLs for the Video Summary UI.",
optional: true,
},
},
async run({ $ }) {
try {
const response =
await this.symblAIApp.postVideoSummaryUI({
$,
conversationId: this.conversationId,
data: {
videoUrl: this.videoUrl,
name: "video-summary",
logo: this.logo,
favicon: this.favicon,
color: {
background: this.background,
topicsFilter: this.topicsFilter,
insightsFilter: this.insightsFilter,
},
font: {
family: this.font,
},
summaryURLExpiresIn: this.summaryURLExpiresIn,
readOnly: this.readOnly,
enableCustomDomain: this.enableCustomDomain,
},
});
$.export("$summary", `Successfully generated Video Summary UI at: ${response.url}`);
return response;
} catch (error) {
console.log("Error: ", error);
$.export("summary", "Failed to post Video Summary UI.");
}
},
};
24 changes: 24 additions & 0 deletions components/symbl_ai/symbl_ai.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ export default {
path: `/job/${jobId}`,
});
},
async postVideoSummaryUI({
$,
conversationId,
data,
}) {
return this.makeRequest({
$,
method: "post",
path: `/conversations/${conversationId}/experiences`,
data,
});
},
async getSpeechToText({
$,
conversationId,
Expand Down Expand Up @@ -129,5 +141,17 @@ export default {
params,
});
},
async getSummary({
$,
conversationId,
params,
}) {
return this.makeRequest({
$,
path: `/conversations/${conversationId}/summary`,
params,
});
},

},
};