diff --git a/LeakCode/public/content.js b/LeakCode/public/content.js index ae22b29..2dc12a7 100644 --- a/LeakCode/public/content.js +++ b/LeakCode/public/content.js @@ -26,15 +26,15 @@ setTimeout(async () => { }); const response = await session.prompt(element.textContent); - console.log("1 ok"); + console.log(response); - // const session_2 = await ai.languageModel.create({ - // systemPrompt: - // "Pretend to be a LeetCode master. I will provide you with a code , and your task is to give me shortest and easiest explanation in very short and simple way and in simple and short steps of it with new lines. Do not modify or rewrite the code. Just explain how the code works and what it does.", - // }); + const session_2 = await ai.languageModel.create({ + systemPrompt: + "Pretend to be a LeetCode master. I will provide you with a code , and your task is to give me shortest and easiest explanation in very short and simple way and in simple and short steps of it with new lines. Do not modify or rewrite the code. Just explain how the code works and what it does.", + }); - // const response_2 = await session_2.prompt(element.textContent); - // console.log("2 ok"); + const response_2 = await session_2.prompt(element.textContent); + console.log(response_2); const session_3 = await ai.languageModel.create({ systemPrompt: @@ -42,8 +42,7 @@ setTimeout(async () => { }); const response_3 = await session_3.prompt(element.textContent); - console.log("3 ok"); - let explain = "This Section is in Under Development"; + console.log(response_3); function openCodeViewerPage(code, explain, query) { // Encode the code to be URL-safe @@ -59,7 +58,7 @@ setTimeout(async () => { } // Call the function to open the new page with the code - openCodeViewerPage(response, explain, response_3); + openCodeViewerPage(response, response_2, response_3); } catch (error) { console.error("Error interacting with the language model:", error); }