Skip to content

ailelix/cf-workers-ai-ollama-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

cf-workers-ai-ollama-api

Use Cloudflare Workers AI with Ollama-Style API

Before Deployment

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

Deploy

  1. Sign in your Cloudflare Dashboard > Workers & Pages > Create worker
  2. Replace the default content with index.js
  3. Change the prefix to a random and long string
  4. Add your preferred models
  5. Deploy the code, and enjoy the power of LLM
  6. (Optional) Add your own domain in your worker's settings

Usage

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)

About

Use Cloudflare Workers AI with Ollama-Style API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published