Skip to content

Connect to a running instance of Ollama and use Mixtral in your Workers application

Notifications You must be signed in to change notification settings

ramrohitaws99/mixtral-cf-tunnel-ollama

 
 

Repository files navigation

Ollama + Mixtral + Langchain example (deployed to Cloudflare)

You can use Cloudflare Tunnel to open a secure HTTPS tunnel to a running Ollama instance on your local computer.

Using Cloudflare Workers, you can connect the Ollama instance to Langchain and use cutting-edge models like Mixtral.

Usage

  1. Configure your Workers project and deploy it (see "Get started" if you don't know how)
  2. Install cloudflared.
  3. Start a new tunnel with tunnel.sh.
  4. Find the output of your new Cloudflare Tunnel and set it as the TUNNEL secret in your Workers project: echo "YOURURL" | npx wrangler secret put TUNNEL.
  5. Request GET $workersURL/ with an optional query param query to directly query the model on your local machine. The response is streaming!

This is not recommended for production use, but shows how you can use local tooling to generate embeddings instead of relying on a third-party API.

About

Connect to a running instance of Ollama and use Mixtral in your Workers application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.0%
  • Shell 7.0%