Closed nausher closed 9 months ago
@nausher, did you set the OLLAMA_ORIGINS
environment variable for the server? Example command to start the server:
OLLAMA_ORIGINS=chrome-extension://* ollama serve
If OLLAMA_ORIGINS
is not set to chrome-extension://*
, the Chrome extension will be blocked from calling the API (i.e. CORS error).
@andrewnguonly - Yes! setting the variable and starting the server resolves that issue. I also realize now that it is working, that the API call to the ollama server does take quite a long while and the extension pop-up window closes at times before it has received the response. Perhaps that is a different issue now.
Also for others looking at this issue. I had installed and run Ollama as a Mac App. I had to stop the app and run the app from the command line as a server to be able to use the variable for origins.
@nausher
the API call to the ollama server does take quite a long while and the extension pop-up window closes at times before it has received the response. Perhaps that is a different issue now
Working to resolve both issues 👍
When I try to use the extension, I receive the following error. I have Ollama running locally and can query it from Emacs and receive responses.
I fed this to Llama and it suggested the following fixes. However I don't know see where in background.ts the fetch call is for me to add a no-cors mode.