more logs added. see #143

This commit is contained in:
mic 2024-09-29 23:23:24 +02:00
parent b00f1858f3
commit b57375b46b
2 changed files with 3 additions and 3 deletions

View file

@ -93,7 +93,7 @@ switch (llm) {
messageInput.setModel(prefs_api.ollama_model);
messagesArea.setLLMName("Ollama Local");
worker.postMessage({ type: 'init', ollama_host: prefs_api.ollama_host, ollama_model: prefs_api.ollama_model, i18nStrings: i18nStrings});
console.log("(>>>>>> [ThunderAI] Ollama init done.");
console.log(">>>>>> [ThunderAI] Ollama init done.");
try{
messagesArea.appendUserMessage(browser.i18n.getMessage("ollama_api_connecting") + " \"" + prefs_api.ollama_host + "\" " +browser.i18n.getMessage("AndModel") + " \"" + prefs_api.ollama_model + "\"...", "info");
}catch(e){
@ -142,7 +142,7 @@ worker.onmessage = function(event) {
// handling commands from the backgound page
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
//console.log(">>>>>>>>>>>>> controller.js onMessage: " + JSON.stringify(message));
console.log(">>>>>>>>>>>>> controller.js onMessage: " + JSON.stringify(message));
switch (message.command) {
case "api_send":
//send the received prompt to the llm api

View file

@ -386,7 +386,7 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
await browser.tabs.sendMessage(createdTab3.id, { command: "api_error", error: browser.i18n.getMessage('ollama_empty_model')});
return;
}
console.log(">>>>>> [ThunderAI] Ollama API about to send message to createdTab3.id: " + createdTab3.id);
await browser.tabs.sendMessage(createdTab3.id, { command: "api_send", prompt: promptText, action: action, tabId: curr_tabId, mailMessageId: mailMessageId3, do_custom_text: do_custom_text});
taLog.log('[Ollama API] Connection succeded!');
browser.runtime.onMessage.removeListener(listener3);