Use Cloudflare Workers AI with Ollama-Style API
PLEASE change the prefix
in your deployment
There is NO rate limiter, you may be charged fees
As ollama-style API has no authentication, this repo is NOT suitable for production use
- Sign in your Cloudflare Dashboard > Workers & Pages > Create worker
- Replace the default content with index.js
- Change the prefix to a random and long string
- Add your preferred models
- Deploy the code, and enjoy the power of LLM
- (Optional) Add your own domain in your worker's settings
For example, if you want to use Companion in Obsidian
After installing the plugin, choose ollama
as provider
In API route
section, you should fill something similar to https://aaa.bbb.workers.dev/yourprefix
(Or your own domain if you added one)
Uncheck Streaming mode
(As I didn't write the code for stream lmao)