diff --git a/main.js b/main.js index a3bfa9d..9967e2a 100644 --- a/main.js +++ b/main.js @@ -82,6 +82,28 @@ electron.app.whenReady().then(createWindow); // mainWindow.webContents.send("fuck", "worked uwu") // }, 5000); +electron.ipcMain.on("get_modules", async (event, args) => { + let module_array = { + "ai_modules":[], + "transcription_modules":[] + } + mapFunctions.forEach(e => { + switch(e.type){ + case "llm": + module_array.ai_modules.push({"name": e.name, "displayname": e.displayname}) + break; + case "transcription": + module_array.transcription_modules.push({"name": e.name, "displayname": e.displayname}) + break; + } + }) + console.log(module_array); + + mainWindow.webContents.send("modules", module_array) +}) + + + electron.ipcMain.on("file_submit", async (event, args) => { try { let curstep = 0 @@ -159,4 +181,16 @@ let q = } ] } +} + + +let q1 = { + "ai_modules": [ + {name:"abc", displayname:"ABC"}, + {name:"qeg", displayname:"aqghegahu"} + ], + "transcription_modules": [ + {name:"abc", displayname:"ABC"}, + {name:"qeg", displayname:"aqghegahu"} + ] } \ No newline at end of file diff --git a/services/modules/llm-chat_gpt/chatgpt.js b/services/modules/llm-chat_gpt/chatgpt.js index 6e9034e..8446af5 100644 --- a/services/modules/llm-chat_gpt/chatgpt.js +++ b/services/modules/llm-chat_gpt/chatgpt.js @@ -1,6 +1,6 @@ module.exports = { name:"chatgpt", // Unique name for our function that will later be used to get the function from the map via "mapFunctions.get("example").function()" - type:"document", // value used to differentiate each module to order them in the UI + type:"llm", // value used to differentiate each module to order them in the UI displayname:"ChatGPT", // The displayname used within the UI async function(parameter){ // TODO add code to actually send the transcript to ChatGPT and get a response back