Einbindung des Summarizer

This commit is contained in:
santa
2025-11-20 11:51:34 +01:00
parent 455147a41b
commit 97b571b7f9
3 changed files with 20 additions and 2 deletions
@@ -6,11 +6,21 @@ if (!fs.existsSync(outputDir)) {
module.exports = {
name: "summarize-transcription", // Unique name for our function that will later be used to get the function from the map via "mapFunctions.get("example").function()"
type: "transcription", // value used to differentiate each module to order them in the UI
type: "summarizer", // value used to differentiate each module to order them in the UI
displayname: "Summarizer", // The displayname used within the UI
async function(args) {
let inputJson = args.json;
//JSON Path
if (args.jsonPath) {
try {
const raw = fs.readFileSync(args.jsonPath, "utf-8");
inputJson = JSON.parse(raw);
} catch (e) {
console.error("Failed to load JSON from file:", e);
return { error: "Could not read JSON from file path." };
}
}
// JSON parsen
if (typeof inputJson === "string") {
try {