ThunderAI icon indicating copy to clipboard operation
ThunderAI copied to clipboard

Not able to connect to Ollama

Open 31bado opened this issue 6 months ago • 7 comments

The problem

Getting an error when trying to update the Ollama models list.

Which Operative System are you using?

Windows 11

Which version of Thunderbird are you using?

138.0.2 (64-bit)

Which version of ThunderAI has the issue?

3.4.1

Which integration are you using?

Ollama API

Anything in the Thunderbird console logs that might be useful?

The error when trying to update Ollama models is"Ollama API request failed: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"

Additional information

Running Ollama on local server via docker container

31bado avatar May 26 '25 20:05 31bado

May you activate the debug in the ThunderAI options page, try again and then post here the response you're receving from the server? Thank tou.

micz avatar May 26 '25 21:05 micz

I activated the debug in the Thunder AI options page.

Are you refering to this "Ollama API request failed: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"?

Or should I look for the server log elsewhere? If so, please tell me where.

31bado avatar May 26 '25 21:05 31bado

Do you find any other message in the Thunderbird console log? May you post the full error, so I can see the line number that is failing? It seems that the server is not returnig a JSON.

micz avatar May 26 '25 21:05 micz

I hope this helps (not easy to find), but

[ThunderAI] Ollama API request failed: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data ollama.js:61:17 fetchModels moz-extension://9cf5e22e-b421-40b1-a8ff-bb4aa6921b2b/js/api/ollama.js:61 <anónimo> moz-extension://9cf5e22e-b421-40b1-a8ff-bb4aa6921b2b/options/mzta-options.js:557

and

[ThunderAI] Error when trying to search for Ollama models mzta-options.js:573:17 <anónimo> moz-extension://9cf5e22e-b421-40b1-a8ff-bb4aa6921b2b/options/mzta-options.js:573

31bado avatar May 26 '25 22:05 31bado

The server response is not the expected JSON for the models list. Do you have a way to check the server response in the server logs?

micz avatar May 27 '25 05:05 micz

Are you referring to the Ollama server log or Thunderbird logs?

31bado avatar May 27 '25 19:05 31bado

Ollama server, or you could try to load the models endpoint in a browser and check the response. Otherwise I could give you a modified ThunderAI version with a specific log for this case.

micz avatar May 27 '25 20:05 micz

There hasn't been any activity on this issue in the past 7 days. It will be closed in 3 days if no further activity occurs.

github-actions[bot] avatar Jun 04 '25 12:06 github-actions[bot]

This issue was closed because there hasn't been any activity in the past 10 days. Feel free to open it again if needed.

github-actions[bot] avatar Jun 08 '25 12:06 github-actions[bot]