-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
403 OPTIONS "/api/generate" #2
Comments
Hi there, Browsers often send an OPTIONS request to verify CORS, which might be the case here. Were there any other issues caused by the OPTIONS request? Thanks. |
Well, I get that asking something trying to generate something, but it seems to stop there so nothing else happens. |
Could you please provide any specific error messages or logs that you encounter during the process? This information would greatly assist me in diagnosing the problem more accurately and providing you with the appropriate guidance. Thanks. |
How do I get better logs? I tried typing something, pressed enter, and then nothing. |
Hi there, To obtain more detailed logs, you can use the following command for Docker: docker logs ollama-webui Additionally, it would be helpful for diagnosing your issue if you could provide a screenshot of your console logs from your browser's developer tools. This will allow us to examine any client-side errors or issues that might not be visible in the server logs. Please feel free to share the Docker logs and the browser console logs screenshot, and we'll do our best to assist you in resolving the problem. Thanks. |
@Chillance Part of the reason that browsers invented CORS Preflight Requests (the OPTIONS issue) is to prevent people from stumbling into security issues. Do you already have the access protected with an API token or HTTP Basic Auth? Check out ollama/ollama#849 (comment) and the CORS section at https://webinstall.dev/caddy. |
Tested, Working ExampleSee #10 |
I don't do anything particular but just staring the ollama serve. And, on the same machine I run this in docker.
I actually got chatbot-ollama (other repo) working fine. But here I can see this in the console log:
|
And |
Your logs confirm the CORS error as expected, you should pull the latest commit of the main branch and build the docker container. It introduces breaking changes so your command should be replaced with the following instead: docker build --build-arg OLLAMA_API_BASE_URL='' -t ollama-webui .
docker run -d -p 3000:8080 --name ollama-webui --restart always ollama-webui Also make sure to run the following command to serve Ollama, as mentioned here, which should solve your issue: OLLAMA_HOST=0.0.0.0 OLLAMA_ORIGINS=* ollama serve Thanks. |
Thanks! Works now! |
Added nodeSelectors for allocating GPU nodePools in the cloud and configured volumes for WebUI
Added nodeSelectors for allocating GPU nodePools in the cloud and configured volumes for WebUI
Hi!
Just tested this and noticed it does a OPTIONS "/api/generate" request. From what I can tell this doesn't exist in latest ollama code...
Thoughts?
The text was updated successfully, but these errors were encountered: